Page 2 of 2

Re: Notifications into MS Teams

Posted: Tue Mar 10, 2020 2:54 pm
by sozotech
scottwilkerson wrote:Can you submit a custom notification for xxxx.yyyy.com and see it in the logs?
I did that and only received an email and text (no MS Teams) but I don't see in the logs where the notifications were sent/failed. I am sorry but where would I find the logs of notifications? I looked in /var/log/messages and /var/log/nagios/nagios.log

Re: Notifications into MS Teams

Posted: Tue Mar 10, 2020 3:18 pm
by scottwilkerson
It would have been is your /nagios.log

Are you sure sure the file that contains this contact group and command is getting included in your nagios.cfg?

can you find your objects.cache and run the following against it

Code: Select all

grep notify_teams objects.cache
also, please show the output of the following

Code: Select all

ps -ef|grep nagios.cfg

Re: Notifications into MS Teams

Posted: Tue Mar 10, 2020 4:15 pm
by sozotech
Ok, my bad on not seeing them in the logs (been a long day and was looking on the wrong server) but they were there but reference to notify teams. http://prntscr.com/refgg6

grep notify_teams /var/nagios/objects.cache
command_name notify_teams
members notify_teams,Ben_Phone,Ben_Email,Eric_Phone,Eric_Email
contact_name notify_teams
alias notify_teams
service_notification_commands notify_teams
host_notification_commands notify_teams

ps -ef|grep nagios.cfg|grep -v grep
nagios 5697 1 0 2019 ? 23:58:38 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21616 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21619 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21624 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21627 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21632 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21636 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21640 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21644 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21648 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21652 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21656 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21660 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21664 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21668 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg

Re: Notifications into MS Teams

Posted: Tue Mar 10, 2020 4:23 pm
by scottwilkerson
sozotech wrote:ps -ef|grep nagios.cfg|grep -v grep
nagios 5697 1 0 2019 ? 23:58:38 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21616 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21619 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21624 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21627 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21632 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21636 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21640 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21644 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21648 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21652 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21656 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21660 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21664 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 21668 1 0 16:58 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
this is a problem, you have many nagios parent processes, one of which has been running since 2019 and this is all going to cause a problem

Please run the following

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
or the equivalent on your OS
then run the following again to verify it looks correct

Code: Select all

ps -ef|grep nagios.cfg|grep -v grep
Try to send a notification again, look in the logs

Finally, if you continue to have issues, please provide Nagios version and OS type and version