Working code for Performance Graphs Specific Time Selection

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Working code for Performance Graphs Specific Time Selection

Post by Box293 »

After much learning I've adjusted ;) some code that allows for time selection in the perfgraphs sidebar.

It's still a little buggy, some things I would like to resolve:
  • After viewing a specific time period, the select boxes no longer update when I click the predefined time selections
    Prettier Year / Month / Day selector, preferably a drop down calendar
    There is no code that determines if the start date is before the end date and vice versa
Here's a screenshot of it in action:
Specific Time Selection In Action.png
I'm also curious if it possible to make this into a component that could be added to Nagios XI.

Thoughts / comments / suggestions ???


The attached file is the customised index.php from /usr/local/nagiosxi/html/perfgraphs
index.zip
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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Working code for Performance Graphs Specific Time Selection

Post by mguthrie »

Very cool!

I'll put this on my TODO list and take a look at the code. Adding a sleeker calendar and the fixes you mentioned shouldn't be too hard. I think having it as an installable component is a great idea as well. Thanks for the work on this!
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: Working code for Performance Graphs Specific Time Selection

Post by admin »

Actually, in the latest code this is already possible. It will be included in the 2009R1.4 release shortly.

The end date can include hours, minutes seconds like so:

2011-01-01 13:14:23

The start date/time is automatically calculated based on 1) the end date and 2) the time selection (4 hour, 24 hour, etc)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Working code for Performance Graphs Specific Time Selection

Post by Box293 »

Cheers.

I'll download the latest code on a test VM and check it out.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Working code for Performance Graphs Specific Time Selection

Post by rdedon »

Thank you and keep us up to date :-)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Working code for Performance Graphs Specific Time Selection

Post by Box293 »

I've had a play with the latest code and to be honest it doesn't give me the functionality I am after.

While the latest code allows me to specify the end date and time, I am still locked in to the pre-defined time selections available to me.

Being able to dial into a specific time period is what I am acheiving with the code I have supplied.

Some examples of why:
  • Reporting issues to service providers, I want to show them a time period less than four hours
    I make a change to a server that will affect it's performance. One week later I want to view the past two weeks so I can compare the week before the change and the week after the change
I do like the predetermined time selections already available as they offer access to quick graphs but there are many times when I need to be able to select the time period I am after.

Perhaps being able to add this functionality as a component allows for customisations that suit different needs.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Working code for Performance Graphs Specific Time Selection

Post by mguthrie »

I'll keep it on my TODO list to turn what you have into a component. I'm guessing you won't be the only user who would prefer more advanced options.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Working code for Performance Graphs Specific Time Selection

Post by Box293 »

Cool bananas.

Let me know if there is anything you need me to do.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Working code for Performance Graphs Specific Time Selection

Post by rdedon »

Thanks again :)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked