Page 3 of 3
Re: Manipulating trend charts
Posted: Wed Feb 15, 2012 3:46 pm
by scottwilkerson
cwscribner wrote:Charts are back

They're missing a bunch of data though. Any way to remedy that?
Time might remedy it if the npcd daemon was erroring while rrdtool was missing, but I'm not totally sure about this... I haven't seen a case where rrdtool has gone missing before.
Re: Manipulating trend charts
Posted: Mon Feb 20, 2012 4:54 pm
by cwscribner
Wanted to revive this thread as its still on my ToDo list. Any further thoughts on making 30 minutes the default view for graphs?
Re: Manipulating trend charts
Posted: Tue Feb 21, 2012 9:52 am
by scottwilkerson
I'm gonna make a second attempt at this, but this really isn't ideal because the component can and will get overwritten in future releases as well as I'm not going to go into changing all of the other hard coded timeframes that this will put off a bit.....
That being said, here we go.
make a backup of graphApi.php just in case, and then try the following:
on about line 169, change
Code: Select all
$pnpviews = array('-4h', '-24h', '-7d', '-30d','-365d');
//timestamp conversions for PNP views
$pnpstamps = array((60*60*4), (60*60*24), (60*60*24*7), (60*60*24*30), (60*60*24*365) );
to this
Code: Select all
$pnpviews = array('-4h', '-30m', '-7d', '-30d','-365d', '-24h');
//timestamp conversions for PNP views
$pnpstamps = array((60*60*4), (60*30), (60*60*24*7), (60*60*24*30), (60*60*24*365), (60*60*24) );
Re: Manipulating trend charts
Posted: Tue Feb 21, 2012 12:49 pm
by cwscribner
Well, I think I'll have to sweet talk the client out of this one until there's something more permanent.
The change did make the graphs show a 30m window, but when selecting another time period you lose the ability to change it back. Even after clearing the cache and refreshing the page, you still can't get the 30m window back. Could I make a formal request to have 30m be a standard time period?
Re: Manipulating trend charts
Posted: Tue Feb 21, 2012 3:20 pm
by scottwilkerson
You can add this as a feature request on our tracker
http://tracker.nagios.com/
Re: Manipulating trend charts
Posted: Tue Feb 21, 2012 3:24 pm
by cwscribner
I'll have to leave that up to you to add. I've tried several times in the past to register and post feature requests but the registration has yet to work.
Re: Manipulating trend charts
Posted: Tue Feb 21, 2012 4:37 pm
by scottwilkerson