Difference between check_multi output on host and output received by chech_by_ssh

Marc Powell lists at xodus.org
Wed Oct 27 13:39:42 CEST 2010


On Oct 27, 2010, at 4:04 AM, Tim Edwards wrote:

snip...

> However when I run it from the nagios server I don't see the output from
> our sendmail mailqueue check, which is the last check listed in our
> /usr/local/nagios/checks/systemhealth.cmd file:
> 
> <td></td><td></td><td>system_mailqueue</td><td></td></tr></table></div></div>|check_multi::check_multi::plugins=11
> time=0.309348 system_load::check_load::load1=0.000;10.000;20.000;0;
> load5=0.000;8.000;16.000;0; load15=0.000;6.000;12.000;0;
> system_rootdisk::check_disk::/=1786MB;9420;9717;0;9916
> system_allpartitions::default::/=1786MB;9420;9717;0;9916
> /diska=150MB;9575;9877;0;10079 system_swap::check_swap::swap=0MB;0;0;0;0
> system_users::check_users::users=2;15;25;0
> system_time::check_ntp_time::offset=-0.002565s;60.000000;120.000000;
> 
> Full commands and output at http://pastebin.com/vEWBa033
> 
> Anyone have any ideas what could be causing the difference?

For your local test, you're running check_multi as 'root', which has permission to access sendmail's queue, whereas when nagios does it, it's being run as the 'nagios' user, which does not have access?

Your likely best course of action is change check_mailq to use sudo when calling /usr/bin/mailq and configure sudo to permit it. Google has quite a bit of info on 'nagios check_mailq permissions' but this page looks useful to you --

http://www.rickwargo.com/category/nagios/

Note also that you'll need to set '!requiretty' in sudoers as well.

--
Marc


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list