Monitoring
Zabbix Integration
Overview
A ready-made Zabbix template that polls the SecondDNS health API via HTTP Agent every 5 minutes, extracts zone counters with JSONPath, and fires triggers when zones go stale or unreachable.
Prerequisites
- Zabbix Server 6.0+ (HTTP Agent support)
- A SecondDNS API key (Dashboard → API Key)
- A host in Zabbix to attach the template to (can be the Zabbix server itself)
1. Download the template
curl -O https://raw.githubusercontent.com/seconddns/dns_integrations/main/zabbix_templates/seconddns_health.yamlSource: github.com/seconddns/dns_integrations/zabbix_templates
2. Import into Zabbix
- Go to Configuration → Templates → Import
- Select the downloaded seconddns_health.yaml
- Click Import
3. Configure macros
Link the template to a host, then set the macros:
{$SECONDDNS_API_URL}https://seconddns.com (default, change if self-hosted){$SECONDDNS_API_KEY}Your API key (stored as Secret text in Zabbix)4. What you get
Items
| Item | Type | Interval |
|---|---|---|
| Zone health JSON | HTTP Agent | 5m |
| Total zones | Dependent (JSONPath) | — |
| Synced zones | Dependent (JSONPath) | — |
| Stale zones | Dependent (JSONPath) | — |
| Master unreachable | Dependent (JSONPath) | — |
| Nagios output | HTTP Agent | 5m |
Triggers
| Trigger | Severity |
|---|---|
| Zone(s) stale | Warning |
| Zone(s) master unreachable | High |
| Health API not responding (30 min) | High |
How it works
- The master item (seconddns.health.json) fetches GET /api/health/zones every 5 minutes
- Dependent items extract $.summary.total, $.summary.synced, etc. via JSONPath — no extra HTTP calls
- Triggers evaluate the counters: if stale > 0 → Warning, if masterUnreachable > 0 → High
- The Nagios output item (seconddns.health.nagios) fetches ?format=nagios for human-readable text in the "Latest data" view