email notice problem
Andy Shellam (Mailing Lists)
andy.shellam-lists at mailnetwork.co.uk
Fri Feb 16 17:30:44 CET 2007
admin at lctn.org wrote:
>> If you "su" to the Nagios user, and just run "mail" - does it yield
>> anything, or "command not found"?
>>
>> The error seems to be (as someone previously said) it's piping your
>> notification text to " -s "Host DOWN..."" which isn't a valid command.
>> You need to change your notification command to pipe the result to "mail
>> -s ...." instead of " -s ..."
>>
>> You may also need to try "sendmail" (I don't use sendmail so I don't
>> know if "mail" is part of it or not.)
>>
>
>
> I inserted "sendmail", but still get the err. I am working on the syntax
> to see if I can resolve the error. What does everyone else have installed
> that the "mail" command works. I really don't care what MTA is used, just
> so I can get the sample, and new configs to work. I assumed on the install
> it would locate sendmail and insert the appropriate commands, but
> obviously, I was wrong.
>
No, Nagios doesn't assume anything because everyone's networks/servers
are setup differently.
Try an absolute path to sendmail (use "whereis sendmail" to locate it if
you're not sure.)
The trick is to (while logged in or "su'd" to the Nagios user) manually
type out a command and keep adjusting until it works - then put that
into Nagios.
e.g. echo "Test e-mail"|/usr/sbin/sendmail -s "Host DOWN" admin at domain.com
Andy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070216/91648e40/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
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