Error: Service check command...not defined anywhere!

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Error: Service check command...not defined anywhere!

Post by hsmith »

It's just generally wherever you see $ARGx$ it wants some kind of information. Compare our check_users for example. Let me know if you want any help with specifics.
Former Nagios Employee.
me.
al_orange
Posts: 55
Joined: Mon Nov 23, 2015 7:27 pm

Re: Error: Service check command...not defined anywhere!

Post by al_orange »

hsmith wrote:It's just generally wherever you see $ARGx$ it wants some kind of information. Compare our check_users for example. Let me know if you want any help with specifics.
Okay, well I got the check_users filled out. But, I don't know what to put for the rest of the arguments for the other service check_commands. Are there examples posted here somewhere?

Also, I'm getting an error in Nagios, in host status: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ping, ...) failed. errno is 2: No such file or directory
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Error: Service check command...not defined anywhere!

Post by Box293 »

al_orange wrote:Okay, well I got the check_users filled out. But, I don't know what to put for the rest of the arguments for the other service check_commands. Are there examples posted here somewhere?
Can you provide the list of the other check_commands please.

al_orange wrote:Also, I'm getting an error in Nagios, in host status: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ping, ...) failed. errno is 2: No such file or directory
Can you create a new thread for this question please along with your host object definition.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
al_orange
Posts: 55
Joined: Mon Nov 23, 2015 7:27 pm

Re: Error: Service check command...not defined anywhere!

Post by al_orange »

Here are my check_commands. I only have one with the arguments filled out (Check Swap).

Code: Select all

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.vrcis.local
        service_description     Check Processes
        check_command           check_nrpe!check_procs
        }

Last edited by al_orange on Mon Nov 30, 2015 8:06 pm, edited 1 time in total.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Error: Service check command...not defined anywhere!

Post by Box293 »

This screenshot you provided shows the commands already defined with their argument in the nrpe.cfg file.

Image

So you shouldn't need any additional arguments. If you client nrpe.cfg file is different post it here, or perhaps they are defined in /usr/local/nagios/etc/nrpe/common.cfg.

Your screenshot does not show a definition for check_ftp.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
al_orange
Posts: 55
Joined: Mon Nov 23, 2015 7:27 pm

Re: Error: Service check command...not defined anywhere!

Post by al_orange »

Box293 wrote:This screenshot you provided shows the commands already defined with their argument in the nrpe.cfg file.

Image

So you shouldn't need any additional arguments. If you client nrpe.cfg file is different post it here, or perhaps they are defined in /usr/local/nagios/etc/nrpe/common.cfg.

Your screenshot does not show a definition for check_ftp.
I don't recall where I got the screenshot from. I couldn't find the nrpe.cfg file, even after doing a search find / -name "nrpe" -print on the client. On the server, all I found was

Code: Select all

[root@nagios etc]# find / -name "nrpe" -print
/root/nagios/nrpe-2.15/package/solaris/pkg/nrpe
/root/nagios/nrpe-2.15/src/nrpe
/usr/local/nagios/bin/nrpe
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Error: Service check command...not defined anywhere!

Post by rkennedy »

We would need to know where the screenshot came from. That is where check_ftp needs to be defined to work with NRPE.
Former Nagios Employee
al_orange
Posts: 55
Joined: Mon Nov 23, 2015 7:27 pm

Re: Error: Service check command...not defined anywhere!

Post by al_orange »

rkennedy wrote:We would need to know where the screenshot came from. That is where check_ftp needs to be defined to work with NRPE.
I forgot where it came from. I don't know where to look. Ugh.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Error: Service check command...not defined anywhere!

Post by hsmith »

What's the output of ls /usr/lib?
Former Nagios Employee.
me.
al_orange
Posts: 55
Joined: Mon Nov 23, 2015 7:27 pm

Re: Error: Service check command...not defined anywhere!

Post by al_orange »

hsmith wrote:What's the output of ls /usr/lib?

Code: Select all

[root@XEN1 t]# /usr/lib
-bash: /usr/lib: is a directory
[root@XEN1 t]#

Code: Select all

[root@nagios etc]# /usr/lib
-bash: /usr/lib: Is a directory
[root@nagios etc]#
Locked