Page 3 of 4

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

Posted: Fri Jun 06, 2014 3:42 am
by aleks1
@sreinhardt
Can you run the following command and send back the output
the command! :

Code: Select all

nslookup -querytype=any deaconsulenze.eu
Server:		10.10.2.102
Address:	10.10.2.102#53

Non-authoritative answer:
deaconsulenze.eu	nameserver = ns2003.dizinc.com.
deaconsulenze.eu	nameserver = ns2004.dizinc.com.

Authoritative answers can be found from:


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

Posted: Fri Jun 06, 2014 4:58 am
by Stuart Watts
That output looks truncated, but similar to a successful name resolution.

If you did successfully resolve the MX record, then I'd next check the network - can you "telnet intra.deaconsulenze.eu 25" from the Nagios server?

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

Posted: Fri Jun 06, 2014 5:12 am
by aleks1
Authoritative answer is empty...is a good thing??

here is the command:

Code: Select all

root@backups:~# telnet intra.deaconsulenze.eu 25
Trying 144.76.118.183...
Connected to intra.deaconsulenze.eu.
Escape character is '^]'.
220 intra.deaconsulenze.eu ESMTP Postfix (Debian/GNU)
i don't know what can i do! :(

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

Posted: Fri Jun 06, 2014 5:30 am
by Stuart Watts
Does /var/log/maillog show any other information around the time of the failed Nagios notification?

Try sending a mail manually:

Code: Select all

telnet intra.deaconsulenze.eu 25
HELO <nagios server FQDN>  <---- (the output from "uname -n")
MAIL FROM:[email protected]
RCPT TO:[email protected]
DATA
SUBJECT:Test email
[Press Enter twice]

some data
some data
.
The last part is a single "." on a line on it's own, which tells the relay you're done sending data. Post any errors you get from doing this.

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

Posted: Fri Jun 06, 2014 5:49 am
by aleks1
Does /var/log/maillog show any other information around the time of the failed Nagios notification?
only this:

Code: Select all

 unknown; sleeping for retry
Jun  6 10:41:01 backups sm-msp-queue[9722]: unable to qualify my own domain name (localhost) -- using short name
Jun  6 11:00:02 backups sm-msp-queue[10797]: My unqualified host name (localhost) unknown; sleeping for retry
Jun  6 11:01:02 backups sm-msp-queue[10797]: unable to qualify my own domain name (localhost) -- using short name
Jun  6 11:20:01 backups sm-msp-queue[11962]: My unqualified host name (localhost) unknown; sleeping for retry
Jun  6 11:21:01 backups sm-msp-queue[11962]: unable to qualify my own domain name (localhost) -- using short name
Jun  6 11:40:01 backups sm-msp-queue[13053]: My unqualified host name (localhost) unknown; sleeping for retry
Jun  6 11:41:01 backups sm-msp-queue[13053]: unable to qualify my own domain name (localhost) -- using short name
Jun  6 12:00:01 backups sm-msp-queue[14367]: My unqualified host name (localhost) unknown; sleeping for retry
Jun  6 12:01:01 backups sm-msp-queue[14367]: unable to qualify my own domain name (localhost) -- using short name
Jun  6 12:20:01 backups sm-msp-queue[15849]: My unqualified host name (localhost) unknown; sleeping for retry
and if i try to send emails with the command:

Code: Select all

echo "test" | mail -s "test mail" [email protected]"
i have this in mail.log:

Code: Select all

Jun  6 10:36:38 backups sendmail[9451]: s568acQu009451: from=nagios, size=96, class=0, nrcpts=1, msgid=<201406060836.s568acQu009451@localhost>, relay=nagios@localhost
Jun  6 10:36:38 backups sm-mta[9481]: s568acms009481: from=<nagios@localhost>, size=330, class=0, nrcpts=1, msgid=<201406060836.s568acQu009451@localhost>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun  6 10:36:38 backups sendmail[9451]: s568acQu009451: to=<[email protected]>, ctladdr=nagios (1006/1006), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30096, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s568acms009481 Message accepted for delivery)
Jun  6 10:36:38 backups sm-mta[9483]: STARTTLS=client, relay=intra.deaconsulenze.eu., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES256-SHA, bits=256/256
Jun  6 10:36:39 backups sm-mta[9483]: s568acms009481: to=<[email protected]>, ctladdr=<nagios@localhost> (1006/1006), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120330, relay=intra.deaconsulenze.eu. [144.76.118.183], dsn=2.0.0, stat=Sent (Ok: queued as 6C24520BB4)

sending emails with telnet:

Code: Select all

root@backups:~# telnet intra.deaconsulenze.eu 25
Trying 144.76.118.183...
Connected to intra.deaconsulenze.eu.
Escape character is '^]'.
220 intra.deaconsulenze.eu ESMTP Postfix (Debian/GNU)
HELO backups
250 intra.deaconsulenze.eu
MAIL FROM:nagios@backups                           
250 2.1.0 Ok
RCPT TO:[email protected]
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
SUBJECT:test email


test

.
250 2.0.0 Ok: queued as 6B2EE208EB
and the mail arrives to my account...

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

Posted: Fri Jun 06, 2014 6:14 am
by Stuart Watts
Hrm, okay.

What happens if you try:

Code: Select all

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]

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

Posted: Fri Jun 06, 2014 7:06 am
by aleks1
What happens if you try:

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]
$ 
from account [email protected]:

Code: Select all

***** Nagios *****

Notification Type: PROBLEM

Service: HTTP
Host: IpCop Milano ESA
Address: 192.168.33.1
State: CRITICAL

Date/Time: Thu Jun 5 14:51:10 CEST 2014

Additional Info:

HTTP CRITICAL: HTTP/1.0 504 Gateway Time-out - 1937 bytes in 0,183 second response time
the problem arrives to account [email protected]!!!! :)
we are near the solution? :)

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

Posted: Fri Jun 06, 2014 9:53 am
by Stuart Watts
I'm not sure, to be honest! That command is what Nagios runs when the notification is triggered.

One very minor thing - can you "su - nagios", not "su nagios" and run the command again please?

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

Posted: Fri Jun 06, 2014 11:32 am
by sreinhardt
Just to make it a little more clear for you, Stuart would like to see:

Code: Select all

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]

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

Posted: Fri Jun 06, 2014 11:34 am
by eloyd
I think he wants to see
n you "su - nagios", not "su nagios"