diff --git a/README.md b/README.md index 705b2b0..37b51b5 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,17 @@ and run the following command: $ unbound-telemetry shm --help ``` +### Install systemd service + +Copy unbound-telemetry.service to /etc/systemd/system/unbound-telemetry.service +and run the following commands: + +```bash +$ systemctl daemon-reload +$ systemctl enable unbound-telemetry +$ systemctl start unbound-telemetry +``` + ### Monitoring `/healthcheck` URL can be used for automated monitoring; diff --git a/unbound-telemetry.service b/unbound-telemetry.service new file mode 100644 index 0000000..8ddb15f --- /dev/null +++ b/unbound-telemetry.service @@ -0,0 +1,10 @@ +[Unit] +Description=Prometheus exporter for unbound +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/unbound-telemetry tcp --control-interface 127.0.0.1:8953 --server-cert-file /etc/unbound/unbound_server.pem --control-cert-file /etc/unbound/unbound_control.pem --control-key-file /etc/unbound/unbound_control.key + +[Install] +WantedBy=multi-user.target