Re: Error: Service check command...not defined anywhere!
Posted: Mon Dec 21, 2015 2:35 pm
Can you please post the file that contains those 4 service definitions for us to take a look at?
Support for Nagios products and services
https://support.nagios.com/forum/
Is that the nrpe.cfg?rkennedy wrote:Can you please post the file that contains those 4 service definitions for us to take a look at?
Code: Select all
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%
Code: Select all
define service {
}
define service {
}
Code: Select all
[nagiosadmin@nagios etc]$ vi services.cfg
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description CPU Load
check_command check_nrpe!check_load
}
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description Total Processes
check_command check_nrpe!check_total_procs
}
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description Current Users
check_command check_nrpe!check_users-a '-w 5 -c 10'
}
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description SSH Monitoring
check_command check_nrpe!check_ssh
}
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description FTP Monitoring
check_command check_nrpe!check_ftp
}
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description Check Swap
check_command check_nrpe!check_swap -w 20 -c 10
}
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description Check Processes
check_command check_nrpe!check_procs
}
In that file, try changing a your Current Users definitions, and then let me know if it is fixed.al_orange wrote:Code: Select all
[nagiosadmin@nagios etc]$ vi services.cfg define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description CPU Load check_command check_nrpe!check_load } define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description Total Processes check_command check_nrpe!check_total_procs } define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description Current Users check_command check_nrpe!check_users-a '-w 5 -c 10' } define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description SSH Monitoring check_command check_nrpe!check_ssh } define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description FTP Monitoring check_command check_nrpe!check_ftp } define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description Check Swap check_command check_nrpe!check_swap -w 20 -c 10 } define service{ use generic-service host_name ora_linux7_xen2.xyz.local service_description Check Processes check_command check_nrpe!check_procs }
Code: Select all
define service{
use generic-service
host_name ora_linux7_xen2.xyz.local
service_description Current Users
check_command check_nrpe!check_users-a '-w 5 -c 10'
}

No, I was doing it as nagiosadmin. I just tried it as root. It worked.hsmith wrote:Are you doing this as root?
No, that didn't seem to fix the issue. I did restart Nagios.rkennedy wrote: In that file, try changing a your Current Users definitions, and then let me know if it is fixed.
Code: Select all
ls -l /usr/local/nagios/libexec/