Page 1 of 2
Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Mon Dec 10, 2012 12:28 pm
by jwestlake
Hi all,
I've got an Ubuntu 10.04.4 LTS VM that I've installed the agent on and that went without a problem. Most of the monitored services are working fine, but I have 3 that report "Unable to read output":
Cron Scheduling Daemon Critical 1h 30m 26s 5/5 12/10/2012 12:09:15 NRPE: Unable to read output
MySQL Server Critical 1h 28m 15s 5/5 12/10/2012 12:06:26 NRPE: Unable to read output
SSH Server Critical 1h 32m 33s 5/5 12/10/2012 12:07:08 NRPE: Unable to read output
all of which are running on the server. The commands all give the same result when run manually:
[root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H servername.domain.com -c check_init_service -a 'ssh'
NRPE: Unable to read output
[root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H servername.domain.com -c check_init_service -a 'cron'
NRPE: Unable to read output
[root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H servername.domain.com -c check_init_service -a 'mysqld'
NRPE: Unable to read output
Server is running XI 2012R1.3 from the source installer on CentOS 6.3.
Any thoughts here? Thanks!
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Mon Dec 10, 2012 12:45 pm
by slansing
Can you post what permissions those plugins have? Also, by agent I assume NRPE agent, so could you post a link to the guide you used for installing the NRPE agent on ubuntu?
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 10:58 am
by jwestlake
Sure, on the check_nrpe:
-rwxrwxr-x. 1 nagios nagios 75444 Nov 14 12:43 /usr/local/nagios/libexec/check_nrpe
Yes, that's correct, the nrpe agent installed with instructions at
http://assets.nagios.com/downloads/nagi ... _Agent.pdf.
Thanks!
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 11:30 am
by scottwilkerson
Can you post your /etc/nagios/nrpe.d/common.cfg
Also can you post the output of
Code: Select all
ls -l /usr/lib/nagios/plugins/check_init_service
Thanks
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 11:33 am
by jwestlake
common.cfg:
### GENERIC SERVICES ###
command[check_init_service]=/usr/lib/nagios/plugins/check_init_service $ARG1$
command[check_services]=/usr/lib/nagios/plugins/check_services -p $ARG1$
### MISC SYSTEM METRICS ###
#command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_users]=/usr/lib/nagios/plugins/check_users $ARG1$
command[check_load]=/usr/lib/nagios/plugins/check_load $ARG1$
command[check_swap]=/usr/lib/nagios/plugins/check_swap $ARG1$
command[check_cpu_stats]=/usr/lib/nagios/plugins/check_cpu_stats.sh $ARG1$
command[check_mem]=/usr/lib/nagios/plugins/custom_check_mem $ARG1$
### YUM UPDATES ###
command[check_yum]=/usr/lib/nagios/plugins/check_yum
### DISK ###
command[check_disk]=/usr/lib/nagios/plugins/check_disk $ARG1$
command[check_ide_smart]=/usr/lib/nagios/plugins/check_ide_smart $ARG1$
### PROCESSES ###
command[check_all_procs]=/usr/lib/nagios/plugins/custom_check_procs
command[check_procs]=/usr/lib/nagios/plugins/check_procs $ARG1$
### OPEN FILES ###
command[check_open_files]=/usr/lib/nagios/plugins/check_open_files.pl $ARG1$
### NETWORK CONNECTIONS ###
command[check_netstat]=/usr/lib/nagios/plugins/check_netstat.pl -p $ARG1$ $ARG2$
### APT UPDATES ###
command[check_apt]=/usr/lib/nagios/plugins/check_apt $ARG1$
-rwxr-xr-x 1 root root 4029 2010-07-31 08:10 /usr/lib/nagios/plugins/check_init_service
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 11:44 am
by scottwilkerson
We may need to modify the common.cfg and change
Code: Select all
command[check_init_service]=/usr/lib/nagios/plugins/check_init_service $ARG1$
to this
Code: Select all
command[check_init_service]=sudo /usr/lib/nagios/plugins/check_init_service $ARG1$
Then restart nrpe
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 1:00 pm
by jwestlake
Well, now it went from "critical" status on "Unable to read output" to only "warning" status... progress!
Running it directly from the command line:
sudo /usr/lib/nagios/plugins/check_init_service ssh
ssh start/running, process 787
works fine, so the problem doesn't seem to be w/ the check_init_service itself.
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 1:05 pm
by scottwilkerson
What does the Warning status say?
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Wed Dec 12, 2012 1:12 pm
by jwestlake
Sorry... it still says "Unable to read output", but it went from "critical" red to "warning" yellow in the status. Same error though.
Re: Ubuntu 10.04.4 LTS agent problems: Unable to read output
Posted: Thu Dec 13, 2012 2:15 pm
by scottwilkerson
I believe you may need to add the nagios user to the sudoers file for the plugin /usr/lib/nagios/plugins/check_init_service with NOPASSWD