Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #1882] Icinga macros not expanded in notes|action_url #490
This issue has been migrated from Redmine: https://dev.icinga.com/issues/1882
Created by wpreston on 2011-09-09 09:46:25 +00:00
If macros (e.g. $SERVICEDESC$) are contained in the notes url (a common occurrence...)
2013-11-20 15:35:00 +00:00 by mhein bdaf233
2013-11-20 15:44:14 +00:00 by mhein 1d337a1
Updated by mfriedrich on 2011-09-09 10:32:30 +00:00
see #1883 - the idoutils do not dump the processed macro string, but the plain string. the cgis call themselves the shared marco fetching functions which are not really possible for a database based solution. better attempt would be to insert that into the database via data output.
Updated by jmosshammer on 2011-09-12 10:03:55 +00:00
I think this should be done in idoutils, as it should provide an abstract interface for icinga data and should hide (data storage) implementation details like macro expansion from developers. We (and other people using the db) would have to care which macros exists, where they occur, how they are resolved and constantly check if there are new macros. I would really appreciate if we could solve this in the idoutils.
Updated by wpreston on 2011-09-12 14:05:01 +00:00
I only see this as being a problem for dynamic macros (e.g. $TIMET$).
But we could live without the time macros being updated.
Of course it would be nice if custom macros were dynamically expanded,
I have a strong suspicion though that macros aren't available to the core at the point the configs are dumped :-(
Updated by mfriedrich on 2012-04-30 18:26:04 +00:00
grabbing the macros on dump will add more complexity and wait time on the actual insert/update then. this cost remains too high, especially when you run the core with gprof - most likely you will see that the macro grabbing is one of the most run.
Updated by mfriedrich on 2012-10-24 16:50:52 +00:00
consider it as a todo when we start digging around icinga2's api. i doubt that the current 1.x framework will support that due to the lack of performance.