Results 1 to 5 of 5
  1. #1
    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:

    Code:
    define service{
              use                 generic-service
              host_name           server_hostname
              service_description Mail_Queue
              check_command       check_nrpe!check_eximmailqueue
              }
    On the remote server that it should check, got this at nrpe.cnf:

    Code:
    command[check_eximmailqueue]=/usr/local/nagios/libexec/check_eximmailqueue -w 20 -c 100
    SOME TESTS ***

    Nagios server, executing the plugin manually:

    Code:
    [[email protected]:~]../../libexec/check_nrpe -H 91.121.222.47 -p 5666 -c check_eximmailqueue
    Mailqueue WARNING - query returned no output!
    Exim server, manual check:

    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
    The author saids this about the error "Mailqueue WARNING - query returned no output!":

    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!"
    Exim group, as far as I can tell, is root, so did:

    Code:
    usermod -g root nagios
    Am I missing something?

    Thanks!

  2. #2
    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.

  3. #3
    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]

  4. #4
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,576
    'audit_log_user_command(): Connection refused'

    your going to need to get rid of that.

    Also you should be using sudoers
    Steven 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

  5. #5
    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

  1. Does anybody used spamguard? Is it working on exim?
    By 19leo19 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 01-16-2006, 08:41 AM
  2. Exim Stoped working
    By WebHostingNeeds in forum Hosting Security and Technology
    Replies: 5
    Last Post: 12-07-2005, 08:00 PM
  3. Exim not working properly
    By vpsfusion in forum Hosting Security and Technology
    Replies: 10
    Last Post: 03-27-2005, 12:17 AM
  4. Nagios isn't working after cnfiguration !!!
    By atul in forum Hosting Security and Technology
    Replies: 11
    Last Post: 08-23-2004, 01:41 AM
  5. Exim no longer working
    By MStar in forum Hosting Security and Technology
    Replies: 2
    Last Post: 01-25-2004, 10:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •