LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 06-26-2008, 12:09 PM   #1
Hiroyatamoto
LQ Newbie
 
Registered: Jun 2008
Posts: 12

Rep: Reputation: 0
Talking Nagios E-mail notification


I have installed Nagios on Ubuntu (according to the quick start guide) and it is currently monitoring the localhost, a router, and a Windows box (using NSClient++). Using the web interface, I am able to monitor all of this (under Service Details) and it all works fine. I need to know how to set up e-mail notification so that I may get the alerts in my e-mail (gmail). Any real help would be much appreciated.
 
Old 06-26-2008, 01:00 PM   #2
kcorupe
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Arch
Posts: 107

Rep: Reputation: 15
Check the nagios docs... its pretty straight forward, you create a contact in contacts, group them in contact groups (makes ur life easier), and then specify the contact group for the service in services.cfg. easy as pie.

contacts.cfg

Code:
define contact{
        contact_name                    kyle
        alias                           kyle
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           kcorupe@emailaddress.com
        }
contactgroups.cfg

Code:
define contactgroup{
        contactgroup_name       admins
        alias                   admins
        members                 internal_infosec, kyle
        }



services.cfg

Code:
define service{
    use                     basic-service
    host_name               azathoth
    service_description     ssh_check load 
    check_command           ssh_load2!5.0,4.0,3.0!10.0,6.0,4.0
    contact_groups          admins
}
 
Old 06-26-2008, 02:46 PM   #3
bret
Member
 
Registered: Apr 2005
Location: SLC, Utah
Distribution: RHEL 4, RHEL 5
Posts: 59

Rep: Reputation: 16
You need to make sure you have a SENDMAIL agent running as well. SENDMAIL or POSTFIX would be a couple of good choices.
 
Old 06-26-2008, 10:25 PM   #4
Hiroyatamoto
LQ Newbie
 
Registered: Jun 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for your help.

My contacts.cfg file looks a little differently but I did edit it with the proper e-mail address and group info (I will check it again). I am running Nagios version 3.0 so maybe that would explain the difference. I think that my problem might be with sendmail but I am really not sure how I could check to see if sendmail is working properly.
 
Old 06-26-2008, 10:26 PM   #5
Hiroyatamoto
LQ Newbie
 
Registered: Jun 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by bret View Post
You need to make sure you have a SENDMAIL agent running as well. SENDMAIL or POSTFIX would be a couple of good choices.
I will try Postfix.

Thanks.
 
Old 07-02-2008, 03:55 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue here: http://www.linuxquestions.org/questi...nagios-651846/
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
E-mail notification with Nagios Hiroyatamoto Linux - Newbie 7 06-30-2009 11:18 AM
NAGIOS notification ny101880 Linux - Newbie 14 01-04-2009 01:10 AM
Nagios E-mail notification setup Hiroyatamoto Linux - Newbie 3 07-01-2008 04:30 PM
E-Mail notification to users via SMS (gateway script ok, but notification script?!?) Riku2015 Linux - Networking 10 03-08-2002 10:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration