feat(monitoring): add nginx, postgres, valkey prometheus exporters
- nginx: nginx-prometheus-exporter gated by nginx_exporter_enabled, deploys loopback-only stub_status (8090), exporter on 9113 - postgres: postgres_exporter gated by postgres_exporter_enabled, creates postgres_exporter role with pg_monitor, exporter on 9187 - valkey: redis_exporter gated by valkey_exporter_enabled, adds read-only ACL user to users.acl, exporter on 9121 Each exporter follows the nut pattern (tasks/exporter.yml included from main.yml, OS vars, 0600 secret env files, password asserts).
This commit is contained in:
@@ -326,6 +326,26 @@ INFO memory
|
||||
INFO stats
|
||||
```
|
||||
|
||||
### Prometheus exporter
|
||||
|
||||
Enable the exporter and set a password to create a dedicated read-only
|
||||
`valkey_exporter` ACL user:
|
||||
|
||||
```yaml
|
||||
valkey_exporter_enabled: true
|
||||
valkey_exporter_password: "<min 12 chars>"
|
||||
```
|
||||
|
||||
The role appends the user to `users.acl` and runs `redis_exporter` on
|
||||
`127.0.0.1:9121`. Pair it with a scrape job:
|
||||
|
||||
```yaml
|
||||
prometheus_scrape_configs:
|
||||
- job_name: 'valkey'
|
||||
static_configs:
|
||||
- targets: ['127.0.0.1:9121']
|
||||
```
|
||||
|
||||
Check connected clients:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user