Return code of 13 is out of bounds

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.
Giperboloid
Posts: 21
Joined: Sat May 14, 2016 5:47 am

Re: Return code of 13 is out of bounds

Post by Giperboloid »

tgriep wrote:On your remote server, can you run the following and post the output?
ls -l /usr/lib64/nagios/plugins

The plugins may already be installed on your remote server, as the above command will verify that.

Code: Select all

итого 2784
-rwxr-xr-x 1 root root     2251 Сен 11  2015 check_breeze
-rwxr-xr-x 1 root root    66632 Сен 11  2015 check_by_ssh
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_clamd -> check_tcp
-rwxr-xr-x 1 root root    50008 Сен 11  2015 check_cluster
-rwsr-x--- 1 root nagios  64976 Сен 11  2015 check_dhcp
-rwxr-xr-x 1 root root    62272 Сен 11  2015 check_dig
-rwxr-xr-x 1 root root    70104 Сен 11  2015 check_disk
-rwxr-xr-x 1 root root     9289 Сен 11  2015 check_disk_smb
-rwxr-xr-x 1 root root    71560 Сен 11  2015 check_dns
-rwxr-xr-x 1 root root    35360 Сен 11  2015 check_dummy
-rwxr-xr-x 1 root root     3349 Сен 11  2015 check_file_age
-rwxr-xr-x 1 root root     6315 Сен 11  2015 check_flexlm
-rwsr-x--- 1 root nagios  64608 Сен 11  2015 check_fping
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_ftp -> check_tcp
-rwxr-xr-x 1 root root    54464 Сен 11  2015 check_game
-rwxr-xr-x 1 root root    61848 Сен 11  2015 check_hpjd
-rwxr-xr-x 1 root root   140696 Сен 11  2015 check_http
-rwsr-x--- 1 root nagios  69696 Сен 11  2015 check_icmp
-rwsr-x--- 1 root nagios  53360 Сен 11  2015 check_ide_smart
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_imap -> check_tcp
-rwxr-xr-x 1 root root     6887 Сен 11  2015 check_ircd
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_jabber -> check_tcp
-rwxr-xr-x 1 root root    63440 Сен 11  2015 check_ldap
lrwxrwxrwx 1 root root       10 Мар 20 23:26 check_ldaps -> check_ldap
-rwxr-xr-x 1 root root    54424 Сен 11  2015 check_load
-rwxr-xr-x 1 root root     5989 Сен 11  2015 check_log
-rwxr-xr-x 1 root root    21480 Сен 11  2015 check_mailq
-rwxr-xr-x 1 root root    53464 Сен 11  2015 check_mrtg
-rwxr-xr-x 1 root root    53200 Сен 11  2015 check_mrtgtraf
-rwxr-xr-x 1 root root    78960 Сен 11  2015 check_mysql
-rwxr-xr-x 1 root root    73944 Сен 11  2015 check_mysql_query
-rwxr-xr-x 1 root root    54928 Сен 11  2015 check_nagios
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_nntp -> check_tcp
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_nntps -> check_tcp
-rwxr-xr-x 1 root root    69904 Сен 11  2015 check_nt
-rwxr-xr-x 1 root root    67096 Сен 11  2015 check_ntp
-rwxr-xr-x 1 root root    66328 Сен 11  2015 check_ntp_peer
-rwxr-xr-x 1 root root    14283 Сен 11  2015 check_ntp.pl
-rwxr-xr-x 1 root root    62968 Сен 11  2015 check_ntp_time
-rwxr-xr-x 1 root root    78248 Сен 11  2015 check_nwstat
-rwxr-xr-x 1 root root     8779 Сен 11  2015 check_oracle
-rwxr-xr-x 1 root root    59448 Сен 11  2015 check_overcr
-rwxr-xr-x 1 root root    72960 Сен 11  2015 check_pgsql
-rwxr-xr-x 1 root root    68184 Сен 11  2015 check_ping
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_pop -> check_tcp
-rwxr-xr-x 1 root root    66352 Сен 11  2015 check_procs
-rwxr-xr-x 1 root root    58696 Сен 11  2015 check_real
-rwxr-xr-x 1 root root     9581 Сен 11  2015 check_rpc
-rwxr-xr-x 1 root root     1453 Сен 11  2015 check_sensors
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_simap -> check_tcp
-rwxr-xr-x 1 root root    89048 Сен 11  2015 check_smtp
-rwxr-xr-x 1 root root   109680 Сен 11  2015 check_snmp
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_spop -> check_tcp
-rwxr-xr-x 1 root root    56488 Сен 11  2015 check_ssh
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_ssmtp -> check_tcp
-rwxr-xr-x 1 root root    52440 Сен 11  2015 check_swap
-rwxr-xr-x 1 root root    80048 Сен 11  2015 check_tcp
-rwxr-xr-x 1 root root    57704 Сен 11  2015 check_time
lrwxrwxrwx 1 root root        9 Мар 20 23:26 check_udp -> check_tcp
-rwxr-xr-x 1 root root    63560 Сен 11  2015 check_ups
-rwxr-xr-x 1 root root    48168 Сен 11  2015 check_users
-rwxr-xr-x 1 root root     2936 Сен 11  2015 check_wave
drwxr-xr-x 2 root root     4096 Авг 31  2013 eventhandlers
-rw-r--r-- 1 root root        0 Май 24 01:34 info.txt
-rwxr-xr-x 1 root root    49376 Сен 11  2015 negate
-rwxr-xr-x 1 root root    46352 Сен 11  2015 urlize
-rw-r--r-- 1 root root     2065 Сен 11  2015 utils.pm
-rwxr-xr-x 1 root root     2791 Сен 11  2015 utils.sh
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Return code of 13 is out of bounds

Post by tgriep »

On your remote server, can you run the following and post the output?
ls -l /usr/lib64/nagios/plugins

The plugins may already be installed on your remote server, as the above command will verify that.

To check your remote server, you will have to use the check_nrpe command in your Nagios server with the command that is defined in the nrpe.cfg file.
For example, to run the check_load on the remote server, you would run this on the nagios server.

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_load

xxx.xxx.xxx.xxx would be the IP address of the remote server.
This will run the command on the remote server and return the results to the nagios server.

But, it looks like you do not have the check_nrpe command on your Nagios server, take a look at this doc for more information on how to do that.
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Giperboloid
Posts: 21
Joined: Sat May 14, 2016 5:47 am

Re: Return code of 13 is out of bounds

Post by Giperboloid »

I've installed nrpe according to https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
But I don't have the file in accord to this test:
Image
I have this:
Image
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Return code of 13 is out of bounds

Post by tgriep »

Try installing NRPE from source and see if that works.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Return code of 13 is out of bounds

Post by Box293 »

This guide shows you how to just install the check_nrpe plugin:

http://sites.box293.com/nagios/guides/n ... centos-6-5
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Giperboloid
Posts: 21
Joined: Sat May 14, 2016 5:47 am

Re: Return code of 13 is out of bounds

Post by Giperboloid »

On the monitoring server (Ubuntu 14.04) I've installed nrpe with ./configure --disable-ssl, because make all didn't work for me:
Image
On the remote server (CentOS 6.5) I installed nrpe without problems and the file check_nrpe appeared. But when I try to launch check_nrpe from this server to the monitoring one it says:
Image
And when I try to launch check_nrpe from monitoring server to the remote one it says:
Image
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Return code of 13 is out of bounds

Post by tgriep »

If you didn't install NRPE with SSL enabled, then you have to add the -n option to the check_nrpe command which disables the use of SSL.
Here is the check_nrpe usage
Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.
Here is an example of how you would run the command.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.2 -n
Also, take a look at the NRPE Troubleshooting guide for help.
https://assets.nagios.com/downloads/nag ... utions.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Giperboloid
Posts: 21
Joined: Sat May 14, 2016 5:47 am

Re: Return code of 13 is out of bounds

Post by Giperboloid »

Code: Select all

-n
didn't help.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Return code of 13 is out of bounds

Post by rkennedy »

Please show us the full input / output.

When you run the command from the Nagios server, look at your /var/log/messages for a corresponding error message, and post that for us as well.
Former Nagios Employee
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Return code of 13 is out of bounds

Post by tgriep »

Take a look at the troubleshooting guide but it looks like the NRPE agent isn't running on the remote servers.
Can you verify that the NRPE Agent is configured to run on those servers.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked