Configuring email and SMS notifications.

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: Configuring email and SMS notifications.

Postby scottwilkerson » Fri Feb 14, 2020 4:02 pm

scottwilkerson wrote:Do you see nagios attempting to send notification of the Notification report in the UI?

??

dheerushops wrote:[root@nagiosserver ~]# echo "test message"/bin/mail -s "** TEST MESSAGE **" dhe*@gmail.com
test message/bin/mail -s ** TEST MESSAGE** dhe*@gmail.com
[root@nagiosserver ~]#

sorry, I was missing a |

Code: Select all
echo "test message"| /bin/mail -s "** TEST MESSAGE **" dhe*@gmail.com
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17544
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Configuring email and SMS notifications.

Postby dheerushops » Mon Feb 17, 2020 8:20 am

Please check below output.


[root@nagiosserver objects]# echo "test message"| /bin/mail -s "** TEST MESSAGE **" dhe*@gmail.com
[root@nagiosserver objects]# tail -f /var/log/messages
Feb 17 08:00:19 nagiosserver nagios: SERVICE NOTIFICATION: nagiosadmin;nagioshost;Total Processes;CRITICAL;notify-service-by-email;PROCS CRITICAL: 1799 processes
Feb 17 08:00:19 nagiosserver nagios: job 28181 (pid=9415): read() returned error 11
Feb 17 08:04:38 nagiosserver rsyslogd-2177: imuxsock begins to drop messages from pid 2094 due to rate-limiting
[root@nagiosserver objects]#
dheerushops
 
Posts: 32
Joined: Fri Dec 06, 2019 7:44 am

Re: Configuring email and SMS notifications.

Postby scottwilkerson » Mon Feb 17, 2020 8:25 am

Did you get the email?

What is the output of the following
Code: Select all
tail -40 /var/log/maillog
service postfix status
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17544
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Configuring email and SMS notifications.

Postby dheerushops » Mon Feb 17, 2020 8:35 am

I haven't received email.

[root@nagiosserver objects]# service postfix status
master (pid 2081) is running...
[root@nagiosserver objects]# tail -40 /var/log/maillog

Feb 17 08:19:49 nagiosserver sendmail[12090]: 01H8Jniv012090: from=root, size=219, class=0, nrcpts=1, msgid=<202002170819.01H8Jniv012090@nagiosserver>, relay=root@localhost
Feb 17 08:19:49 nagiosserver postfix/smtpd[11809]: connect from localhost[127.0.0.1]
Feb 17 08:19:49 nagiosserver postfix/smtpd[11809]: 9395328E2: client=localhost[127.0.0.1]
Feb 17 08:19:49 nagiosserver postfix/cleanup[11812]: 9395328E2: message-id=<202002170819.01H8Jniv012090@nagiosserver>
Feb 17 08:19:49 nagiosserver postfix/qmgr[2094]: 9395328E2: from=<root@nagiosserver.localdomain>, size=665, nrcpt=1 (queue active)
Feb 17 08:19:49 nagiosserver sendmail[12090]: 01H8Jniv012090: to=dheerushops@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30219, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 9395328E2)
Feb 17 08:19:49 nagiosserver postfix/error[11813]: 9395328E2: to=<dheerushops@gmail.com>, relay=none, delay=0.05, delays=0.04/0/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.example.com type=AAAA: Host not found)
Feb 17 08:19:49 nagiosserver postfix/smtpd[11809]: disconnect from localhost[127.0.0.1]
Feb 17 08:20:26 nagiosserver sendmail[12146]: 01H8KQaC012146: from=nagios, size=490, class=0, nrcpts=1, msgid=<202002170820.01H8KQaC012146@nagiosserver>, relay=nagios@localhost
Feb 17 08:20:26 nagiosserver postfix/smtpd[11809]: connect from localhost[127.0.0.1]
Feb 17 08:20:26 nagiosserver postfix/smtpd[11809]: 6FC753A67: client=localhost[127.0.0.1]
Feb 17 08:20:26 nagiosserver postfix/cleanup[11812]: 6FC753A67: message-id=<202002170820.01H8KQaC012146@nagiosserver>
Feb 17 08:20:26 nagiosserver postfix/qmgr[2094]: 6FC753A67: from=<nagios@nagiosserver.localdomain>, size=946, nrcpt=1 (queue active)
Feb 17 08:20:26 nagiosserver sendmail[12146]: 01H8KQaC012146: to=dheerushops@gmail.com, ctladdr=nagios (532/537), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30490, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 6FC753A67)
Feb 17 08:20:26 nagiosserver postfix/error[12052]: 6FC753A67: to=<dheerushops@gmail.com>, relay=none, delay=0.05, delays=0.04/0/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.example.com type=AAAA: Host not found)
Feb 17 08:20:26 nagiosserver postfix/smtpd[11809]: disconnect from localhost[127.0.0.1]
Feb 17 08:21:02 nagiosserver sendmail[12193]: 01H8L20V012193: from=root, size=219, class=0, nrcpts=1, msgid=<202002170821.01H8L20V012193@nagiosserver>, relay=root@localhost
Feb 17 08:21:02 nagiosserver postfix/smtpd[11809]: connect from localhost[127.0.0.1]
Feb 17 08:21:02 nagiosserver postfix/smtpd[11809]: C0B993A68: client=localhost[127.0.0.1]
Feb 17 08:21:02 nagiosserver postfix/cleanup[11812]: C0B993A68: message-id=<202002170821.01H8L20V012193@nagiosserver>
Feb 17 08:21:02 nagiosserver sendmail[12193]: 01H8L20V012193: to=dheerushops@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30219, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as C0B993A68)
Feb 17 08:21:02 nagiosserver postfix/qmgr[2094]: C0B993A68: from=<root@nagiosserver.localdomain>, size=665, nrcpt=1 (queue active)
Feb 17 08:21:02 nagiosserver postfix/error[12059]: C0B993A68: to=<dheerushops@gmail.com>, relay=none, delay=0.05, delays=0.05/0/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.example.com type=AAAA: Host not found)
Feb 17 08:21:02 nagiosserver postfix/smtpd[11809]: disconnect from localhost[127.0.0.1]
Feb 17 08:21:49 nagiosserver sendmail[12255]: 01H8Lnqi012255: from=root, size=219, class=0, nrcpts=1, msgid=<202002170821.01H8Lnqi012255@nagiosserver>, relay=root@localhost
Feb 17 08:21:49 nagiosserver postfix/smtpd[11809]: connect from localhost[127.0.0.1]
Feb 17 08:21:49 nagiosserver postfix/smtpd[11809]: 665923A69: client=localhost[127.0.0.1]
Feb 17 08:21:49 nagiosserver postfix/cleanup[11812]: 665923A69: message-id=<202002170821.01H8Lnqi012255@nagiosserver>
Feb 17 08:21:49 nagiosserver postfix/qmgr[2094]: 665923A69: from=<root@nagiosserver.localdomain>, size=665, nrcpt=1 (queue active)
Feb 17 08:21:49 nagiosserver sendmail[12255]: 01H8Lnqi012255: to=dheerushops@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30219, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 665923A69)
Feb 17 08:21:49 nagiosserver postfix/error[12052]: 665923A69: to=<dheerushops@gmail.com>, relay=none, delay=0.05, delays=0.04/0/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.example.com type=AAAA: Host not found)
Feb 17 08:21:49 nagiosserver postfix/smtpd[11809]: disconnect from localhost[127.0.0.1]
[root@nagiosserver objects]#
dheerushops
 
Posts: 32
Joined: Fri Dec 06, 2019 7:44 am

Previous

Return to Nagios Core

Who is online

Users browsing this forum: dheerushops, fraguillen, orbis and 31 guests