multiple service output on Nagvis hover menu

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

multiple service output on Nagvis hover menu

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: multiple service output on Nagvis hover menu

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: multiple service output on Nagvis hover menu

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: multiple service output on Nagvis hover menu

Post 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).
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: multiple service output on Nagvis hover menu

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: multiple service output on Nagvis hover menu

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: multiple service output on Nagvis hover menu

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: multiple service output on Nagvis hover menu

Post 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
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: multiple service output on Nagvis hover menu

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: multiple service output on Nagvis hover menu

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked