Page 1 of 1

PNP graph in Nagvis with Nagios XI don't show

Posted: Wed Sep 27, 2017 5:55 am
by lewandowskim
Hello,

I've got problem with my Nagvis bulid in Nagios XI because it don't show PNP graph.
It's looks like in attachment.

Here is content of my default-pnp.hover.html:

Code: Select all

<table class="hover_table">
    <tr><th colspan="2">[lang_obj_type] ([lang_last_status_refresh]: [last_status_refresh])</th></tr>
    <tr><td class="label"><label>[lang_name]</label></td><td>[obj_name][obj_alias_braces]</td></tr>
    <!-- BEGIN service -->
    <tr><td class="label"><label>[lang_service_description]</label></td><td>[service_description]</td></tr>
    <!-- END service -->
    <!-- BEGIN host -->
    <tr><td class="label label[obj_state]"><label>[lang_state]</label></td><td class="state[obj_state]">[obj_state] [obj_in_downtime][obj_acknowledged] ([obj_state_type] - [obj_current_check_attempt]/[obj_max_check_attempts])</td></tr>
    <tr><td class="label"><label>[lang_output]</label></td><td>[obj_output]</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 host -->
    <tr><td class="label label[obj_summary_state]"><label>[lang_summary_state]</label></td><td class="state[obj_summary_state]">[obj_summary_state] [obj_summary_in_downtime][obj_summary_acknowledged]</td></tr>
    <tr><td class="label"><label>[lang_summary_output]</label></td><td>[obj_summary_output]</td></tr>
    <!-- BEGIN service -->
    <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=/nagiosxi/html/includes/components/perfdata/graphApi.php?host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=1&start=&end=&rand=1410817866></td></tr>
                </table>
        </td></tr>
</table>
I don't know what else I can check.

I'm using Nagios XI 5.4.10 and Nagvis 1.5.9.

Any suggestions?

Re: PNP graph in Nagvis with Nagios XI don't show

Posted: Wed Sep 27, 2017 12:11 pm
by scottwilkerson
At a bare minimum you will need to change this

Code: Select all

<img src=/nagiosxi/html/includes/components/perfdata/graphApi.php?host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=1&start=&end=&rand=1410817866>
to this

Code: Select all

<img src="/nagiosxi/html/includes/components/perfdata/graphApi.php?host=[pnp_hostname]&service=[pnp_service_description]&source=1&view=1&start=&end=&rand=1410817866" >
because without the quotes, the service name has spaces in it and breaks it into additional attributes.