performance graph with more period

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

performance graph with more period

Post by zaji_nms »

Dear Expert

I edited below file to have 3 months, 6 months, 9 months period and working great.
/usr/local/nagios/etc/pnp/config.php

Please let us know which file has to edit for NagiosXI to display right side these more period options.

Regards
Zajil NMS
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: performance graph with more period

Post by abrist »

Are you using pnp4nagios or Highcharts? (I do not believe that Highcharts using this config)
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.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: performance graph with more period

Post by zaji_nms »

Dear Abrist/Expert

Using PNP , its very classic (old is gold).

I reached very near and edited below file, but graphs not showing (just showing ( x ) sign) instead of graph.
/usr/local/nagiosxi/html/perfgraphs/index.php

case PNP_VIEW_3MONTH:
$title .= " - " . gettext("3 Month View");
if ($end != "")
$start = $end - (60 * 60 * 24 * 90);
break;

<li>
<a href="<?php echo build_url_from_current(array("view" => 5, "start" => "", "end" => "", "startdate" => "", "enddate" => "")); ?>"><?php echo gettext("3Month View"); ?></a>
</li>

any developer can help further.

Regards
Zajil NMS
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: performance graph with more period

Post by jomann »

Hi Zaji,

We don't actually support mods like this just because we can't guarantee anything you do will work! However, that being said, you're missing places that the "VIEW" is defined which needs to be added in. One such location is in:

/usr/local/nagioxi/html/includes/components/pnp/pnp.inc.php on line 17, you need to add a definition for your new view of ID 5 since that's what actually allows the view id to be passed into that case statement you adjusted.

Please also note that you may want to make a patch of the files you changed purely because upon upgrade these files may be overwritten and you will lose the changes that you've made. I don't think we will be editing much in those files very soon so your patches should be okay for the next couple releases at least.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked