this is a feature request. The information Notes, Notes_URL, Action_URL are not shown in Nagios XI. But these are really useful, e. g. Notes_URL could point to a documentation how to fix a problem or some hints are stored in the Notes.
I would expect to see the Notes_URL and Action_URL in the "Quick Actions" box and the notes in the "Advanced Status Details".
As an alternative I created a small patch for the freevariables component to show these values:
Code: Select all
--- freevariabletab.inc.php.orig 2015-09-30 09:23:48.749092576 +0200
+++ freevariabletab.inc.php 2015-11-17 16:19:18.029801448 +0100
@@ -35,7 +35,7 @@
COMPONENT_AUTHOR => "Nagios Enterprises, LLC",
COMPONENT_DESCRIPTION => _("Adds a new tabs on host and service detail screens to show free variables from config. ").$desc,
COMPONENT_TITLE => "Free Variable Tab",
- COMPONENT_VERSION => '1.0.1',
+ COMPONENT_VERSION => '1.1.0',
// configuration function (optional)
//COMPONENT_CONFIGFUNCTION => "freevariabletab_component_config_func",
@@ -77,7 +77,22 @@
$hostname=grab_array_var($cbdata,"host");
$servicename=grab_array_var($cbdata,"service");
- $content='<div class="infotable_title">Free Variables</div>';
+ $content='<div class="infotable_title">Misc Settings</div>';
+
+ $freemiscsettings=freevariabletab_component_get_miscsettings($hostname,$servicename);
+
+ if($freemiscsettings){
+ $content.='<table class="table table-bordered table-striped" style="max-width: 800px;"><tr><th style="width: 200px;">Name</th><th>Value</th></tr>';
+
+ if (!empty($freemiscsettings->notes)) $content.='<tr><td>Notes</td><td>'.$freemiscsettings->notes.'</td></tr>';
+ if (!empty($freemiscsettings->notes_url)) $content.='<tr><td>Notes URL</td><td><a href="'.$freemiscsettings->notes_url.'">'.$freemiscsettings->notes_url.'</a></td></tr>';
+ if (!empty($freemiscsettings->action_url)) $content.='<tr><td>Action URL</td><td><a href="'.$freemiscsettings->action_url.'">'.$freemiscsettings->action_url.'</a></td></tr>';
+
+ $content.='</table>';
+
+ }
+
+ $content.='<div class="infotable_title">Free Variables</div>';
$freevariables=freevariabletab_component_get_freevariables($hostname,$servicename);
@@ -104,6 +119,25 @@
$cbdata["tabs"][]=$newtab;
}
+function freevariabletab_component_get_miscsettings($hostname,$servicename=null){
+
+ $args=array(
+ "host_name" => $hostname
+ );
+ if(!$servicename){
+ $x=get_xml_host_objects($args);
+ if($x->host)
+ return $x->host;
+ } else {
+ $args["service_description"] = $servicename;
+ $x=get_xml_service_objects($args);
+ if($x->service)
+ return $x->service;
+ }
+
+ return false;
+ }
+
function freevariabletab_component_get_freevariables($hostname,$servicename=null){
@@ -126,4 +160,4 @@
-?>
\ No newline at end of file
+?>