Sending email notifications

Jatin Davey jashokda at cisco.com
Thu Mar 4 07:14:05 CET 2010


Ok , i figured out using an external email server to send mails to my 
mailbox using the configuration as below :

change your /etc/mail/sendmail.cf to read # "Smart" relay host (may be null)
DSsmtp:your-mailer.external-host.net

now i receive the mails for any alerts that nagios raises.

Thanks
Jatin

On 3/4/2010 10:37 AM, Jatin Davey wrote:
> Hi Matt
>
> I tried the following from the command line:
>
> echo "test 1" | mail -s "test 1" contactemail at whatever
>
> I tried giving my email address but i am not receiving any mail. Let me
> know what else i need to provide to make it work.
>
> Thanks
> Jatin
>
> On 3/3/2010 10:42 PM, Matt Simmons wrote:
>    
>> By default, at the top of your commands.cfg file, you'll see things
>> like "notify-host-by-email" and "notify-service-by-email". Those are
>> commands that work in conjunction with the configuration specified in
>> contacts.cfg.
>>
>> Essentially, all of your services and hosts have or inherit a
>> "contact_groups" setting. That group name should be in contacts.cfg,
>> and it should have all of the appropriate contacts listed in it.
>> (see Nagios Object Definitions for more info:
>> http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html )
>>
>> Assuming this is the case, and Nagios starts correctly without a
>> configuration error, there's probably an issue with your mail. Check
>> the email address that you have for your contacts. Is it correct?
>>
>> Assuming so, can you send an email from the command line? Try
>>
>> echo "test 1" | mail -s "test 1" contactemail at whatever
>>
>> If you receive the email, but Nagios still doesn't send it, make sure
>> that you are able to run 'sendmail' as the nagios user (aside: people
>> who know more than me: does Nagios invoke sendmail as the default
>> MTA?).
>>
>> I'm going to guess that you can't send mail from the command line
>> either, and that's probably because your MTA isn't setup correctly.
>> Check your /var/log/maillog and your Sendmail (or postfix if you're
>> lucky) configuration.
>>
>> For better advice, I'd need more info on what was going wrong,
>> according to the results of the test and the log output.
>>
>> Good Luck.
>>
>> --Matt
>>
>>
>> On Wed, Mar 3, 2010 at 7:59 AM, Jatin Davey<jashokda at cisco.com>   wrote:
>>
>>      
>>> I had a requirement to monitor Java process on my windows server and
>>> send an email if it goes down.
>>> I have achieved adding the monitoring of java process on my nagios setup
>>> , i have no clue what to do get nagios send notifications.
>>> Anyone knows please let me know the steps involved.
>>>
>>> Thanks
>>> Jatin
>>>
>>> ------------------------------------------------------------------------------
>>> Download Intel® Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> _______________________________________________
>>> 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
>>>
>>>
>>>        
>>
>>
>>      
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> 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
>
>    

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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