In Nagios GUI getting Critical errors

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.
dheerushops
Posts: 47
Joined: Fri Dec 06, 2019 7:44 am

In Nagios GUI getting Critical errors

Post by dheerushops »

In Nagios server GUI. Getting below error for Remote servers. For alerts CPU, FTP,SSH.
No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_nrpe, ...) failed. errno is 2: No such file or directory
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: In Nagios GUI getting Critical errors

Post by benjaminsmith »

Hello @dheerushops,

The plugin is missing for some reason, perhaps in the wrong path. What is the output of the following commands?

Verify the plugin is in the right location:

Code: Select all

find / -name check_nrpe
Check the permissions:

Code: Select all

ls -l /usr/local/nagios/libexec/check_nrpe
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
dheerushops
Posts: 47
Joined: Fri Dec 06, 2019 7:44 am

Re: In Nagios GUI getting Critical errors

Post by dheerushops »

[root@nagiosserver ~]# find / -name check_nrpe
/tmp/nrpe-2.15/nrpe-2.15/src/check_nrpe
/usr/local/nagios/libexec/check_nrpe
[root@nagiosserver ~]# ls -l /usr/local/nagios/libexec/check_nrpe
-rwxr-xr-x 1 root root 76785 Dec 6 08:52 /usr/local/nagios/libexec/check_nrpe
[root@nagiosserver ~]#
dheerushops
Posts: 47
Joined: Fri Dec 06, 2019 7:44 am

Re: In Nagios GUI getting Critical errors

Post by dheerushops »

Given output is from Nagios monitoring server
Last edited by dheerushops on Tue Dec 10, 2019 11:19 am, edited 1 time in total.
dheerushops
Posts: 47
Joined: Fri Dec 06, 2019 7:44 am

Re: In Nagios GUI getting Critical errors

Post by dheerushops »

Below output is from nagios client host.

[root@nagioshost~]# find / -name check_nrpe
/usr/local/nagios/libexec/check_nrpe
/root/nagios/nrpe-2.15/src/check_nrpe
[root@nagioshost~]#
[root@nagioshost~]# ls -l /usr/local/nagios/libexec/check_nrpe
-rwxrwxr-x 1 nagios nagios 76777 Dec 3 13:21 /usr/local/nagios/libexec/check_nrpe
[root@nagioshost~]#
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: In Nagios GUI getting Critical errors

Post by benjaminsmith »

Hello,

This looks like the problem. The permissions on check_nrpe are set to root on the Nagios server.
/usr/local/nagios/libexec/check_nrpe
[root@nagiosserver ~]# ls -l /usr/local/nagios/libexec/check_nrpe
-rwxr-xr-x 1 root root 76785 Dec 6 08:52 /usr/local/nagios/libexec/check_nrpe
Run the following to corret and try once more.

Code: Select all

chmod 775 /usr/local/nagios/libexec/check_nrpe
chown nagios:nagios /usr/local/nagios/libexec/check_nrpe
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
dheerushops
Posts: 47
Joined: Fri Dec 06, 2019 7:44 am

Re: In Nagios GUI getting Critical errors

Post by dheerushops »

For Nagios host getting below errors in Nagios monitoring tool.
nagioshost


FTP Monitoring

CRITICAL 12-11-2019 08:45:13 7d 19h 43m 3s 3/3 NRPE: Command 'check_ftp' not defined

SSH Monitoring

CRITICAL 12-11-2019 08:46:28 7d 19h 41m 48s 3/3 NRPE: Command 'check_ssh' not defined

Total Processes

CRITICAL 12-11-2019 08:47:43 7d 19h 40m 33s 3/3 PROCS CRITICAL: 263 processes
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: In Nagios GUI getting Critical errors

Post by lmiltchev »

It seems like the 'check_ftp' and 'check_ssh' commands are not defined in nrpe.cfg on the client machine... You will have to define them on remote box, and restart the nrpe service. Then, you can run your checks again from the command line on the nagios server to see if the issue has been resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dheerushops
Posts: 47
Joined: Fri Dec 06, 2019 7:44 am

Re: In Nagios GUI getting Critical errors

Post by dheerushops »

I have added entries in file " /usr/local/nagios/etc/services.cfg"

define service{
use generic-service
host_name nagioshost
service_description SSH Monitoring
check_command check_nrpe!check_ssh
}

define service{
use generic-service
host_name nagioshost
service_description FTP Monitoring
check_command check_nrpe!check_ftp
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: In Nagios GUI getting Critical errors

Post by lmiltchev »

Well, you defined you services on the nagios server, but you haven't defined you commands on the remote machine (the host that you are monitoring)...

Here's an example of a command definition that can be placed in your nrpe.cfg file on the client machine:

Code: Select all

command[check_ftp]=/usr/local/nagios/libexec/check_ftp -H $ARG1$ -p $ARG2$
After saving the file, and restarting nrpe on the remote box, so that changes can take effect:

Code: Select all

service nrpe restart
you can test your check by running the following command on the nagios server:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_ftp -a '<ip address of your FTP server>' '<port number>'
In this example, you are passing 2 arguments - FTP server's IP address and a port number.

Example:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.x.x -c check_ftp -a '192.168.y.y' '21'
FTP OK - 0.002 second response time on 192.168.y.y port 21 [220 (vsFTPd 2.2.2)]|time=0.001744s;;;0.000000;10.000000
Bottom line: when you use check_nrpe you pass your command with the "-c" flag. The command is defined on the remote box (host that you are monitoring). You pass arguments if needed, using the "-a" flag.

Code: Select all

./check_nrpe -H <client ip> -c <command> -a <arguments>
Does this make sense?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked