You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
A string containing the comment that was entered by the notification author. If the $NOTIFICATIONTYPE$ macro is set to "DOWNTIMESTART" or "DOWNTIMEEND", this will be the comment entered by the user who scheduled downtime for the host or service. If the $NOTIFICATIONTYPE$ macro is "ACKNOWLEDGEMENT", this will be the comment entered by the user who acknowledged the host or service problem. If the $NOTIFICATIONTYPE$ macro is "CUSTOM", this will be comment entered by the user who initated the custom host or service notification.
A string identifying the type of notification that is being sent ("PROBLEM", "RECOVERY", "ACKNOWLEDGEMENT", "FLAPPINGSTART", "FLAPPINGSTOP", "FLAPPINGDISABLED", "DOWNTIMESTART", "DOWNTIMEEND", or "DOWNTIMECANCELLED").
NOTIFICATIONTYPE MACRO is never became CUSTOM
Description Documentation at http://nagios.sourceforge.net/docs/3_0/ [^] says, that
if the $NOTIFICATIONTYPE$ macro is "CUSTOM", $NOTIFICATIONCOMMENT$ macro will be comment entered by the user who initated the custom host or service notification
(http://nagios.sourceforge.net/docs/3_0/macrolist.html#notificationcomment). [^]
But $NOTIFICATIONTYPE$ value can be only
"PROBLEM", "RECOVERY", "ACKNOWLEDGEMENT", "FLAPPINGSTART", "FLAPPINGSTOP", "FLAPPINGDISABLED", "DOWNTIMESTART", "DOWNTIMEEND", or "DOWNTIMECANCELLED"
(http://nagios.sourceforge.net/docs/3_0/macrolist.html#notificationtype). [^]
I have a bash script handler, which defines different text of notification depending on $NAGIOS_NOTIFICATIONTYPE environment variable value, and in case of custom host or service notification (for example, when user is requesting to send a custom host/service notification with web interface /nagios/cgi-bin/cmd.cgi?cmd_typ=159 and /nagios/cgi-bin/cmd.cgi?cmd_typ=160 ) it sends same text as if it was "RECOVERY" because of wrong $NOTIFICATIONTYPE$ value.
I found a mistype and fixed it with patch below.
Please commit it.
Best Regards,
Alexey Dvoryanchikov.
Additional Information
--- ./base/notifications.c~ 2010-10-05 13:29:09.000000000 +0400
+++ ./base/notifications.c 2010-10-24 19:54:06.000000000 +0400
@@ -190,6 +190,8 @@
macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("DOWNTIMEEND");
else if(type==NOTIFICATION_DOWNTIMECANCELLED)
macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("DOWNTIMECANCELLED");
+ else if(type==NOTIFICATION_CUSTOM)
+ macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("CUSTOM");
else if(svc->current_state==STATE_OK)
macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("RECOVERY");
else
@@ -1108,6 +1110,8 @@
macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("DOWNTIMEEND");
else if(type==NOTIFICATION_DOWNTIMECANCELLED)
macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("DOWNTIMECANCELLED");
+ else if(type==NOTIFICATION_CUSTOM)
+ macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("CUSTOM");
else if(hst->current_state==HOST_UP)
macro_x[MACRO_NOTIFICATIONTYPE]=(char *)strdup("RECOVERY");
else
The text was updated successfully, but these errors were encountered:
This issue has been migrated from Redmine: https://dev.icinga.com/issues/950
Created by mfriedrich on 2010-11-02 17:46:20 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2010-11-09 16:13:28 +00:00)
Target Version: 1.3
Last Update: 2010-11-09 16:13:28 +00:00 (in Redmine)
http://docs.icinga.org/latest/en/macrolist.html#macrolist-notificationcomment
http://docs.icinga.org/latest/en/macrolist.html#macrolist-notificationtype
http://tracker.nagios.org/view.php?id=168
The text was updated successfully, but these errors were encountered: