@@ -62,16 +62,19 @@ agent {
62
62
{
63
63
name: "App1 metrics"
64
64
path: app1_metrics
65
+ labels: "{\"key1\": \"value1\", \"key2\": 2}"
65
66
url: "http://app1.local:9100/metrics"
66
67
},
67
68
{
68
69
name: "App2 metrics"
69
70
path: app2_metrics
71
+ labels: "{\"key3\": \"value3\", \"key4\": \"value4\"}"
70
72
url: "http://app2.local:9100/metrics"
71
73
},
72
74
{
73
75
name: "App3 metrics"
74
76
path: app3_metrics
77
+ labels: "{\"key5\": \"value5\", \"key6\": \"value6\"}"
75
78
url: "http://app3.local:9100/metrics"
76
79
}
77
80
]
@@ -113,8 +116,8 @@ scrape_configs:
113
116
The docker images are available via:
114
117
115
118
` ` ` bash
116
- docker pull pambrose/prometheus-proxy:1.22 .0
117
- docker pull pambrose/prometheus-agent:1.22 .0
119
+ docker pull pambrose/prometheus-proxy:1.23 .0
120
+ docker pull pambrose/prometheus-agent:1.23 .0
118
121
```
119
122
120
123
Start a proxy container with:
@@ -123,15 +126,15 @@ Start a proxy container with:
123
126
docker run --rm -p 8082:8082 -p 8092:8092 -p 50051:50051 -p 8080:8080 \
124
127
--env ADMIN_ENABLED=true \
125
128
--env METRICS_ENABLED=true \
126
- pambrose/prometheus-proxy:1.22 .0
129
+ pambrose/prometheus-proxy:1.23 .0
127
130
```
128
131
129
132
Start an agent container with:
130
133
131
134
``` bash
132
135
docker run --rm -p 8083:8083 -p 8093:8093 \
133
136
--env AGENT_CONFIG=' https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
134
- pambrose/prometheus-agent:1.22 .0
137
+ pambrose/prometheus-agent:1.23 .0
135
138
```
136
139
137
140
Using the config
@@ -149,7 +152,7 @@ is in your current directory, run an agent container with:
149
152
docker run --rm -p 8083:8083 -p 8093:8093 \
150
153
--mount type=bind,source=" $( pwd) " /prom-agent.conf,target=/app/prom-agent.conf \
151
154
--env AGENT_CONFIG=prom-agent.conf \
152
- pambrose/prometheus-agent:1.22 .0
155
+ pambrose/prometheus-agent:1.23 .0
153
156
```
154
157
155
158
** Note:** The ` WORKDIR ` of the proxy and agent images is ` /app ` , so make sure to use ` /app ` as the base directory in the
@@ -195,6 +198,7 @@ argument is an agent config value, which should have an `agent.pathConfigs` valu
195
198
| --sd_path | SD_PATH <br > proxy.service.discovery.path | "discovery" | Service discovery endpoint path |
196
199
| --sd_target_prefix | SD_TARGET_PREFIX <br > proxy.service.discovery.targetPrefix | "http://localhost:8080/" | Service discovery target prefix |
197
200
| --tf-disabled | TRANSPORT_FILTER_DISABLED <br > proxy.transportFilterDisabled | false | Transport filter disabled |
201
+ | --ref-disabled | REFLECTION_DISABLED <br > proxy.reflectionDisabled | false | gRPC Reflection disabled |
198
202
| --cert, -t | CERT_CHAIN_FILE_PATH <br > proxy.tls.certChainFilePath | | Certificate chain file path |
199
203
| --key, -k | PRIVATE_KEY_FILE_PATH <br > proxy.tls.privateKeyFilePath | | Private key file path |
200
204
| --trust, -s | TRUST_CERT_COLLECTION_FILE_PATH <br > proxy.tls.trustCertCollectionFilePath | | Trust certificate collection file path |
@@ -219,7 +223,7 @@ argument is an agent config value, which should have an `agent.pathConfigs` valu
219
223
| --max_retries | SCRAPE_MAX_RETRIES <br > agent.scrapeMaxRetries | 0 | Scrape maximum retries (0 disables scrape retries) |
220
224
| --chunk | CHUNK_CONTENT_SIZE_KBS <br > agent.chunkContentSizeKbs | 32 | Threshold for chunking data to Proxy and buffer size (KBs) |
221
225
| --gzip | MIN_GZIP_SIZE_BYTES <br > agent.minGzipSizeBytes | 1024 | Minimum size for content to be gzipped (bytes) |
222
- | --tf-disabled | TRANSPORT_FILTER_DISABLED <br > proxy .transportFilterDisabled | false | Transport filter disabled |
226
+ | --tf-disabled | TRANSPORT_FILTER_DISABLED <br > agent .transportFilterDisabled | false | Transport filter disabled |
223
227
| --trust_all_x509 | TRUST_ALL_X509_CERTIFICATES <br > agent.http.enableTrustAllX509Certificates | false | Disable SSL verification for agent https endpoints |
224
228
| --cert, -t | CERT_CHAIN_FILE_PATH <br > agent.tls.certChainFilePath | | Certificate chain file path |
225
229
| --key, -k | PRIVATE_KEY_FILE_PATH <br > agent.tls.privateKeyFilePath | | Private key file path |
@@ -239,6 +243,8 @@ Misc notes:
239
243
* Property values can be set as a java -D arg to or as a proxy or agent jar -D arg
240
244
* For more information about the proxy service discovery options, see the
241
245
Prometheus [ documentation] ( https://prometheus.io/docs/prometheus/latest/http_sd/ )
246
+ * A pathConfig ` labels ` value is a quote-escaped JSON string with key/value pairs. It is used to add additional service
247
+ discovery context to a target.
242
248
243
249
### Admin Servlets
244
250
@@ -297,15 +303,15 @@ docker run --rm -p 8082:8082 -p 8092:8092 -p 50440:50440 -p 8080:8080 \
297
303
--env PROXY_CONFIG=tls-no-mutual-auth.conf \
298
304
--env ADMIN_ENABLED=true \
299
305
--env METRICS_ENABLED=true \
300
- pambrose/prometheus-proxy:1.22 .0
306
+ pambrose/prometheus-proxy:1.23 .0
301
307
302
308
docker run --rm -p 8083:8083 -p 8093:8093 \
303
309
--mount type=bind,source=" $( pwd) " /testing/certs,target=/app/testing/certs \
304
310
--mount type=bind,source=" $( pwd) " /examples/tls-no-mutual-auth.conf,target=/app/tls-no-mutual-auth.conf \
305
311
--env AGENT_CONFIG=tls-no-mutual-auth.conf \
306
312
--env PROXY_HOSTNAME=mymachine.lan:50440 \
307
313
--name docker-agent \
308
- pambrose/prometheus-agent:1.22 .0
314
+ pambrose/prometheus-agent:1.23 .0
309
315
```
310
316
311
317
** Note:** The ` WORKDIR ` of the proxy and agent images is ` /app ` , so make sure to use ` /app ` as the base directory in the
@@ -339,6 +345,22 @@ An example nginx conf file is [here](https://github.com/pambrose/prometheus-prox
339
345
and an example agent/proxy conf file
340
346
is [ here] ( https://github.com/pambrose/prometheus-proxy/tree/master/nginx/nginx-proxy.conf )
341
347
348
+ ## gRPC Reflection
349
+
350
+ The [ gRPC Reflection] ( https://grpc.io/docs/guides/reflection/ ) service is enabled by default.
351
+
352
+ To disable gRPC Reflection support, set the ` REFLECTION_DISABLED ` environment var,
353
+ the ` --reflection_disabled ` CLI option, or the ` proxy.reflectionDisabled ` property to true.
354
+
355
+ To use [ grpcurl] ( https://github.com/fullstorydev/grpcurl ) to test the reflection service, run:
356
+
357
+ ``` bash
358
+ grpcurl -plaintext localhost:50051 list
359
+ ```
360
+
361
+ If you use the grpcurl ` -plaintext ` option, make sure that you run the proxy in plaintext
362
+ mode, i.e., do not define any TLS properties.
363
+
342
364
## Grafana
343
365
344
366
[ Grafana] ( https://grafana.com ) dashboards for the proxy and agent
0 commit comments