Hi, Icinga community,
I’m working on trying to make some more useful default documentation for our services in Icinga2. We have a mediawiki instance where I am, and every individual instance of a monitor should be documented.
I use the following string in individual Service and Service Apply definitions, which works perfectly.
notes_url = “https://f.q.d.n.example.com/index.php?title=Monitor:_$service.name$”
However, I’d like to make sure this is applied to all versions - the only place we want to ever document our monitors is in the wiki with a specific format so that we reliably (and always) go to the monitor page of any monitor we need to define.
However, when I set a notes_url variable in the generic-service template, nothing gets a notes_url except those I have hardcoded in the service apply rules directly - though the result does change in the object depending on how I define it:
notes_url = “https://f.q.d.n.example.com/index.php?title=Monitor:_$service.name$”
results in the object having"
- notes_url = “https://f.q.d.n.example.com/index.php?title=Monitor:_$service.name$”
% = modified in ‘/etc/icinga2/conf.d/templates.conf’, lines 30:3-30:91
notes_url = “https://f.q.d.n.example.com/index.php?title=Monitor:_” + service.name
results in the object having:
- notes_url = “https://f.q.d.n.example.com/index.php?title=Monitor:_anarchysubject-integrity”
% = modified in ‘/etc/icinga2/conf.d/templates.conf’, lines 30:3-30:91
However, no matter which way I setup the notes template, the services all have no Notes URL in the Icinga Web 2 application.
However, if I hardcode the notes URL in a Service apply rule directly:
notes_url = “https://f.q.d.n.example.com/index.php?title=Monitor:_$service.name$”
Then the notes URL shows up correctly.
System information:
Loaded modules
|doc|2.8.2|
|monitoring|2.8.2|
Icinga Web 2 Version: 2.8.2
Browser: Firefox 107.1
PHP Version: 7.2.24
OS Version: CentOS 8