Page 1 of 2
multiple service output on Nagvis hover menu
Posted: Wed Aug 29, 2018 3:49 am
by zaji_nms
Dear Expert
further our last post
https://support.nagios.com/forum/viewto ... 16&t=46878
Router1 , Giga0_1 Status (OK: Interface ge-0/1 (index 572) is up.)
Router1 , Giga0_1 Bandwidth (OK Current BW in: 1.7Mbps out: 3.5Mbps)
Router1 , Giga0_1 Latency (OK Current rtt: 53ms)
our issue did not resolve
Generally in Nagvis map, we adding only "Service Status" to view links proactively if its goes down (quickly will show red line), and its working fine (no issue), now what we want when we hover the mouse over the link (Service Status), other related info should display if its there.
Host=Router1 , Service=Giga0_1 Status (its fine as we adding this services as a line), showing GREEN when its UP, showing RED when its DOWN
however the same link - Giga0_1 having two below services
Host=Router1 , Service=Giga0_1 Bandwidth <<<< always there
Host=Router1 , Service=Giga0_1 Latency <<<<< may be there , may not be
when we hover the mouse , along with "Service Status", should show the output of "Service Bandwidth" and if its there "Service Latency"
Please go little extra mile and guide.......sure many other Nagios/Nagvis user will love it.
FYI, we added Bandwidth (as a Service) , when we hover it showing perfectly as said above (OK! Current BW in: 1.52Mbps out:2.53Mbps) and now able to view the graph too, but we want that there is already our main map, monitoring the Service=Status, when we hover it, should display the Bandwidth or best should show the Bandwidth and Latency graph.
After long trial and error below working but its not the solution.....just to tell you that graph is showing
added at the end default.hover.html
<table>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=0&display=image></td></tr>
</table>
Regards
Re: multiple service output on Nagvis hover menu
Posted: Wed Aug 29, 2018 1:34 pm
by tgriep
Take a look at page 11 of this document under the Add Service Lines section.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
It has instructions on how to setup a line to show the Bandwidth information for the link.
If that what you are looking for?
Re: multiple service output on Nagvis hover menu
Posted: Thu Aug 30, 2018 2:22 am
by zaji_nms
Please ref attached
we have added three services as follows
Status
Bandwidth
Latency
When we hover over it, the graphs are showing perfectly
but what we want, we will add only Status and when we hover mouse over it, the Bandwidth and Latency graph should show, you can say 3 in 1, just adding only Service=Status and the same will show the Bandwidth and Latency graph.
FYI, when we adding the links, the left side part of the link, keep same, only right part change and in the map(Nagvis) we just adding Status
Host , Service_Description
Router1 , Giga0_1 Status
Router1 , Giga0_1 Bandwidth
Router1 , Giga0_1 Latency
Router1 , Giga0_1 Ping
Router1 , Giga0_1 QoS
Router1 , Giga0_1 Packet_Loss
Router1 , Giga0_1 Jitter
Regards
Re: multiple service output on Nagvis hover menu
Posted: Thu Aug 30, 2018 2:36 pm
by cdienger
If you know which services you want to add, you can do so by adding additional code to default.hover.html. For example, the to get the graph for teh load service I added:
<table>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=0&display=image></td></tr>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=Load&source=1&view=0&display=image></td></tr>
</table>
This then displayed the graph of whichever service the line was created for as well as the graph for the load perfdata(if it exists).
Re: multiple service output on Nagvis hover menu
Posted: Sun Sep 02, 2018 4:04 am
by zaji_nms
Thanks for some hint but still no solution, your solution is based on hard coded SERVICE (load, CPU, Disk), we require graph based on dynamic SERVICE
in our case HOST will remain same and SERVICE will change
FYI, in our main dashboard (Nagvis Map) already we have added hundreds of services as below
Host , Service (all services added with Status), we want to monitor the link status which is very important , link UP or DOWN
Router1 , Giga0_1 Status
Router1 , Giga0_2 Status
Router1 , Giga0_4 Status
Router2 , Giga0_1 Status
Router2 , Giga0_3 Status
and so on......you can say 100 links (Service = Status)
(Service = Giga0_1 Status), in this Nagvis Hover, how it will change dynamically to show the graph of below services
Router1 , Giga0_1 Bandwidth
Router1 , Giga0_1 Latency
Router1 , Giga0_2 Bandwidth
Router1 , Giga0_4 Bandwidth
Router1 , Giga0_4 Latency
Router2 , Giga0_1 Bandwidth
Router2 , Giga0_3 Bandwidth
Router2 , Giga0_3 Latency
this is not PHP, we cannot do any scripting to replace Status with Bandwidth, to replace Status with Latency
how =[pnp_service_description] will change as we need
[pnp_service_description] = Giga0_1 Bandwidth or Giga0_1 Latency while we added only Giga0_1 Status
Regards
Re: multiple service output on Nagvis hover menu
Posted: Tue Sep 04, 2018 1:45 pm
by cdienger
It's not clear to me how you want to dynamically choose which services to display perdata for. Can you clarify? Right now I don't see a way to dynamically display service details but it may help to have some clarification on this.
Also, we are not the authors of Nagvis so you may want to pose this to the Nagvis team as well. We can certainly try to assist but they will be the experts on possible Nagvis configurations.
Re: multiple service output on Nagvis hover menu
Posted: Thu Sep 06, 2018 3:39 am
by zaji_nms
attention : cdienger
in Nagios we have these three services
HostName ,, Service
paris-7600-1 ,, GigabitEthernet2 Status
paris-7600-1 ,, GigabitEthernet2 Bandwidth
paris-7600-1 ,, GigabitEthernet2 Latency
in Nagvis we have added only one Service
paris-7600-1 ,, GigabitEthernet2 Status
when we hover over this NAGVIS service (paris-7600-1 ,, GigabitEthernet2 Status) we want to see GigabitEthernet2 Bandwidth and GigabitEthernet2 Latency graphs
Regards
Re: multiple service output on Nagvis hover menu
Posted: Thu Sep 06, 2018 11:06 am
by cdienger
@zaji_nms:
create a new template - I copied default.hover.html and called the new template default2.hover.html.
edit the new template accordingly - I added:
<table>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=GigabitEthernet2%20Bandwidth&source=1&view=0&display=image></td></tr>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=GigabitEthernet2%20Latency&source=1&view=0&display=image></td></tr>
</table>
-apply the new template to the service:
nagvis2_hover.png
It will result in something like:
nagvis_hover.png
Re: multiple service output on Nagvis hover menu
Posted: Sun Sep 09, 2018 1:05 am
by zaji_nms
@cdienger
in my last thread, that was just an example, we have hundreds of Host and Services
in Nagios we have these 1000 services
HostName ,, Service
paris-7600-1 ,, GigabitEthernet2 Status
paris-7600-1 ,, GigabitEthernet2 Bandwidth
paris-7600-1 ,, GigabitEthernet2 Latency
paris-7600-1 ,, GigabitEthernet3_0_0 Status
paris-7600-1 ,, GigabitEthernet3_0_0 Bandwidth
lon-jnpr-1 ,, ge-1_0_2 Status
lon-jnpr-1 ,, ge-1_0_2 Bandwidth
lon-jnpr-1 ,, ge-1_0_2 Latency
hkg-7300-1 ,, GigabitEthernet0_0 Status
hkg-7300-1 ,, GigabitEthernet0_0 Bandwidth
hkg-7300-1 ,, GigabitEthernet0_0 Latency
dxb-7200-1 ,, POS1_0 Status
dxb-7200-1 ,, POS1_0 Bandwidth
dxb-7200-1 ,, POS1_0 Latency
nyc-7600 ,, Giga_0_0_1 Status
nyc-7600 ,, Giga_0_0_1 Bandwidth
.
.
.
.
in Nagvis we have added only these services (just Status)
paris-7600-1 ,, GigabitEthernet2 Status
paris-7600-1 ,, GigabitEthernet3_0_0 Status
lon-jnpr-1 ,, ge-1_0_2 Status
hkg-7300-1 ,, GigabitEthernet0_0 Status
dxb-7200-1 ,, POS1_0 Status
nyc-7600 ,, Giga_0_0_1 Status
.
.
.
when we hover over this NAGVIS service (i.e Status), we want to see Bandwidth and/or Latency graphs respect to that Service
Regards
Re: multiple service output on Nagvis hover menu
Posted: Mon Sep 10, 2018 2:41 pm
by cdienger
I haven't been able to fully test this yet, but using
http://docs.nagvis.org/1.9/en_US/hover_templates.html, I think something like the following may work as long as you set the display name on the service:
<table>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=[obj_display_name]%20Bandwidth&source=1&view=0&display=image></td></tr>
<tr><td><img src=/nagiosxi/includes/components/perfdata/graphApi.php?ASP_Client=1&host=[pnp_hostname]&service=[obj_display_name]%20Latency&source=1&view=0&display=image></td></tr>
</table>
For example, edit:
paris-7600-1 ,, GigabitEthernet2 Status
paris-7600-1 ,, GigabitEthernet2 Bandwidth
paris-7600-1 ,, GigabitEthernet2 Latency
in the CCM and set the display name to GigabitEthernet2.