Nagvis: display of a service in graphic

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Athanor027
Posts: 18
Joined: Mon Jan 27, 2014 7:30 am

Nagvis: display of a service in graphic

Post by Athanor027 »

Hello,

With Nagvis, when I slide the timekeeper of the mouse on an icon Service (Ping for example), I obtain the display by default from lines of the service Ping (Host Name - Name - State service - Output)

I wanted to know if I could have (not the service line), but directly the graph pnp4nagios of the traffic ping) without clicking.

I thank you for it in advance.

Best Regards,
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagvis: display of a service in graphic

Post by rkennedy »

I'm a bit confused what you're looking for, could you show us a screenshot as an example?
Former Nagios Employee
Athanor027
Posts: 18
Joined: Mon Jan 27, 2014 7:30 am

Re: Nagvis: display of a service in graphic

Post by Athanor027 »

Hello,

In the passage of the mouse, I obtain the image: Before.jpg.

I would want not the services, but a graph ( After.jpg).

Best Regards
Attachments
After.jpg
After.jpg (25.58 KiB) Viewed 4657 times
Before.jpg
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagvis: display of a service in graphic

Post by tmcdonald »

It is still not clear what you are looking to do, and the images provided are very small. I do not recognize the bottom image. Can you please describe what you want, in detail, and provide larger screenshots?
Former Nagios employee
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: Nagvis: display of a service in graphic

Post by nozlaf »

if you set the line to depict a single host or service you will get a graph however you have selected a servicegroup so you are getting the summary for the group
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
Athanor027
Posts: 18
Joined: Mon Jan 27, 2014 7:30 am

Re: Nagvis: display of a service in graphic

Post by Athanor027 »

Hello,

By default, on Nagvis, when we move the mouse on an icon (without clicking), we obtain the status of every dedicated service (see photo 1).

What I wish, it is not the status of the services (ping for example), but a graph ( pnp4nagios ) (see photo 2)

Best Regards
Attachments
Behavior by default (in the passage of the mouse, without clicking)
Behavior by default (in the passage of the mouse, without clicking)
The result (in the passage of the mouse, without clicking).<br />A graph instead of the standard display.
The result (in the passage of the mouse, without clicking).
A graph instead of the standard display.
Athanor027
Posts: 18
Joined: Mon Jan 27, 2014 7:30 am

Re: Nagvis: display of a service in graphic

Post by Athanor027 »

Hello,

The display is even if I select a single service, it posts the line of ping and not the ping graph.

Best Regards
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: Nagvis: display of a service in graphic

Post by nozlaf »

so to achieve this the hover_template on my system needs to be set to "default-pnp"

this is vary from system to system depending on how you have configured it etc..
because my nagvis is very old and has been upgraded many times I don't know if that's what the template is called by default or what it contains


but this is what I have in my template file


this is the contents of my /usr/local/nagvis/share/userfiles/templates/default-pnp.hover.html file

Code: Select all

<table class="hover_table">
        <tr><th colspan="2">[lang_obj_type]</th></tr>
        <tr><td class="label"><label>[lang_instance]</label></td><td>[obj_backend_instancename] (Backen-ID: [obj_backendid])</td></tr>
        <tr><td class="label"><label>[lang_name]</label></td><td>[obj_name]</td></tr>
        <tr><td class="label"><label>[lang_alias]</label></td><td>[obj_alias]</td></tr>

        <!-- BEGIN service -->
        <tr><td class="label"><label>[lang_service_description]</label></td><td>[service_description]</td></tr>
        <!-- END service -->

        <tr><td class="spacer" colspan="2"></td></tr>
        <tr><td class="label[obj_summary_state]"><label>[lang_summary_state]</label></td><td class="state[obj_summary_state]">[obj_summary_state][obj_summary_in_downtime][obj_sum$
        <tr><td class="label"><label>[lang_summary_output]</label></td><td>[obj_summary_output]</td></tr>

        <!-- BEGIN service -->
        <tr><td class="label"><label>[lang_current_attempt]</label></td><td>[obj_current_check_attempt]/[obj_max_check_attempts]</td></tr>
        <tr><td class="label"><label>[lang_state_type]</label></td><td>[obj_state_type]</td></tr>
        <tr><td class="label"><label>[lang_last_check]</label></td><td>[obj_last_check]</td></tr>
        <tr><td class="label"><label>[lang_next_check]</label></td><td>[obj_next_check]</td></tr>
        <tr><td class="label"><label>[lang_last_state_change]</label></td><td>[obj_last_state_change]</td></tr>
        <!-- END service -->

        <tr><td class="spacer" colspan="2"></td></tr>
        <tr><td colspan="2">
                <table>
                        <tr><th><label>PNP-Graph</label></th>
                        <tr></td><td><img src=/pnp4nagios/image?host=[pnp_hostname]&srv=[pnp_service_description]&display=image&view=0></td></tr>
                </table>
        </td></tr>
</table>
Attachments
this is what you want i think
this is what you want i think
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
Athanor027
Posts: 18
Joined: Mon Jan 27, 2014 7:30 am

Re: Nagvis: display of a service in graphic

Post by Athanor027 »

Hello,

I modified the file.
It works, thank you very much. :) :) :)

Best Regards,

Xavier
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagvis: display of a service in graphic

Post by rkennedy »

Awesome @nozlaf!

@Athanor027 - are we good to mark this thread as resolved?
Former Nagios Employee
Locked