In Nagios GUI getting Critical errors
-
- Posts: 47
- Joined: Fri Dec 06, 2019 7:44 am
In Nagios GUI getting Critical errors
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
No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_nrpe, ...) failed. errno is 2: No such file or directory
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: In Nagios GUI getting Critical errors
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:
Check the permissions:
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
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 47
- Joined: Fri Dec 06, 2019 7:44 am
Re: In Nagios GUI getting Critical errors
[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 ~]#
/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 ~]#
-
- Posts: 47
- Joined: Fri Dec 06, 2019 7:44 am
Re: In Nagios GUI getting Critical errors
Given output is from Nagios monitoring server
Last edited by dheerushops on Tue Dec 10, 2019 11:19 am, edited 1 time in total.
-
- Posts: 47
- Joined: Fri Dec 06, 2019 7:44 am
Re: In Nagios GUI getting Critical errors
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~]#
[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~]#
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: In Nagios GUI getting Critical errors
Hello,
This looks like the problem. The permissions on check_nrpe are set to root on the Nagios server.
This looks like the problem. The permissions on check_nrpe are set to root on the Nagios server.
Run the following to corret and try once more./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
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 47
- Joined: Fri Dec 06, 2019 7:44 am
Re: In Nagios GUI getting Critical errors
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
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
Re: In Nagios GUI getting Critical errors
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!
-
- Posts: 47
- Joined: Fri Dec 06, 2019 7:44 am
Re: In Nagios GUI getting Critical errors
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
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
Re: In Nagios GUI getting Critical errors
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:
After saving the file, and restarting nrpe on the remote box, so that changes can take effect:
you can test your check by running the following command on the nagios server:
In this example, you are passing 2 arguments - FTP server's IP address and a port number.
Example:
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.
Does this make sense?
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$
Code: Select all
service nrpe restart
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_ftp -a '<ip address of your FTP server>' '<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
Code: Select all
./check_nrpe -H <client ip> -c <command> -a <arguments>
Be sure to check out our Knowledgebase for helpful articles and solutions!