Feature Request: Dynamic Assignment of Checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

Feature Request: Dynamic Assignment of Checks

Post by mopp »

Hi,

you might know Icinga2 and the Monitoring as Code approach.
I know with hostgroups you can do some kind of dynamic check assignment, but it would be nice to have more flexible options.
In Icinga2 you can do things like

Code: Select all

assign where match("*has gold support 24x7*", service.notes) && (host.vars.customer == "customer-xy" || host.vars.always_notify == true)
Or

Code: Select all

if (host.vars.environment == "dev") {
     check_interval = 30m
   } else {
     check_interval = 5m
   }
I know it will not be possible to change the way Nagios saves the configuration files, but maybe in CCM it would be possible to tag servers with DEV or PROD and CCM will automatically assign the checks which match certain criteria. So I don' t have to put the server in multiple hostgroups, I'll just tag the server with certain attributes and CCM will assign the right checks. It will speed up things in a dynamic world.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Feature Request: Dynamic Assignment of Checks

Post by tmcdonald »

I can see about having this added, but in a sense couldn't hostgroups act just like tags in this scenario? Or templates?
Former Nagios employee
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

Re: Feature Request: Dynamic Assignment of Checks

Post by mopp »

Of course hostgroups and templates will work, too.
At the end this monitoring as code will provide you slightly more flexibility and dynamic, e. g. it is also possible to change the the threshold based on certain rules.

Code: Select all

{ check_command = "load” host_name = ”backup.abc.com”
vars.load_warning = {{ 
if (get_time_period("backup").is_inside)
  { return 20 } else { return 5 }
}} } 
I know it is not possible to get this into Nagios without changing everything, but to add some more dynamic and flexibility would be nice.
You can close the thread
Locked