NRPE: Unable to read output in Solaris 10

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.
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

NRPE: Unable to read output in Solaris 10

Post by rahul.srivastava1 »

Hi,

Was the issue, described here: https://support.nagios.com/forum/viewto ... =6&t=34463 resolved? I am looking out for further resolution.
I am getting the same error when i am seeing the nagios dashboard.
When i run check_load manually on my remote host, it works properly.

root@ssbpmutu:/usr/local/nagios# /usr/local/nagios/libexec/check_load -w 5,10,15 -c 20,25,30
OK - load average: 0.23, 0.27, 0.28|load1=0.230;5.000;20.000;0; load5=0.270;10.000;25.000;0; load15=0.280;15.000;30.000;0;

But on the nagiso dashboard, i see NRPE: Unable to read output.
Can you help further? I checked all the things that were suggested on this case earlier.

Rahul
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NRPE: Unable to read output in Solaris 10

Post by dwhitfield »

Have you run through https://assets.nagios.com/downloads/nag ... utions.pdf ? I notice that was not given in the thread to which you link.

What version of NRPE are you running? Can you post your nrpe.cfg in code blocks, or attach it as a file? Thanks!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

NRPE:Unable to read output file

Post by rahul.srivastava1 »

Hi,

I have a included the below command in the nrpe.cfg file on my remote host.

command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20

When i run this command manually, it is successful.

root@ssbpmutu:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
OK - load average: 1.29, 0.61, 0.43|load1=1.290;15.000;30.000;0; load5=0.610;10.000;25.000;0; load15=0.430;5.000;20.000;0;

But on the nagios dashboard, it says NRPE:Unable to read output file.
I have checked the permissions for check_load plugins and it is with the user nagios and group nagios.
I have also the 5666 port open between remote server and nagios server.
I am attaching the nrpe.cfg file from the remote server.
Can you advice what needs to be done to fix this?

Regards,
Rahul
Attachments
nrpe.cfg
(7.94 KiB) Downloaded 209 times
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NRPE:Unable to read output file

Post by dwhitfield »

I see you have a similar thread in the Nagios XI forum: https://support.nagios.com/forum/viewto ... 25#p211225

Are you using Core or XI? Once I know, I will merge the threads, unless this is a separate issue than your Solaris issue. Thanks!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE:Unable to read output file

Post by rahul.srivastava1 »

Hi,

I am using Nagios core.
And yeah that is same query is asked in the other thread. Both the issues are same.

Regards,
Rahul
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE: Unable to read output in Solaris 10

Post by tgriep »

Usually the error you are receiving could also be caused by a permission problem.
When a plugin id run on the remote server, it is run as the nagios user so that user needs executable permissions set on all of the plugins in the /usr/local/nagios/libexec/ folder on the remote server.
Try running the following on the remote server to setup the permissions.

Code: Select all

chmod ugo+x /usr/local/nagios/libexec/*
Try the test again, if it fails, run the following on the remote server and post the output.

Code: Select all

su nagios
/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
ls -l /usr/local/nagios/libexec/
Be sure to check out our Knowledgebase for helpful articles and solutions!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output in Solaris 10

Post by rahul.srivastava1 »

Hi,

1. I gave the execute permission to all the plugins as you suggested.

root@ssbpmutu:/usr/local/nagios/libexec# chmod ugo+x /usr/local/nagios/libexec/*

2. root@ssbpmutu:/usr/local/nagios/libexec# su - nagios
-bash-3.2$ id
uid=634(nagios) gid=1032(nagios)

3. -bash-3.2$ /usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
OK - load average: 0.21, 0.27, 0.28|load1=0.210;15.000;30.000;0; load5=0.270;10.000;25.000;0; load15=0.280;5.000;20.000;0;

4. root@ssbpmutu:/usr/local/nagios/libexec# ls -l /usr/local/nagios/libexec/
total 13812
-rwxr-xr-x 1 nagios nagios 292348 May 27 2015 check_apt
-rwxr-xr-x 1 nagios nagios 2258 May 27 2015 check_breeze
-rwxr-xr-x 1 nagios nagios 130776 May 27 2015 check_by_ssh
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_clamd -> check_tcp
-rwxr-xr-x 1 nagios nagios 103196 May 27 2015 check_cluster
-rwxr-xr-x 1 nagios nagios 125940 May 27 2015 check_dig
-rwxr-xr-x 1 nagios nagios 335688 May 27 2015 check_disk
-rwxr-xr-x 1 nagios nagios 9290 May 27 2015 check_disk_smb
-rwxr-xr-x 1 nagios nagios 138044 May 27 2015 check_dns
-rwxr-xr-x 1 nagios nagios 67328 May 27 2015 check_dummy
-rwxr-xr-x 1 nagios nagios 3350 May 27 2015 check_file_age
-rwxr-xr-x 1 nagios nagios 6316 May 27 2015 check_flexlm
-rwxr-xr-x 1 nagios nagios 129736 May 27 2015 check_fping
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_ftp -> check_tcp
-rwxr-xr-x 1 nagios nagios 125096 May 27 2015 check_hpjd
-rwxr-xr-x 1 nagios nagios 445000 May 27 2015 check_http
-rwxr-xr-x 1 nagios nagios 15124 May 27 2015 check_ifoperstatus
-rwxr-xr-x 1 nagios nagios 12601 May 27 2015 check_ifstatus
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_imap -> check_tcp
-rwxr-xr-x 1 nagios nagios 6888 May 27 2015 check_ircd
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_jabber -> check_tcp
-rwxr-xr-x 1 nagios nagios 281 Jan 25 11:10 check_jmx
-rwxr-xr-x 1 nagios nagios 12925 Jan 25 11:14 check_jmx.jar
-rwxrwxrwx 1 nagios nagios 112144 May 27 2015 check_load
-rwxr-xr-x 1 nagios nagios 5983 May 27 2015 check_log
-rwxr-xr-x 1 nagios nagios 19903 May 27 2015 check_mailq
-rwxr-xr-x 1 nagios nagios 107156 May 27 2015 check_mrtg
-rwxr-xr-x 1 nagios nagios 106548 May 27 2015 check_mrtgtraf
-rwxr-xr-x 1 nagios nagios 133592 May 27 2015 check_mysql
-rwxr-xr-x 1 nagios nagios 126716 May 27 2015 check_mysql_query
-rwxr-xr-x 1 nagios nagios 113316 May 27 2015 check_nagios
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_nntp -> check_tcp
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_nntps -> check_tcp
-rwxrwxr-x 1 nagios nagios 36932 Feb 2 09:00 check_nrpe
-rwxr-xr-x 1 nagios nagios 131260 May 27 2015 check_nt
-rwxr-xr-x 1 nagios nagios 133736 May 27 2015 check_ntp
-rwxr-xr-x 1 nagios nagios 128916 May 27 2015 check_ntp_peer
-rwxr-xr-x 1 nagios nagios 126744 May 27 2015 check_ntp_time
-rwxr-xr-x 1 nagios nagios 149552 May 27 2015 check_nwstat
-rwxr-xr-x 1 nagios nagios 8781 May 27 2015 check_oracle
-rwxr-xr-x 1 nagios nagios 120092 May 27 2015 check_overcr
-rwxr-xr-x 1 nagios nagios 125220 May 27 2015 check_pgsql
-rwxr-xr-x 1 nagios nagios 135268 May 27 2015 check_ping
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_pop -> check_tcp
-rwxr-xr-x 1 nagios nagios 310516 May 27 2015 check_procs
-rwxr-xr-x 1 nagios nagios 117468 May 27 2015 check_real
-rwxr-xr-x 1 nagios nagios 9582 May 27 2015 check_rpc
-rwxr-xr-x 1 nagios nagios 1455 May 27 2015 check_sensors
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_simap -> check_tcp
-rwxr-xr-x 1 nagios nagios 378900 May 27 2015 check_smtp
-rwxr-xr-x 1 nagios nagios 353280 May 27 2015 check_snmp
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_spop -> check_tcp
-rwxr-xr-x 1 nagios nagios 114752 May 27 2015 check_ssh
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_ssmtp -> check_tcp
-rwxr-xr-x 1 nagios nagios 193728 May 27 2015 check_tcp
-rwxr-xr-x 1 nagios nagios 116640 May 27 2015 check_time
lrwxrwxrwx 1 nagios app 9 May 27 2015 check_udp -> check_tcp
-rwxr-xr-x 1 nagios nagios 125580 May 27 2015 check_ups
-rwxr-xr-x 1 nagios nagios 100616 May 27 2015 check_users
-rwxr-xr-x 1 nagios nagios 2937 May 27 2015 check_wave
drwxrwxrwx 2 nagios nagios 7 Jan 30 04:37 nagios-jmx-plugin-1.2.3
-rwxr-xr-x 1 nagios nagios 97144 May 27 2015 negate
-rwxr-xr-x 1 nagios nagios 94288 May 27 2015 urlize
-rwxr-xr-x 1 nagios nagios 1912 May 27 2015 utils.pm
-rwxr-xr-x 1 nagios nagios 2791 May 27 2015 utils.sh


This is working while i am running it manually.
But on the dashboard i still see the error.
Attached PNG image from dashboard.

Regards,
Rahul
Attachments
dashboard.PNG
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE: Unable to read output in Solaris 10

Post by tgriep »

A lot of the errors are for commands that are not defined in the nrpe.cfg file so can you verify that you are loading the correct one?
If the nrpe.cfg file doesn't have the commands defined, put them in there and restart the nrpe service.
Also, can you run the following and post the output?

Code: Select all

inetadm
find / -name nrpe.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output in Solaris 10

Post by rahul.srivastava1 »

Hi,

I am attaching the latest nrpe.cfg. I have included the command and restarted the nrpe service.

Also, here is the info that you asked.

1. root@ssbpmutu:/usr/local/nagios/etc# inetadm
ENABLED STATE FMRI
enabled online svc:/application/x11/xfs:default
disabled disabled svc:/application/x11/xvnc-inetd:default
enabled online svc:/application/font/stfsloader:default
enabled offline svc:/application/print/rfc1179:default
enabled online svc:/network/cde-spc:default
disabled disabled svc:/network/tname:default
enabled online svc:/network/stlisten:default
disabled disabled svc:/network/swat:default
enabled online svc:/network/shell:default
disabled disabled svc:/network/shell:kshell
disabled disabled svc:/network/security/ktkt_warn:default
disabled disabled svc:/network/security/krb5_prop:default
disabled disabled svc:/network/uucp:default
disabled disabled svc:/network/ftp:default
enabled online svc:/network/rpc/smserver:default
disabled disabled svc:/network/rpc/mdcomm:default
enabled online svc:/network/rpc/cde-ttdbserver:tcp
enabled online svc:/network/rpc/rusers:default
enabled online svc:/network/rpc/gss:default
disabled disabled svc:/network/rpc/rex:default
disabled disabled svc:/network/rpc/wall:default
disabled disabled svc:/network/rpc/meta:default
disabled disabled svc:/network/rpc/spray:default
disabled disabled svc:/network/rpc/metamh:default
disabled disabled svc:/network/rpc/ocfserv:default
enabled online svc:/network/rpc/cde-calendar-manager:default
disabled disabled svc:/network/rpc/metamed:default
enabled online svc:/network/rpc/rstat:default
disabled disabled svc:/network/comsat:default
disabled disabled svc:/network/nfs/rquota:default
disabled disabled svc:/network/daytime:dgram
disabled disabled svc:/network/daytime:stream
disabled disabled svc:/network/talk:default
disabled disabled svc:/network/time:dgram
disabled disabled svc:/network/time:stream
enabled online svc:/network/stdiscover:default
disabled disabled svc:/network/echo:dgram
disabled disabled svc:/network/echo:stream
disabled disabled svc:/network/chargen:dgram
disabled disabled svc:/network/chargen:stream
disabled disabled svc:/network/discard:dgram
disabled disabled svc:/network/discard:stream
disabled disabled svc:/network/login:eklogin
disabled disabled svc:/network/login:klogin
disabled disabled svc:/network/login:rlogin
enabled online svc:/network/finger:default
disabled disabled svc:/network/rexec:default
disabled disabled svc:/network/telnet:default
enabled online svc:/network/rpc-100235_1/rpc_ticotsord:default
enabled online svc:/network/nrpe/tcp:default

2. root@ssbpmutu:/usr/local/nagios/etc# find / -name nrpe.cfg
/usr/local/nagios/etc/nrpe.cfg
/apps/nagios/etc/nrpe.cfg
/apps/nagios/src/nrpe-2.15/sample-config/nrpe.cfg
Attachments
nrpe.cfg
(8.16 KiB) Downloaded 220 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE: Unable to read output in Solaris 10

Post by tgriep »

Did the errors go away after adding the missing commands?
In the last post, which nrpe.cfg file is it?

Code: Select all

/usr/local/nagios/etc/nrpe.cfg
or
/apps/nagios/etc/nrpe.cfg
If you are still seeing the errors, can you run the following and post the output?

Code: Select all

inetadm -l svc:/network/nrpe/tcp:default
If the errors changed, please post them as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked