Error message using NRPE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Error message using NRPE

Post by DOkuwa »

Merry Xmas and Happy New year
I am monitoring a red hat server using NRPE on Nagios XI
I do get a an error in the GUI such as " (Return code of 255 is out of bounds)"
I am also attaching the message with the GUI
Please help
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error message using NRPE

Post by dwhitfield »

Please attach your nrpe.cfg from the remote host. I suspect you don't have your commands set up. If you are referencing any configs in your nrpe.cfg, please send those as well (common.cfg would be the most...common).

If you need help finding any of the mentioned files you can use find / -name NameOfFileYouWantToFind

How did you install NRPE? It looks like you used the linux-agent, which means you're using xinetd. Please also attach your /etc/xinetd.d/nrpe

While these articles have different return code #s, they are worth looking at for troubleshooting:
https://support.nagios.com/kb/article/n ... e-614.html

https://support.nagios.com/kb/article/n ... g-613.html
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Error message using NRPE

Post by DOkuwa »

Thanks


I installed nrpe agents on the redhat linux server
I attaching the both files
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error message using NRPE

Post by dwhitfield »

Do you have some files in /usr/local/nagios/etc/nrpe? You don't have any commands in your nrpe.cfg. In your nrpe.cfg, change debug=0 to debug=1.

Also, what's the output of ll /usr/local/nagios/libexec and grep nrpe /var/log/messages. Please put the output in code blocks or attach a file.

Lastly, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

You can also generate a profile manually using the script at /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh

That should generate a profile in /usr/local/nagiosxi/var/components/ which you can get off the server with an application such as FileZilla.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.

If you get an error that PROFILE BUILD FAILED, please see https://support.nagios.com/kb/article.p ... ategory=44
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Error message using NRPE

Post by DOkuwa »

What do i need to get in this directory /usr/local/nagios/etc/nrpe and what command - you don't have any commands in your nrpe.cfg. In your nrpe.cfg,
output of ls -al usr/local/nagios/libexec is in attachment and there was no thing from grep nrpe /var/log/messages
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error message using NRPE

Post by dwhitfield »

What's the output of ll /usr/local/nagios/etc/nrpe? If there isn't a common.cfg, then you need to add commands to your nrpe.cfg. You may need to add them anyway. If you have the common.cfg, can you send it?

All of your plugins are owned by root, so that could potentially be a problem. Please see if the following command resolves the issue for you: chown -r nagios.nagios /usr/local/nagios/libexec

What's the output of ps -aef | grep nrpe?

I would also suggest taking a look at https://support.nagios.com/kb/article/n ... d-612.html
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Error message using NRPE

Post by DOkuwa »

Code: Select all

root@rhes7 etc]# ls -al
total 312
drwsrwsr-x 8 apache nagios  4096 Dec 28 18:08 .
drwxr-xr-x 9 root   root    4096 Oct 17 10:29 ..
drwxrwsr-x 3 apache nagios 20480 Oct 19 15:24 cfgprep
-rwxrwxr-x 1 apache nagios   744 Oct 17 10:29 cgi.cfg
-rw-rw-r-- 1 apache nagios 37009 Dec 28 15:03 commands.cfg
-rw-rw-r-- 1 apache nagios  2287 Dec 28 15:03 contactgroups.cfg
-rw-rw-r-- 1 apache nagios 21072 Dec 28 15:03 contacts.cfg
-rw-rw-r-- 1 apache nagios  1675 Dec 28 15:03 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios   817 Dec 28 15:03 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios   819 Dec 28 15:03 hostescalations.cfg
-rw-rw-r-- 1 apache nagios   837 Dec 28 15:03 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios  2630 Dec 28 15:03 hostgroups.cfg
drwsrwsr-x 2 apache nagios 20480 Dec 28 15:03 hosts
-rw-rw-r-- 1 apache nagios 27758 Dec 28 15:03 hosttemplates.cfg
drwsrwsr-x 2 apache nagios  4096 Dec 28 15:03 import
-rwxrwxr-x 1 apache nagios  5670 Oct 17 10:29 nagios.cfg
-rw-rw-r-- 1 apache nagios  2229 Oct 17 10:29 ndo2db.cfg
-rw-rw-r-- 1 apache nagios  4827 Oct 17 10:29 ndomod.cfg
-rw-rw-r-- 1 apache nagios  7988 Dec 28 18:08 nrpe.cfg
-rw-rw-r-- 1 apache nagios  5345 Oct 17 10:29 nsca.cfg
drwxrwsr-x 4 apache nagios  4096 Oct 19 15:24 pnp
-rw-rw-r-- 1 apache nagios     0 Oct 18 15:52 recurringdowntime.cfg
-rwxrwxr-x 1 apache nagios   210 Oct 17 10:29 resource.cfg
-rw-rw-r-- 1 apache nagios  1627 Oct 17 10:29 send_nsca.cfg
-rw-rw-r-- 1 apache nagios   823 Dec 28 15:03 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios   825 Dec 28 15:03 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios   843 Dec 28 15:03 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios  2036 Dec 28 15:03 servicegroups.cfg
drwsrwsr-x 2 apache nagios 20480 Dec 28 15:03 services
-rw-rw-r-- 1 apache nagios 41326 Dec 28 15:03 servicetemplates.cfg
drwsrwsr-x 2 apache nagios  4096 Oct 19 15:24 static
-rw-rw-r-- 1 apache nagios  4538 Dec 28 15:03 timeperiods.cfg

Code: Select all

[root@rhes7 etc]# ps -aef | grep nrpe
root     27763 23055  0 18:58 pts/0    00:00:00 grep --color=auto nrpe

Last edited by dwhitfield on Tue Jan 02, 2018 5:57 pm, edited 1 time in total.
Reason: fixed code blocks
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Error message using NRPE

Post by npolovenko »

@DOkuwa, Are those plugins from your previous post installed on the Nagios server or on the remote server?
Also, I would like to see the NRPE commands definitions on the remote server. Please upload the contents of this folder: /usr/local/nagios/etc/nrpe in a zip file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Error message using NRPE

Post by DOkuwa »

Code: Select all

[root@rhes7-0 dokuwa]# cd /usr/local/nagios/etc/nrpe
[root@rhes7-0 nrpe]# ls -al
total 16
drwxr-xr-x 2 nagios nagios 4096 Dec 28 14:38 .
drwxrwxr-x 3 nagios nagios 4096 Dec 28 14:38 ..
-rw-r--r-- 1 nagios nagios  687 Dec 28 14:38 asterisk.cfg
-rw-r--r-- 1 nagios nagios 1309 Dec 28 14:38 common.cfg
[root@rhes7-0 nrpe]#
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error message using NRPE

Post by dwhitfield »

Please attach the common.cfg.
Locked