Closed adrianlzt closed 7 years ago
Same with Icinga 1.14.0
In the docs is said:
Mod-Gearman does not support environment macros, except two plugin output related ones.
But I see that the rest of the MACROS needed to form the notification command are correctly processed.
Our notificacion command for services:
/usr/bin/printf "%b" "***** Icinga Notification *****\n\nType: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nDate/Time: $LONGDATETIME$\nUrl: https://$USER6$/check_mk/index.py?start_url=%2Fcheck_mk%2Fview.py%3Fview_name%3Dhost%26site%3D%26host%3D$HOSTNAME$\nInfo:$SERVICEOUTPUT$\n\n" | /bin/mail -S from="Icinga" -s "$USER5$ $NOTIFICATIONTYPE$ Service Alert: $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
I have been debugging Icinga and see that mac
object passed to process_macros_r
doesn't have the pointer mac.contact_ptr
initialized.
Maybe is missing a call to grab_contact_macros_r
in https://github.com/sni/mod_gearman/blob/master/neb_module/mod_gearman.c#L657
I'm trying to debug the neb module but I'm not very experienced with gdb and keep getting errors like value has been optimized out
and can't compute CFA for this frame
.
i will have look
When mod_gearman_neb is loaded in Icinga, macros CONTACT* are not resolved.
Enabling debug for macros in Icinga show this:
Same configuration without the mod_gearman_neb module works correctly.
Versions: Icinga 1.11.6 mod_gearman-3.0.4-1.el6.x86_64 gearmand-0.33-2.x86_64 gearmand-server-0.33-2.x86_64