Add Line information at the Host/Service Detail Screen

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gfesj69
Posts: 59
Joined: Fri Jan 03, 2014 10:04 am
Location: Brazil

Add Line information at the Host/Service Detail Screen

Post 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
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Add Line information at the Host/Service Detail Screen

Post 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
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Add Line information at the Host/Service Detail Screen

Post 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
+?>
You do not have the required permissions to view the files attached to this post.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Add Line information at the Host/Service Detail Screen

Post by WillemDH »

Questrad, can this be a clickable url?
Nagios XI 5.8.1
https://outsideit.net
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Add Line information at the Host/Service Detail Screen

Post by questrad »

I think yes
But you need to use Notes_Url
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Add Line information at the Host/Service Detail Screen

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Add Line information at the Host/Service Detail Screen

Post by questrad »

Dear Forum Admins,

Where I need to submit future request?

Here, http://tracker.nagios.org/, I did not found NagiosXI project

Thanks
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Add Line information at the Host/Service Detail Screen

Post by WillemDH »

Nagios XI 5.8.1
https://outsideit.net
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Add Line information at the Host/Service Detail Screen

Post by tmcdonald »

For clarification, the .org site is for our free open-source products, and the .com site is for our commercial products.
Former Nagios employee
gfesj69
Posts: 59
Joined: Fri Jan 03, 2014 10:04 am
Location: Brazil

Re: Add Line information at the Host/Service Detail Screen

Post by gfesj69 »

Thanks for everyone's help !

Geraldo
Locked