Results 1 to 5 of 5
-
11-23-2009, 08:58 AM #1
Web Hosting Evangelist
- Join Date
- Apr 2006
- Posts
- 515
Nagios & Exim: check_eximmailqueue not working remotely
Hello there,
I'm running RHEL 5.4 + latest cPanel 11.24 release + Nagios 3.2
I figured out how to setup nagios and nrpe to check almost everything.. the only problem i have right now is that I wanted to monitor a remote exim exim mail queue. So, downloaded v. 1.3 from this plugin: http://exchange.nagios.org/directory...lqueue/details
Configured plugin check at Nagios server:
On the remote server that it should check, got this at nrpe.cnf:Code:define service{ use generic-service host_name server_hostname service_description Mail_Queue check_command check_nrpe!check_eximmailqueue }
SOME TESTS ***Code:command[check_eximmailqueue]=/usr/local/nagios/libexec/check_eximmailqueue -w 20 -c 100
Nagios server, executing the plugin manually:
Exim server, manual check:Code:[[email protected]:~]../../libexec/check_nrpe -H 91.121.222.47 -p 5666 -c check_eximmailqueue Mailqueue WARNING - query returned no output!
The author saids this about the error "Mailqueue WARNING - query returned no output!":Code:[[email protected]:~]/usr/local/nagios/libexec/check_eximmailqueue -w 20 -c 100 audit_log_user_command(): Connection refused Mailqueue OK - 7 messages on queue
Exim group, as far as I can tell, is root, so did:Note also, depending on your config, the nagios user will probably be needed to be added to the exim group on the machine you are checking for this script to function correctly. If the script is not run with rights to access the mail queue it will return the following "Mailqueue WARNING - query returned no output!"
Am I missing something?Code:usermod -g root nagios
Thanks!
-
12-17-2009, 06:55 PM #2
Newbie
- Join Date
- Dec 2009
- Location
- Colorado
- Posts
- 15
I don't have the answer for you, but you may be missing this key piece of info:
the nagios check and the nagios server don't run as root.
The nagios plugin on the host is probably running as the nrpe? user. Try su'ing to that and then checking, and possibly adding nrpe to the nagios group.
Also on the nagios server the nagios checks are probably running as the nagios user. I don't think this is the problem but you should keep it in mind.
<< Signatures to be setup in profile >>Last edited by Christian; 12-22-2009 at 04:47 PM.
-
12-17-2009, 06:58 PM #3
Engineer
- Join Date
- Jan 2005
- Location
- Scotland, UK
- Posts
- 2,616
You should remove nagios from the root user and manually check the plugin,
su nagios
Then run
/usr/local/nagios/libexec/check_eximmailqueue -w 20 -c 100
It should show you the problem. Likely have to setup /usr/local/nagios/libexec/check_eximmailqueue to the sudoers then "sudo /usr/local/nagios/libexec/check_eximmailqueue"Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: [email protected]
-
12-17-2009, 06:59 PM #4
'audit_log_user_command(): Connection refused'
your going to need to get rid of that.
Also you should be using sudoersSteven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
12-17-2009, 08:26 PM #5
Aspiring Evangelist
- Join Date
- Nov 2005
- Posts
- 352
When it comes to issues with Nagios plugins and NRPE, the two most common issues are permissions (wrong user/group or not enough access) and paths (not specifying the full command line in a script can fail if the user the script is running as doesn't have enough entries in their path).
Similar Threads
-
Does anybody used spamguard? Is it working on exim?
By 19leo19 in forum Hosting Security and TechnologyReplies: 0Last Post: 01-16-2006, 08:41 AM -
Exim Stoped working
By WebHostingNeeds in forum Hosting Security and TechnologyReplies: 5Last Post: 12-07-2005, 08:00 PM -
Exim not working properly
By vpsfusion in forum Hosting Security and TechnologyReplies: 10Last Post: 03-27-2005, 12:17 AM -
Nagios isn't working after cnfiguration !!!
By atul in forum Hosting Security and TechnologyReplies: 11Last Post: 08-23-2004, 01:41 AM -
Exim no longer working
By MStar in forum Hosting Security and TechnologyReplies: 2Last Post: 01-25-2004, 10:57 PM


Reply With Quote




