[SOLVED] i don't receive mail notification...

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
aleks1
Posts: 43
Joined: Thu Nov 28, 2013 1:33 pm

Re: i don't receive mail notification...

Post by aleks1 »

i'm so confused about this command! ehehe
@eloyd @sreinhardt @Stuart Watts

anyway do you want a command like this?:

Code: Select all

root@backups:~# su - nagios /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: HTTP\nHost: IpCop Milano ESA\nAddress: 192.168.33.1\nState: CRITICAL\n\nDate/Time: Thu Jun 5 14:51:10 CEST 2014\n\nAdditional Info:\n\nHTTP CRITICAL: HTTP/1.0 504 Gateway Time-out - 1937 bytes in 0,183 second response time\n" | /usr/bin/mail -s "** PROBLEM Service Alert: IpCop Milano ESA/HTTP is CRITICAL **" [email protected]
/usr/bin/printf: 1: /usr/bin/printf: Syntax error: ")" unexpected
Null message body; hope that's ok
or like this? :

Code: Select all

root@backups:~# su - nagios
$ /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: HTTP\nHost: IpCop Milano ESA\nAddress: 192.168.33.1\nState: CRITICAL\n\nDate/Time: Thu Jun 5 14:51:10 CEST 2014\n\nAdditional Info:\n\nHTTP CRITICAL: HTTP/1.0 504 Gateway Time-out - 1937 bytes in 0,183 second response time\n" | /usr/bin/mail -s "** PROBLEM Service Alert: IpCop Milano ESA/HTTP is CRITICAL **" [email protected]
in the second case the notification arrives to account [email protected]
uff...i'm desperate :(
aleks1
Posts: 43
Joined: Thu Nov 28, 2013 1:33 pm

[SOLVED] Re: i don't receive mail notification...

Post by aleks1 »

Hi everybody!!!
today i'm so happy to say that i have finished my Nagios!!!!
i have solved the issue with a little more change in /etc/hosts file....
form:

Code: Select all

127.0.0.1 localhost backups
to:

Code: Select all

127.0.0.1      localhost.localdomain  localhost backups.local       backups 
and puff.... the notifications works!!! :)

i'm thankful for your support that helped me to resolve this issue!! :)
you've helped me a lot!!
and finally we solved this problem!! :)
best thanks to: @Stuart Watts @dreamboy_sivak @eloyd @sreinhardt @lmiltchev @scottwilkerson @slansing
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: i don't receive mail notification...

Post by eloyd »

Glad we could help.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked