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/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. 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