Hi,
I added a new service to Icinga 2, to monitor the uptime of the machine. So far it is working but, the default plugin check unit is in minutes. The plugin itself supports an argument, with which you can change the unit to (seconds | minutes | hours | days).
Now my question is, how can I add arguments to the service? I tried the following, without success:
apply Service "uptime" {
import "generic-service"
check_command = "uptime"
vars.uptime_arguments = [ "-u", "days" ]
assign where host.name == NodeName
}
I guess I misunderstood the configuration documentation and have done something wrong but I can’t figure out what it could be.
Does anyone know how I could add the following arguments to that service or if there is another way of doing it?
Arguments:
-u (seconds | minutes | hours | days)
-w Warning Threshold (i.e. 280)
-c Critical Threshold (i.e 300)
Thank you in advance