Icinga2 – disable host services/checks

I wanted to disable a specific host (the services/checks).

My raspberry pi is currently without an sd-card and it should not be monitored anymore.

I found out that there is a check command „dummy“ which is saying that the service is fine, but i don’t want fake values which is saying that the system is up.

Also it is just saying that the host is ok and not all of the services/checks.

My solution:

First of all i have commented out the import commands. You should split your services into host groups. For example my category server-linux allocates specific services to all of my linux servers. If the server is apt-based there are some checks with aptitude (for other systems you can have groups for eg. pacman (packet manager)).

After that i have commented out my temperature and humidity sensors, so that these settings are not loaded.

I also found out that commenting out multiple lines doesn’t work 🙁

You can also go to icingaweb -> overview -> hosts -> HOSTNAME -> downtime -> schedule downtime (select all services)

root@monitoring:~# nano /etc/icinga2/zones.d/master/hosts/sensors.conf

object Host "sensors.mattionline.lan" {
 import "generic-host"
 //import "server-allgemein"
 //import "server-linux"
 //import "apt-based"
 //import "server-home"

address = "192.168.2.121"
 display_name = "sensors.mattionline.lan"

/* ds1820 sensors for temperature check */
// vars.temperature_sensor = [
// "28-0116106adaee",
// "28-01161078fbee"
// ]

// vars.dhtpin = [
// "7"
// ]

}

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Nach oben scrollen