NRPE: Unable to read output
NRPE: Unable to read output
I have two nrpe clients
[root@blah2 etc]# /usr/bin/sudo /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
FILE_AGE OK: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 1 seconds old and 94518751 bytes
[root@blah1 etc]# /usr/bin/sudo /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
FILE_AGE OK: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 1 seconds old and 96979751 bytes
command[check_nnsjp_oc4j_file]=/usr/bin/sudo /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
root@server:/usr/lib/nagios/plugins# ./check_nrpe -H xx.xx.xx.2 -c check_nnsjp_oc4j_file
NRPE: Unable to read output
root@server:/usr/lib/nagios/plugins# ./check_nrpe -H xx.xx.xx.1 -c check_nnsjp_oc4j_file
FILE_AGE OK: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 0 seconds old and 97044990 bytes
on both servers
-rwsr-sr-x 1 root root 3050 Dec 15 2013 check_file_age
in sudoers file -- nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_file_age *
what else can be wrong with the server throwing NRPE: Unable to read output
[root@blah2 etc]# /usr/bin/sudo /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
FILE_AGE OK: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 1 seconds old and 94518751 bytes
[root@blah1 etc]# /usr/bin/sudo /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
FILE_AGE OK: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 1 seconds old and 96979751 bytes
command[check_nnsjp_oc4j_file]=/usr/bin/sudo /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
root@server:/usr/lib/nagios/plugins# ./check_nrpe -H xx.xx.xx.2 -c check_nnsjp_oc4j_file
NRPE: Unable to read output
root@server:/usr/lib/nagios/plugins# ./check_nrpe -H xx.xx.xx.1 -c check_nnsjp_oc4j_file
FILE_AGE OK: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 0 seconds old and 97044990 bytes
on both servers
-rwsr-sr-x 1 root root 3050 Dec 15 2013 check_file_age
in sudoers file -- nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_file_age *
what else can be wrong with the server throwing NRPE: Unable to read output
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: NRPE: Unable to read output
selinux is well known for causing that problem...
Is NRPE working at all? What if you just do
Is NRPE working at all? What if you just do
Code: Select all
root@server:/usr/lib/nagios/plugins# ./check_nrpe -H xx.xx.xx.2Re: NRPE: Unable to read output
It is working, I get NRPE 2.15 version backjdalrymple wrote:selinux is well known for causing that problem...
Is NRPE working at all? What if you just do
Code: Select all
root@server:/usr/lib/nagios/plugins# ./check_nrpe -H xx.xx.xx.2
SELinux is disabled
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Unable to read output
Can you please post your nrpe.cfg file on the remote server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE: Unable to read output
Attached the NRPE client config. Please note: this it is compiled not accept command arguments, therefore arguments are hard codedBox293 wrote:Can you please post your nrpe.cfg file on the remote server.
I will be changing this in the future, but for now I am trying to fix this particular problem
- Attachments
-
nrpe.cfg- (10 KiB) Downloaded 122 times
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Unable to read output
Does the nagios user have permission to access the plugins and file?
You might need to enable debugging on the remote server.
Type vi /etc/rsyslogd.conf and press Enter
Type /var/log/messages and press Enter
This takes you to the line in the config file we are after, it will look like:
We need to add ";daemon.debug" to the line:
Save and exit
Type service rsyslog restart and press Enter
Type sed -i 's/^debug=.*/debug=1/g' /usr/local/nagios/etc/nrpe.cfg and press Enter
Type service xinetd restart and press Enter
Now you can watch the NRPE debug informations sent to /var/log/messages
Code: Select all
ls -la /usr/local/nagios/libexec/check_file_age
/u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.outType vi /etc/rsyslogd.conf and press Enter
Type /var/log/messages and press Enter
This takes you to the line in the config file we are after, it will look like:
Code: Select all
*.info;mail.none;authpriv.none;cron.none /var/log/messagesCode: Select all
*.info;mail.none;authpriv.none;cron.none;daemon.debug /var/log/messagesType service rsyslog restart and press Enter
Type sed -i 's/^debug=.*/debug=1/g' /usr/local/nagios/etc/nrpe.cfg and press Enter
Type service xinetd restart and press Enter
Now you can watch the NRPE debug informations sent to /var/log/messages
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE: Unable to read output
it can run this
sudo -su nagios /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
FILE_AGE CRITICAL: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 997 seconds old and 135995951 bytes
sudo -su nagios /usr/local/nagios/libexec/check_file_age -c 30 -f /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out
FILE_AGE CRITICAL: /u01/app/oracle/product/10gr202/j2ee/nns_jq/log/nns_jq_default_island_1/oc4j.out is 997 seconds old and 135995951 bytes
Re: NRPE: Unable to read output
I also had debug turned on in the config for nrpe. That's all I got upon executing the command
Apr 15 17:11:34 ...a2 nrpe[11676]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Apr 15 17:11:34 ...a2 xinetd[4177]: EXIT: nrpe status=0 pid=11676 duration=0(sec)
Apr 15 17:11:34 ...a2 nrpe[11676]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Apr 15 17:11:34 ...a2 xinetd[4177]: EXIT: nrpe status=0 pid=11676 duration=0(sec)
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Unable to read output
Did you do the syslog steps as well? Without these you won't get much info.stecino wrote:Apr 15 17:11:34 ...a2 nrpe[11676]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Apr 15 17:11:34 ...a2 xinetd[4177]: EXIT: nrpe status=0 pid=11676 duration=0(sec)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.