Prometheus and Grafana
Purpose
Scrape Manager Prometheus text and import shipped Grafana dashboards into your Prometheus/Grafana. Zwall does not operate a Grafana cloud and this is not a Splunk/SIEM product.
Audience
Operators who already run Prometheus and Grafana.
Edition
SHARED Manager /metrics. Enterprise tree also contains grafana/dashboards/cluster-ha.json. Manager cluster is not a public HA product; do not enable that dashboard as certified HA.
Status
SUPPORTED as operator-hosted scrape plus example dashboards. The in-tree prometheus/prometheus.yml example targets localhost:8080 with scheme: http and a bearer token file. That matches unconfigured zwallctl, not the Manager example TLS listen 8443. Point scrape at the real Manager URL.
Prerequisites
metrics.enabled: true(example true)- Admin JWT (or session) for scrape —
/metricsusesAdminAuth+RoleAuth("admin") - Optional
metrics.allowed_cidrsif you restrict scraper IPs - You operate Prometheus and Grafana
Required permissions
Administrator role for scrape. Treat the scrape token as admin-equivalent.
Dependencies
Manager process ready. TLS files if the Manager listens with server.tls.enabled: true.
Configuration
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Example |
|---|---|
metrics.enabled | true |
metrics.path | /metrics |
metrics.allowed_cidrs | empty = no IP restriction (still requires auth) |
metrics.trusted_proxy_cidrs | empty = never trust forwarded headers |
If metrics.enabled is false, the route is not registered.
Agent optional metrics: disabled by default; if enabled, bind 127.0.0.1:9090 with paths /metrics and /health. Empty Agent allowed_cidrs means localhost only. Hosting observation profile rejects metrics.enabled on the Agent (no listener).
Shipped Grafana JSON under grafana/dashboards/:
agent-status.jsonattack-patterns.jsonauthentication.jsonsecurity-overview.jsonsystem-performance.jsoncluster-ha.json(Enterprise tree; not a certified HA product)
Provisioning examples: grafana/provisioning/. Alert rule template: prometheus/rules.yml.
In-tree Prometheus job uses bearer_token_file: /etc/prometheus/zwall_admin_token.txt. Do not put live JWTs in documentation or world-readable files.
Procedure
- Enable
metrics.enabledif it was turned off; restart the Manager. - Obtain an admin JWT (
zwallctl logininteractive). Store it only in a0600file Prometheus can read. - Scrape
https://manager.example.com:8443/metrics(replace with your origin). Use HTTPS and a CA your Prometheus trusts. Do not copy the examplescheme: http/:8080blindly. - Confirm HTTP 200 and Prometheus exposition format. Unauthenticated scrape must not return metrics.
- Import the JSON dashboards you need into your Grafana. Skip
cluster-ha.jsonas a customer HA dashboard. - Optional CIDR allowlist for scraper IPs.
Verification
curl -sS https://manager.example.com:8443/metrics \
-H "Authorization: Bearer TOKEN" | headPrefer a token from interactive login, not from argv in shared shell history. Dashboard panels populate after scrape. Template intervals (10s job / 15s global) are examples, not availability targets.
Expected result
Operator-hosted Prometheus has Manager samples. Grafana shows the imported dashboards. No Zwall-operated Grafana.
Failure modes
Scroll sideways to see the full table. Use the arrow keys when focused.
| Symptom | Cause | Action |
|---|---|---|
| 404 | metrics.enabled false | enable and restart Manager |
| 401/403 | not admin JWT | login as admin |
| connection refused :8080 | Manager URLs and ports mismatch | scrape TLS 8443 (or your real api_port) |
| empty Grafana | scrape failing TLS/auth | fix Prometheus job |
| cluster-ha panels empty | cluster not a customer product | ignore that dashboard |
Hosting Agent /metrics missing | profile forbids Agent metrics | scrape the Manager only |
Troubleshooting
journalctl -u zwall-manager. Confirm /health/ready before debugging Grafana. Token expiry follows auth.token_expiry (example 8h) — a static bearer file will go stale unless you refresh it.
Security considerations
/metricsis admin-gated. A scraper credential is an administrator credential.- Do not expose unauthenticated
/metricson the public internet (the product does not offer that mode when metrics are enabled). - Rotate the scrape JWT when administrators rotate credentials.
- Do not scrape Hosting Agents for Prometheus; they expose no metrics listener.
Limitations
Not Splunk. Not a Zwall-operated cloud. Metric names in dashboards are templates; there is no generated OpenAPI/metric catalog published as a customer contract.