Error: Service check command...not defined anywhere!
Re: Error: Service check command...not defined anywhere!
Can you please post the file that contains those 4 service definitions for us to take a look at?
Former Nagios Employee
Re: Error: Service check command...not defined anywhere!
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?
If so, it is the sample nrpe config file, with the addition of:
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%
Re: Error: Service check command...not defined anywhere!
That's actually your commands.cfg.
Look for something that looks similar to -
Look for something that looks similar to -
Code: Select all
define service {
}
define service {
}
Former Nagios Employee
Re: Error: Service check command...not defined anywhere!
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
}
Re: Error: Service check command...not defined anywhere!
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'
}
Former Nagios Employee
Re: Error: Service check command...not defined anywhere!
When I try to vi services.cfg, it says it's read only, and I can't save it. How do I overcome this?


Last edited by al_orange on Tue Jan 12, 2016 5:07 pm, edited 1 time in total.
Re: Error: Service check command...not defined anywhere!
Are you doing this as root?
Former Nagios Employee.
me.
me.
Re: Error: Service check command...not defined anywhere!
No, I was doing it as nagiosadmin. I just tried it as root. It worked.hsmith wrote:Are you doing this as root?
Re: Error: Service check command...not defined anywhere!
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.
Re: Error: Service check command...not defined anywhere!
Can you verify the permissions of your libexec folder and post the result?
Code: Select all
ls -l /usr/local/nagios/libexec/
Former Nagios Employee