We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcf0a25 commit 36058aaCopy full SHA for 36058aa
markdown-file/Prometheus-Install-And-Settings.md
@@ -242,6 +242,19 @@ scrape_configs:
242
labels:
243
instance: nginx1
244
245
+
246
+如果nginx 有加 basic auth,则需要这样:
247
+scrape_configs:
248
+ - job_name: "nginx"
249
+ metrics_path: /status/format/prometheus
250
+ basic_auth:
251
+ username: youmeek
252
+ password: '123456'
253
+ static_configs:
254
+ - targets: ['192.168.1.3:9913']
255
+ labels:
256
+ instance: 'nginx1'
257
258
```
259
260
- 重启 prometheus:`docker restart prometheus`
0 commit comments