Hi there

I am currently in the progress of rebuilding our quite complex Icinga config and am enjoying the new apply syntax rather than lots of repetition of define service or having quite complex code to try and build up a long list of hosts that need this service based on our management database and then spitting out one define service with a long list of hostnames

The issue I am having though is when I have multiple related services on the same host, in the documentation it shows how you can define an array of disk partitions for a host, then pass this list to a check, but this only creates a single service


|object Host "my-server" {
   vars.local_disks["basic-partitions"] = {
     disk_partitions = [ "/", "/tmp", "/var", "/home" ]
   }
}

apply Service for (disk => config in host.vars.local_disks) {
   import "generic-service"
   check_command = "my-disk"

   vars += config

   assign where host.vars.local_disks
}|
So my question is, if I wanted to have service checks that were like "disk /var", "disk /home" etc is this possible using the apply syntax ?

These are not the actual checks I need, they are just for illustrative purposes, but it's the same principle of creating one service check per entry in the vars array for that host

--

Will Tatam



_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to