I setup Nagios Core and Nagvis using mklivestatus. I'm trying to add a context menu that links to a database with operating manuals.
In the database, each object's manual can be found by entering the object's id somewhere in the URL of the database.
I'm trying to make the id part of the URL a variable. I created a custom object variable in the host configuration of Nagios Core called _id.
Then I created an http context menu item for NagVis in /usr/local/nagvis/share/userfiles/templates/default.context.html.
However the [_id] part of the url is not accepted. When I put in the standard [address] variable instead of [_id] the variable for the ip address is recognised.
The link opens fine otherwise, and if I fill in the entire URL in default.context.html it also works.
I also tried to change to name of the variable to for instance _manual, but for now it doesn't work.
Can NagVis handle custom object variables and do I need to reference the variable somewhere else?
Many thanks in advance!
In the database, each object's manual can be found by entering the object's id somewhere in the URL of the database.
I'm trying to make the id part of the URL a variable. I created a custom object variable in the host configuration of Nagios Core called _id.
Then I created an http context menu item for NagVis in /usr/local/nagvis/share/userfiles/templates/default.context.html.
![]() |
Quellcode |
1 |
<li><a href="http://database.local/manuals.aspx?tbl=asset&wrd=[_id]&hdr=1" target="_blank">Manual</a></li> |
However the [_id] part of the url is not accepted. When I put in the standard [address] variable instead of [_id] the variable for the ip address is recognised.
The link opens fine otherwise, and if I fill in the entire URL in default.context.html it also works.
I also tried to change to name of the variable to for instance _manual, but for now it doesn't work.
Can NagVis handle custom object variables and do I need to reference the variable somewhere else?
Many thanks in advance!