Notification not sent but nagios triggers command

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.
Locked
thomaszwei
Posts: 4
Joined: Tue Sep 04, 2018 6:38 am

Notification not sent but nagios triggers command

Post by thomaszwei »

Hi,

I am a bit confused because nagios does not send a notification.
I wrote a perl script which does send a sms at the end. In the command definition I tell my script the $CONTACTPAGER$ and all other stuff like status, message, time etc.

I see the following in the logs from nagios.

[1622106617] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;HOSTNAME;sms notification test;1622106617
[1622106617] SERVICE ALERT: HOSTNAME;sms notification test;CRITICAL;SOFT;1;CRITICAL, no process matching Service.exe
[1622106622] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;HOSTNAME;sms notification test;1622106622
[1622106623] SERVICE ALERT: HOSTNAME;sms notification test;CRITICAL;SOFT;2;CRITICAL, no process matching Service.exe
[1622106626] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;HOSTNAME;sms notification test;1622106626
[1622106627] SERVICE NOTIFICATION: contact-user-sms;HOSTNAME;sms notification test;CRITICAL;notify-service-by-sms;CRITICAL, no process matching Service.exe
[1622106627] SERVICE ALERT: HOSTNAME;sms notification test;CRITICAL;HARD;3;CRITICAL, no process matching Service.exe


Therefore the check goes
- Soft 1
- Soft 2
- Hard 3 and then triggers the SERVICE NOTIFICATION for the user I want and with the command I configured but nothing happens

At thruk I see notification 1 but when I click on "View notifications for this service" its empty.
I tried also to switch to user nagios and execute the script from the command line and this works.

At the moment I dont get where the problem is. Are there any hints guys?

Thank you in advance
Locked