Skip to content

Commit b0d18e9

Browse files
committed
chore: update readme, update default CLI arg values
Signed-off-by: arkbriar <[email protected]>
1 parent fc9f1e3 commit b0d18e9

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# PROMPROXY
22

33
Prometheus Proxy is a simple proxy server that can be used to simulate namespaced Prometheus
4-
instances. Full Prometheus v1 API is supported and will be exposed under `/{namespace}/api/v1/`
5-
path. Grafana datasource configuration is also supported.
4+
instances. A selected set of Prometheus v1 API will be exposed under `/{key1}/{key2}/api/v1/`
5+
path to be a data source of general purpose Prometheus client, such as Grafana.
6+
7+
## HTTP API Endpoints
8+
9+
The following Prometheus v1 API endpoints are supported:
10+
11+
- `/api/v1/query`: Query Prometheus for metrics.
12+
- `/api/v1/query_range`: Query Prometheus for metrics over a range of time.
13+
- `/api/v1/query_exemplars`: Query Prometheus for exemplars.
14+
- `/api/v1/series`: Get a list of series by label selectors.
15+
- `/api/v1/labels`: Get a list of label names.
16+
- `/api/v1/label/{name}/values`: Get a list of label values.
17+
- `/api/v1/rules`: Get a list of alerting and recording rules.
18+
19+
## Configuration
20+
21+
The proxy server can be configured using the following CLI flags:
22+
23+
- `-listen-addr`: The address to listen on for incoming HTTP requests. (default ":8080")
24+
- `-upstream-endpoint`: The address of the upstream Prometheus server. (
25+
default "http://localhost:9090")
26+
- `-upstream-tls`: Enable TLS for the upstream Prometheus server. (default false)
27+
- `-upstream-tls-cert-dir`: The directory containing the TLS certificate and key for the upstream
28+
Prometheus server. (default "")
29+
- `-label-matchers`: The label matchers to be used for the proxy server. (default "")
30+
- `-isolation-keys`: The isolation keys to be used for the proxy server. (default "")
31+
- `-print-access-log`: Print access log. (default false)

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ var (
2929

3030
func init() {
3131
flag.StringVar(&listenAddr, "listen-addr", ":8080", "address to listen on")
32-
flag.StringVar(&upstreamEndpoint, "upstream-endpoint", "", "upstream Prometheus endpoint")
32+
flag.StringVar(&upstreamEndpoint, "upstream-endpoint", "http://localhost:9090", "upstream Prometheus endpoint")
3333
flag.BoolVar(&upstreamTLS, "upstream-tls", false, "use TLS for upstream connection")
3434
flag.StringVar(&upstreamTLSCertDir, "upstream-tls-cert-dir", "", "directory to load certificates from")
3535
flag.StringVar(&labelMatchers, "label-matchers", "", "label matchers to apply to all queries")
3636
flag.BoolVar(&printAccessLog, "print-access-log", false, "print access log")
37-
flag.StringVar(&isolationKeys, "isolation-keys", "", "keys to isolate on, separated by commas")
37+
flag.StringVar(&isolationKeys, "isolation-keys", "namespace", "keys to isolate on, separated by commas")
3838
}
3939

4040
func newProxy() (*proxy.Proxy, error) {

0 commit comments

Comments
 (0)