I have a hard time understanding what goes where for Icinga2 monitoring. I finally have my hosts being monitored for if they are alive and email (daily) getting shot off if the status changes:
object Host "vmwarehost2" {
import "generic-host"
address = "10.55.1.1"
check_command = "hostalive"
vars.notification["mail"] = {
groups=["icingaadmins"]
users=["icingaadmin"]
}
vars.notification.interval=0
}
Works great, now I need to figure out how to apply this:
https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#disk
To that above piece, I found this here:
https://community.icinga.com/t/monitoring-disk-space-on-server-with-multiple-drives/1299
Which more or less makes sense except the portion of:
apply Service for (disk => config in host.vars.disks) {
import “generic service”
check_command = “disk”
vars += config
}
Not sure where or how in my object Host the apply service goes?
Can I nest check commands or do I need two object Host 'vmwarehost2' entries one for the host alive and the other for disk?