From 4b44687ee0a968e290295c3040be21386023c588 Mon Sep 17 00:00:00 2001 From: Markus Opolka <7090372+martialblog@users.noreply.github.com> Date: Wed, 11 Mar 2026 08:47:58 +0100 Subject: [PATCH 1/2] Update README --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c553f11..0feaabf 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Icinga2 exporter -Prometheus exporter for Icinga2. +A Prometheus exporter for Icinga2. + +The `icinga2-exporter` for Prometheus allows you to scrape status and statistics information from Icinga2 to monitor the health of the Icinga instance. ## Installation and Usage -The `icinga2_exporter` listens on HTTP port 9665 by default. +The `icinga2-exporter` listens on HTTP port 9665 by default. See the `-help` output for more options. ``` @@ -48,6 +50,11 @@ See the `-help` output for more options. Path under which to expose metrics. (default "/metrics") ``` +### Cache + +The exporter caches the responses from the Icinga2 API to decrease load on the API. +The lifetime of the cache can be adjusted with `-web.cache-ttl`. + ## Collectors By default only the `IcingaApplication` metrics of the status API are collected. From 3ae0aeefc5743970e124454f73e3caaafe3d136f Mon Sep 17 00:00:00 2001 From: Markus Opolka <7090372+martialblog@users.noreply.github.com> Date: Wed, 11 Mar 2026 08:54:41 +0100 Subject: [PATCH 2/2] Add example systemd unit --- .goreleaser.yml | 2 +- contrib/icinga2-exporter.service | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 contrib/icinga2-exporter.service diff --git a/.goreleaser.yml b/.goreleaser.yml index db962ac..a920f01 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,7 +20,7 @@ release: draft: true github: owner: NETWAYS - name: icinga-exporter + name: icinga2-exporter archives: - formats: - binary diff --git a/contrib/icinga2-exporter.service b/contrib/icinga2-exporter.service new file mode 100644 index 0000000..0bf18b5 --- /dev/null +++ b/contrib/icinga2-exporter.service @@ -0,0 +1,24 @@ +# Example systemd unit + +[Unit] +Description=Prometheus exporter for Icinga2 +Documentation=https://github.com/NETWAYS/icinga2-exporter +After=network.target + +[Service] +EnvironmentFile=-/etc/default/icinga2-exporter +User=icinga2-exporter +ExecStart=/usr/bin/icinga2-exporter $ICINGA2_EXPORTER_OPTS +ExecReload=/bin/kill -HUP $MAINPID +TimeoutStopSec=20s +SendSIGKILL=no +Restart=on-failure +NoNewPrivileges=true +PrivateTmp=true +PrivateUsers=true +ProtectHome=true +ProtectKernelModules=true +ProtectKernelTunables=true + +[Install] +WantedBy=multi-user.target