Results 1 to 11 of 11
  1. #1
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108

    Nagios: Email Problem

    Hey,

    I have fully configuring nagios and it is running perfectly at www.aexihosting.com/nagios/

    user: guest
    pass: guest

    Only problem is, nagios isnt sending the mails out when its supposed to.

    Contact is added to contactgroup, contact group to host and to service information.

    when doing ./nagios -v {conffile} I get...

    Total Warnings: 0
    Total Errors: 0

    Which means everything is assigned correctly, yet no mails are even hitting the mail queue.

    I checked tail -f /var/log/maillog and nothing remotely like a nagio mail ever hits it.

    Some input would be greatly appreciated.

  2. #2
    Usually it (Nagio) would send out notification when either warning or critical outages appear. It seems all your services are running fine.
    Datums Internet Solutions, LLC
    Systems Engineering & Managed Hosting Services
    Complex Hosting Consultants

  3. #3
    Join Date
    Jul 2001
    Posts
    889
    No notifications have been recorded in the current log file

  4. #4
    Greetings:

    While only indirectly related, OpenSSH_3.5p1 on the one server should be upgraded.

    Thank you.
    ---
    Peter M. Abraham
    LinkedIn Profile

  5. #5
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    Yes I know the services are running fine, but i stopped one yesterday and nothing happened.

    The reason it says

    No notifications have been recorded in the current log file
    is because I echoed the log file to see if I got any errors when trying again.

  6. #6
    Join Date
    Mar 2004
    Location
    Chicago, IL
    Posts
    384
    The guest account can't view the configurations, so it's hard to help you troubleshoot.

    Did you check your mail logs to see if anything was even attempted? Did you see notifications in your Notifications report?

    Double check the notification options and notification period for the host, services, and contacts.

    Also, by default, nagios will use /bin/mail to generate the emails. Make sure that's functional, or modify the notify-by-email and other appropriate notify methods.

  7. #7
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    516
    On a cpanel server do you think the problem would lie in using /bin/mail rather than sendmail?

    Anyone know how to change it?

    Here is what nagios spits out:
    Code:
    sh: line 1: /bin/mail: Permission denied
    Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** 
    Nagios  *****\n\nNotification Type: PROBLEM\n\nService: FTP\nHost: test.host.com\nAddress: 
    65.xxx.xxx.xxx\nState: CRITICAL\n\nDate/Time: Tue Aug 24 01:36:12 EDT 2004\n\nAdditional Info:\n\nConnection refused 
    by host" | /bin/mail -s "** PROBLEM alert - test.host.com/FTP is CRITICAL **" [email protected]" resulted in a return code of 126. 
    
    Make sure the script or binary you are trying to execute actually exists...
    Okay so then I type /bin/mail and Linux says:

    "No mail for root"

    Anyone on cPanel ever get this setup for notifications?
    GlowHost → Affordable Managed Web Hosting Since 2002.
    Cloud Servers- Hot Failover + Clustered Storage
    Managed Dedicated Servers - Semi-Dedicated Servers
    Shared & Reseller packages - 20 Min Ticket Response 24/7/365

  8. #8
    The problem is that nagios runs as nagios user. Make sure that nagios has the permissions to run mail.

    ls -All /bin/mail

    What's the permissions?
    Like us on Facebook to qualify for discounts!
    http://www.sprintserve.net
    Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | Wordpress Hosting |
    Services: | Managed Multiple Cores 64bit Servers | Server Management |

  9. #9
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    516
    This is the output:

    -rwxrwx--- 1 bin mail 74844 Aug 1 2003 /bin/mail* from root.

    Thank you.
    GlowHost → Affordable Managed Web Hosting Since 2002.
    Cloud Servers- Hot Failover + Clustered Storage
    Managed Dedicated Servers - Semi-Dedicated Servers
    Shared & Reseller packages - 20 Min Ticket Response 24/7/365

  10. #10
    Try chmod it 755
    Like us on Facebook to qualify for discounts!
    http://www.sprintserve.net
    Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | Wordpress Hosting |
    Services: | Managed Multiple Cores 64bit Servers | Server Management |

  11. #11
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    516
    Thanks Sprintserve. Seems to have done the trick. Was not sure if that would produce any problems for the shared users on the server but I am now getting notifications.

    Again many thanks.
    GlowHost → Affordable Managed Web Hosting Since 2002.
    Cloud Servers- Hot Failover + Clustered Storage
    Managed Dedicated Servers - Semi-Dedicated Servers
    Shared & Reseller packages - 20 Min Ticket Response 24/7/365

Posting Permissions

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