Looking at this screenshot
I've used the calendar icon to select a specific date to display historical data for, this can be seen highlighted.
Question 1)
Is there a way to specify a time period as well as the date?
Question 2)
Is there a way to specify a time period that spans multiple dates?
Thanks
Troy
Question: Are you able to specify a time range for a graph?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Question: Are you able to specify a time range for a graph?
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.
Re: Question: Are you able to specify a time range for a graph?
There should be, most RRD graphing tools allow arbitrary start/stop/granularity to be specified. We use PNP as a backend graphing tool and once you get the URLs you want you can add them to custom dashlets.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Question: Are you able to specify a time range for a graph?
I have a co-worker asking me to display a performance graph from two days ago between 7am - 11am.
How would I do this using the Nagios XI interface?
It lets me select a specific date
This then shows the date and time period above the graph (see screenshot in original post).
The time period is 20:00:00 - 00:00:00
How do I customize this time period to be 07:00:00 - 11:00:00?
How would I do this using the Nagios XI interface?
It lets me select a specific date
This then shows the date and time period above the graph (see screenshot in original post).
The time period is 20:00:00 - 00:00:00
How do I customize this time period to be 07:00:00 - 11:00:00?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Question: Are you able to specify a time range for a graph?
The best I can do is direct you to the PNP documentation.
http://docs.pnp4nagios.org/pnp-0.4/timeranges
http://docs.pnp4nagios.org/pnp-0.4/timeranges
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Question: Are you able to specify a time range for a graph?
The link you provided has some information that looks like it's easy to manipulate the URL's however if you try the example it doesn't work.
To use the example without the &end=-1week would give me:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&srv=PING
To use the example with the &end=-1week would give me:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&srv=PING&end=-1week
1969 / 1970 ... what the ???
I was showing this to a collegue and showed him the graph for the past 24 hours for the date 2010-05-26. The URL is:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&service=PING&source=1&view=1&start=&end=&mode=2&service_id=86&end=1274882400
I had been playing around with the number 1274882400 and had already worked out that 86400 is the amount of seconds in a 24 hour period. I had also understood that &view= changes between 4 Hour / 24 Hour / Week / Month / Year.
He pointed out that 1274882400 is probably the amount of seconds that has past since the Unix Epoch date, this being January 1, 1970.
He is correct. For the 24 hour view for the date 2010-05-26 the amount of seconds is 1274882400.
With the numbers below I need to take into account my timezone GMT+10.
So to answer my original question:
2010-04-14 11:00:00 = 1271206800
The custom URL would be:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&srv=PING&start=1271192400&end=1271206800
And it shows the graph for the time period 7am - 11am.
Although I might note that the graph is saying that it is for the period 2010-04-13 11:00:00 to 2010-04-14 11:00:00 but I suspect this has something to with the built in views (however the URL does not have the view specified).
Question:
Why does the implementation of PNP in Nagios XI operate differently to the examples on the PNP documentation site?
The PNP documentation does not even explain the use of epoch values.
All examples are reproducible using the localhost ping service.Additionally you can influence the end of the timeranges via the URL. This can be useful to automatically create PDF documents. The ranges can be defined using the option “end”.
Example:Code: Select all
http://<Nagios host>/pnp/index.php?host=<hostname>&srv=<servicedesc>&end=-1week
To use the example without the &end=-1week would give me:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&srv=PING
To use the example with the &end=-1week would give me:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&srv=PING&end=-1week
1969 / 1970 ... what the ???
I was showing this to a collegue and showed him the graph for the past 24 hours for the date 2010-05-26. The URL is:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&service=PING&source=1&view=1&start=&end=&mode=2&service_id=86&end=1274882400
I had been playing around with the number 1274882400 and had already worked out that 86400 is the amount of seconds in a 24 hour period. I had also understood that &view= changes between 4 Hour / 24 Hour / Week / Month / Year.
He pointed out that 1274882400 is probably the amount of seconds that has past since the Unix Epoch date, this being January 1, 1970.
He is correct. For the 24 hour view for the date 2010-05-26 the amount of seconds is 1274882400.
With the numbers below I need to take into account my timezone GMT+10.
So to answer my original question:
2010-04-14 07:00:00 = 1271192400Fri Apr 16, 2010 wrote:I have a co-worker asking me to display a performance graph from two days ago between 7am - 11am.
How would I do this using the Nagios XI interface?
2010-04-14 11:00:00 = 1271206800
The custom URL would be:
http://<Nagios host>/nagiosxi/perfgraphs/index.php?&host=localhost&srv=PING&start=1271192400&end=1271206800
And it shows the graph for the time period 7am - 11am.
Although I might note that the graph is saying that it is for the period 2010-04-13 11:00:00 to 2010-04-14 11:00:00 but I suspect this has something to with the built in views (however the URL does not have the view specified).
Question:
Why does the implementation of PNP in Nagios XI operate differently to the examples on the PNP documentation site?
The PNP documentation does not even explain the use of epoch values.
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.
Re: Question: Are you able to specify a time range for a graph?
The answer to your question is that NagiosXI sends your browser an image URI that then hits a NagiosXI php script that sends an HTTP client request to Apache to fetch the data from PNP.
You can discover the URLs the graphs are located at by looking at the access_log, requests from 127.0.0.1. I'd wager PNP is loaded at /nagios/pnp and not /pnp, or /nagiosxi/pnp.
http://go.nagios.com/tracker/56
You can discover the URLs the graphs are located at by looking at the access_log, requests from 127.0.0.1. I'd wager PNP is loaded at /nagios/pnp and not /pnp, or /nagiosxi/pnp.
http://go.nagios.com/tracker/56
Re: Question: Are you able to specify a time range for a graph?
Nagios XI only uses the backend portion of PNP to generate the RRD graphs. The XI interface for performance graphs is completely rebuilt and while similar to, different than PNP. While there is currently no nice UI to include custom dates/times, you can pass UNIX epoch timestamps in the start and end query parameters to get the graph you want.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Ethan Galstad
President
Ethan Galstad
President