I would like to create a check that monitors the number of postgress processes. I have a custom bash script i created which is under /usr/lib/nagios/plugins and i have made it executable. In the services.conf file I added
}
apply Service “procs” {
import “generic-service”
check_command = “customprocs”
vars.procs_warning = 100
vars.procs_critical = 120
vars.procs_arguments = “10/main”
vars.procs_user = “postgres”
assign where host.name == NodeName
}
In the commands.conf file i added
object CheckCommand “customprocs.sh” {
import “plugin-check-command”
command = [PluginDir + “/customprocs.sh” ]
}
When I reload the icinga service it gives the error mentioned in the title of the post. One thing to mention is the ‘customprocs’ segment in services.conf used to be the check for procs . I’m not sure if replacing that would cause any issues.