Monitoring for DYODE 2.1.0 and later: Prometheus alert rules, a Grafana dashboard and a Zabbix 7 template, all reading the output box's local API.
The output box reports both boxes. The input box's status reaches it
through the diode every lidi.heartbeat seconds, so nothing here connects
to the input box or the OT network. The most important signal is
dyode_status_age_seconds{side="in"}: when it grows, the input box, its
NIC, the diode or the output box's receiver has failed.
| Folder | What |
|---|---|
prometheus/scrape.yml |
the scrape job (HTTPS, bearer token, the box's certificate) |
prometheus/rules/dyode.rules.yml |
14 alert rules: silent input box, configuration mismatch, aborted transfers, rejected and missing files, module restarts, disk, ARP entry, API refusals |
grafana/dyode-overview.json |
dashboard: link health, throughput, modules, free space, API |
zabbix/dyode_by_http.yaml |
Zabbix 7.0 template "DYODE by HTTP": one HTTP agent item on /v1/status, dependent items, module discovery for both boxes, triggers |
examples/ |
real /metrics and /v1/status from a 2.1.0 loopback run |
tools/ |
generators for the dashboard and template, and check.py |
sudo dyode api-cert --name dyode-out --ip 192.168.50.4 # once
sudo dyode api-token add prometheus --scope read # one token per client
sudo dyode api-token add zabbix --scope readand in config.yaml (both boxes carry the same file; only the output box
uses api.out):
api:
out:
listen: 192.168.50.4:8443
tls: {cert: api.crt, key: api.key}The guided setup (dyode setup) does the same on its "Local API" screen.
See docs/API.md.
- Copy the output box's
/etc/dyode/api.crtto/etc/prometheus/dyode-out.crtand the token to/etc/prometheus/dyode.token. - Add
prometheus/scrape.yml's job (keepjob_name: dyode: the rules use it). - Add
prometheus/rules/dyode.rules.ymltorule_filesand reload.
Import grafana/dyode-overview.json (Dashboards > New > Import) and pick the
Prometheus data source. Variables: job, output box.
- Import
zabbix/dyode_by_http.yaml(Data collection > Templates > Import). - Create a host for the output box and link "DYODE by HTTP".
- Set the macros:
{$DYODE.URL}=https://192.168.50.4:8443,{$DYODE.TOKEN}= the zabbix token (secret text). - The Zabbix server must trust the box's certificate: put
api.crtin itsSSLCALocation, or turn off "Verify peer" on the "DYODE: Get status" item.
Zabbix 7 can also read /metrics with an HTTP agent item and Prometheus
preprocessing, if you prefer to keep one source for both tools.
The dashboard and the template are generated: edit tools/gen_grafana.py
or tools/gen_zabbix.py, then
python3 tools/gen_grafana.py grafana/dyode-overview.json
python3 tools/gen_zabbix.py zabbix/dyode_by_http.yaml
python3 tools/check.py # parses everything; checks every metric and
# JSONPath against examples/, and that the
# generated files are currentCI runs check.py and promtool check rules.