I am trying to set up Nagios to monitor the nginx service on my load balancer but have been unsuccessful in getting it to show the service being up. The command and service definition are below. It seems that any process that is not spawned by root will not show as running. The nginx process is being run by www-data. I even tried something as simple as having it check for the "top" process I was running under a different user. What I have presented below works fine as long as I pick a process being run by root. If the process is spawned by any other user it shows as critical and does not work. Any thoughts?
define command {
command_name check_nginx
command_line $USER1$/check_procs -c 1: -C nginx
}
define service {
use local-service
host_name my_host
service_description Load Balance Service
check_command check_nginx
}