Feature #1882

Icinga macros not expanded in notes|action_url

Added by wpreston over 2 years ago. Updated 5 months ago.

Status:ResolvedStart date:09/09/2011
Priority:NormalDue date:
Assignee:mhein% Done:

100%

Category:Architecture
Target version:Icinga 1.x - 1.11

Description

If macros (e.g. $SERVICEDESC$) are contained in the notes url (a common occurrence...)
they are not expanded, and the Links are useless.


Related issues

Related to IDOUtils - Feature #1883: add processed macro strings into database (notes, notes_u... Rejected 09/09/2011
Related to Web - Feature #1137: Show full command as executed by Icinga Feedback 01/21/2011
Related to Web - Feature #4432: use macro expanded values for notes, notes_url, action_ur... Closed 07/20/2013
Duplicated by Web - Bug #2842: External References does not extend macros Closed 07/13/2012

Associated revisions

Revision bdaf2333
Added by mhein 5 months ago

Implement macro expander

refs #1882

Revision 1d337a1e
Added by mhein 5 months ago

Merge branch 'feature/macro-expander-1882' into next

resolves #1882

History

#1 Updated by dnsmichi over 2 years ago

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.

#2 Updated by jmosshammer over 2 years ago

  • Status changed from New to Feedback

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.

#3 Updated by wpreston over 2 years ago

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,
because we could alter them with the CHANGE_CUSTOM_HOST_VAR command - but since
this doesn't work with the classic interface either, it's not a big problem.

I have a strong suspicion though that macros aren't available to the core at the point the configs are dumped :-(

#4 Updated by jmosshammer over 2 years ago

  • Category set to Architecture
  • Target version set to 76

#5 Updated by dnsmichi over 2 years ago

  • Target version changed from 76 to 1.8

#6 Updated by dnsmichi almost 2 years ago

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.

#7 Updated by jmosshammer over 1 year ago

  • Target version changed from 1.8 to 1.9

1.8 is here soon and we don't have a good solutiion for this yet, so I'll pospone to 1.9.

#8 Updated by dnsmichi over 1 year ago

  • Target version changed from 1.9 to 1.10

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.

#9 Updated by dnsmichi over 1 year ago

  • Subject changed from Icinga Macros not expanded in notes URL to Icinga macros not expanded in notes|action_url

#10 Updated by dnsmichi 9 months ago

  • Status changed from Feedback to Closed
  • Target version deleted (1.10)

will be done with #4432 as new feature request then (additional columns used).

#11 Updated by dnsmichi 5 months ago

  • Status changed from Closed to New

#12 Updated by mhein 5 months ago

  • Assignee set to mhein

#13 Updated by mhein 5 months ago

  • Target version set to 1.11

#14 Updated by mhein 5 months ago

  • Status changed from New to Assigned

#15 Updated by mhein 5 months ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF