Hi all,
I am a Newbie abbout Icinga2, but know previius Version.
I try to check serveral processes with the “check_command = procs”
I create a file named service_default.conf with automaticly checks the procs on all hosts.
But when I have a look at the GUI I saw the Icinga checks only one procs but the Name of the Checks are OK. So for example:
There is a Check of nxlog but icinga said: Porcess OK: one process with command 'supervisor
Any idea how I can check serveral different procs?
Here is my conf file:
#apply Service "procs-nxlog" {
apply Service "nxlog" {
import "generic-service"
check_command = "procs"
host.vars.procs_command = "nxlog"
assign where host.address
}
#apply Service "procs-supervisor" {
apply Service "supervisor" {
import "generic-service"
check_command = "procs"
host.vars.procs_command = "supervisor"
assign where host.address
}
your service apply rules are overriding the host.vars context. This only works one time, and the last apply rule executed sets the value, leading to wrong results.
The instead wanted behavior is to just assign these custom attributes directly to the service. Use this syntax to specify them for the service being created:
Hi Michael,
now I have a additional pb.
I would like to monitor to differnt java procs.
One is running under user “A” the user is running under user “B”.
My conf file looks like these:
apply Service “FrontApp” {
import “generic-service”
Extract the executed command line and figure it out manually (check the troubleshooting docs for instructions). Deeper usage of check_procs is beyond my knowledge, maybe others see it immediately.