Page 1 of 1
Highcharts custom axis and time period for Nagios XI
Posted: Wed Jan 07, 2015 2:50 pm
by dgatlas
Under Servicegroup Summary > Service column > graph icon, I need to change the graph to show a custom x axis (monday to sunday).
I've made a custom check script that adds perfdata in the form of hours so I want to show the hours usage of something for each day of the week.
How do I customize this graph?
Code: Select all
$ uname -r
2.6.32-431.29.2.el6.x86_64
Manual install
No Gnome
No proxy
No SSL
Note: Our CFO is in the process of purchasing a license so I do not have access to the Nagios XI Customer Support forum and I need to get this solved asap.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Thu Jan 08, 2015 2:16 pm
by sreinhardt
We are definitely going to have to test this one out. More than likely we will need to setup a pnp template so that your rrds will accept less than 5 minute intervals without pushing in false nans. Then its up to highcharts to see if it will respect the timings we put in to the pnp configs or not. I'll have a chat with a developer and see.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Mon Jan 12, 2015 6:27 pm
by dgatlas
Any response from a developer?
Also, can you move this post to the Customer forum please.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Tue Jan 13, 2015 4:56 pm
by sreinhardt
Yes, according to our developers there are some options on the highcharts side that can be used to change labels. Additionally, highcharts should auto set x intervals to timeframes defined in your rrds. So if you have setup the nagios check for once an hour, and the pnp templates for once an hour, highcharts should respect that. At this point, would I be correct in guessing that the pnp and rrd changes have not been made? If not, we can find some instructions to send you and begin working through this.
Also note, this has been moved to the customer forum.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Tue Jan 13, 2015 5:04 pm
by dgatlas
Great. Yes, the pnp and rrd changes have not been made, please send me some instructions. Especially locations of there these pnp and rrd files are stored.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Wed Jan 14, 2015 5:05 pm
by tmcdonald
We would need to have a developer weigh in on this. We don't really have instructions currently existing to do this specifically since it's somewhat specific to your environment. What I can say is that the RRDs are under /usr/local/nagios/share/perfdata and the pnp stuff is a component I believe at /usr/local/nagiosxi/html/includes/components/pnp/, but again I will need to defer to a developer for specifics.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Wed Jan 14, 2015 5:47 pm
by lgroschen
http://api.highcharts.com/highcharts#xAxis.startOfWeek
I think you will need to make this change before the highcharts graph is drawn where it is being sent the parameters in an array. Therefore, I would read through the above documentation since the xAxis section has all kinds of goodies to be able to customize it. I'm not sure how you feel about changing php files, but I'm sure we can come up with a solution if you figure out which area you want to manipulate.
Re: Highcharts custom axis and time period for Nagios XI
Posted: Fri Feb 06, 2015 5:17 pm
by dgatlas
I'm fine with changing PHP files. Can you tell me the files I'd need to edit?
Re: Highcharts custom axis and time period for Nagios XI
Posted: Mon Feb 09, 2015 2:44 pm
by tmcdonald
Highcharts is a pretty complicated beast, but I know when you click that graph icon it calls the function graphexplorer_display_graph() which is located in /usr/local/nagiosxi/html/includes/components/graphexplorer/includes/graphexplorerinclude.js
Anything in the /usr/local/nagiosxi/html/includes/components/graphexplorer folder should be worth looking at for these changes. Until a developer can give a more specific location, that is where I would start.
Just keep in mind that any changes made there will likely be wiped by a future upgrade, and custom modifications fall outside of our support contract.