Page 4 of 4

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

Posted: Mon Jun 09, 2014 3:05 am
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 :(

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

Posted: Mon Jun 09, 2014 5:41 am
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

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

Posted: Mon Jun 09, 2014 7:09 am
by eloyd
Glad we could help.