Am 27.12.2014 um 01:02 schrieb Barry Quiel:
Icinga1 had a notification number macro:

$HOSTNOTIFICATIONNUMBER$
$SERVICENOTIFICATIONNUMBER$

I don't see any Icinga2 doc on that macro. Was it not carried forward
to Icinga2?

Those macros are not valid if you consider the new notification object.
You cannot really tell which notification caused which impact on the
overall counter. Therefore these macros have not been implemented within
Icinga 2.


I can see that info in the web interface listed in the attempt column:
1/3(#112)

That's an ugly workaround just for Classic UI backend 1.x compatibility
files which collects the highest notification number of all notification
objects associated to that host/service. This not correct all the time.
Feel free to propose a better workaround though.

https://github.com/Icinga/icinga2/blob/master/lib/icinga/compatutility.cpp#L503


How can I get that data out to my notification handler?  I use it for
auto ticket generation to prevent duplicate tasks for the same
notification.

Currently no such macro exists. If you need one, please open a feature
request and/or create a patch. The code already provides such a "get"
functionality for notification objects with GetNotificationNumber().

Kind regards,
Michael

-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | michael.friedr...@netways.de

** OSDC 2015 - April - osdc.de **
** Puppet Camp Berlin 2015 - April - netways.de/puppetcamp **
** OSBConf 2015 - September – osbconf.org **
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to