Page 1 of 2
Add Line information at the Host/Service Detail Screen
Posted: Tue Nov 04, 2014 6:53 pm
by gfesj69
We are using Nagios XI 2014R1.4, we would to know, if we can add a line at Service Status Detail.
Some thing like this ( red line )
The main goal is to give information to our NOC“s personal, with quick actions, as a guide.
It is possible to do this?
Geraldo
Re: Add Line information at the Host/Service Detail Screen
Posted: Wed Nov 05, 2014 10:53 am
by slansing
Does it need to be below the Alias? The reason I ask is this can already be done with the notes component, it's just in a separate tab:
http://exchange.nagios.org/directory/Ad ... nt/details
Re: Add Line information at the Host/Service Detail Screen
Posted: Wed Nov 05, 2014 1:08 pm
by questrad
I think gfesj69 means something like this one.
And I am totally agree with him to have that in NagiosXI.
The Note tab are good as well, but you cannot put any information during the host configuration.
I think the Note tab is ideal when we need to write some notes if there is any changes on Host or Service as "notice" for other technician who used NagiosXI and also, how I understand - any one can make changes in Note tab.
But no one exclude Nagios admin can do any changes in Notes in Misc Configuration.
ServiceStatusDetail.jpg
HostStatusDetail.jpg
And reference in configuration:
Config_HostStatusDetail.jpg
And here is diff that I made in Nagios XI 2014R1.5
/tmp/status-object-detail.inc.php - the original file
Code: Select all
[Wed Nov 05 12:54:09] root@sq5vplngs001:/usr/local/nagiosxi/html/includes/components/xicore# diff -u /tmp/status-object-detail.inc.php status-object-detail.inc.php
--- /tmp/status-object-detail.inc.php 2014-11-05 12:13:49.449498489 -0500
+++ status-object-detail.inc.php 2014-11-05 12:54:07.212085325 -0500
@@ -9,7 +9,7 @@
////////////////////////////////////////////////////////////////////////
-// SERVICE DETAIL
+/// SERVICE DETAIL
////////////////////////////////////////////////////////////////////////
function show_service_detail()
@@ -18,7 +18,6 @@
$host = grab_request_var("host", "");
$service = grab_request_var("service", "");
-
$service_id = get_service_id($host, $service);
if (is_authorized_for_service(0, $host, $service) == false) {
@@ -165,6 +164,31 @@
</div>
<!--state summary-->
+ <!--Added by VH-->
+
+ <br clear="all">
+ <div style="float: left; margin-bottom: 25px; clear: left;">
+ <?php
+ // get host info
+ $args = array(
+ "service_id" => $service_id,
+ );
+ $configxml = get_xml_service_objects($args);
+
+ //echo "<PRE>\n";
+ //print_r($xml);
+ //echo "</PRE>\n";
+
+ if ($configxml && intval($configxml->recordcount) > 0) {
+ foreach ($configxml->service as $s) {
+ $notes = strval($s->notes);
+ }
+ }
+ ?>
+ <br><b><?php echo gettext("Note"); ?>:</b> <?php echo $notes; ?><br/>
+ </div>
+
+ <!--End added by VH-->
<br clear="all">
@@ -705,7 +729,7 @@
////////////////////////////////////////////////////////////////////////
-// HOST DETAIL
+/// HOST DETAIL
////////////////////////////////////////////////////////////////////////
function show_host_detail()
@@ -875,10 +899,13 @@
if ($configxml && intval($configxml->recordcount) > 0) {
foreach ($configxml->host as $h) {
$address = strval($h->address);
+ $notes = strval($h->notes); // Added by VH in Host detail function
}
}
?>
<b><?php echo gettext("Address"); ?>:</b> <?php echo $address; ?>
+ <!--Added by VH in Host detail function-->
+ <br><b><?php echo gettext("Note"); ?>:</b> <?php echo $notes; ?><br/>
</div>
<br clear="all">
@@ -1677,4 +1704,4 @@
return $output;
}
-?>
\ No newline at end of file
+?>
Re: Add Line information at the Host/Service Detail Screen
Posted: Wed Nov 05, 2014 1:56 pm
by WillemDH
Questrad, can this be a clickable url?
Re: Add Line information at the Host/Service Detail Screen
Posted: Wed Nov 05, 2014 3:07 pm
by questrad
I think yes
But you need to use Notes_Url
Re: Add Line information at the Host/Service Detail Screen
Posted: Wed Nov 05, 2014 5:49 pm
by abrist
Additionally, you could look at the "actions" component as it is very powerful and can support clickable links leveraging nagios macros/free variables:
http://assets.nagios.com/downloads/nagi ... ponent.pdf
Re: Add Line information at the Host/Service Detail Screen
Posted: Wed Nov 05, 2014 6:41 pm
by questrad
Dear Forum Admins,
Where I need to submit future request?
Here,
http://tracker.nagios.org/, I did not found NagiosXI project
Thanks
Re: Add Line information at the Host/Service Detail Screen
Posted: Thu Nov 06, 2014 3:12 am
by WillemDH
Re: Add Line information at the Host/Service Detail Screen
Posted: Thu Nov 06, 2014 10:10 am
by tmcdonald
For clarification, the .org site is for our free open-source products, and the .com site is for our commercial products.
Re: Add Line information at the Host/Service Detail Screen
Posted: Thu Nov 06, 2014 12:47 pm
by gfesj69
Thanks for everyone's help !
Geraldo