View Full Version : History frame of Graphs in Screens
Wolfgang
19-04-2005, 14:20
Hello,
in Version 1.1A7 setting up some "screens" that contain "graphs", all graphs are defined with 1h history.
How can i define "graphs" to be used in "screens", that have for example 1day or 1month history?
would love to know how to do something like that as well. The graphs appear to display just 1 hr by default and I haven't been able to find anything in the documentation of the forum where it is mentioned that this can be changed or even why it is so.
Ok figured out how to view graphs of specific time periods. The 1hr history is just the default that you see in the configuration section. If you click on View -> Graphs you will be able to choose the graphs you have created from a drop down menu. You will then be able to easily select the specific time period that you want to view you graphs, from weekly, monthly, year or certain hour blocks. All the stats you could want.
You can get plain text reports of data that you could import into a spreadsheet by going to View -> Latest Data -> Select the host -> Click on the Graph link for the specific Item eg no. of processes. You click on "values in plain text format" you can then select the specifc time period that you want and it will be displayed in a plain text page that you could easily paste into a spreadsheet. Handy if you need to produce a regular monthly report of the server stats.
dminstrel
17-06-2005, 16:19
That works, but there's something strange about the Y-scale.
If you look at the example I've attached, the graph maxes at 175Kb but the data peaks at 30Kb, so I loose a lot of detail.
Is it possible that the Y-scale for the graph uses the max for the entire data range for the Item even though that max is not in the current graph period? (am I making any sense? :) )
Still, it would be nice to be able to specify a default time period for graphs in the Screen module.
Cheers,
Jonathan
illumin8
17-06-2005, 21:10
If you look at the example I've attached, the graph maxes at 175Kb but the data peaks at 30Kb, so I loose a lot of detail.
Look a little more closely at the graph you just posted. The Max reading from one of the items is "114". Even though this was probably just a single data point, that's what Zabbix is using to calculate the max of the graph. My guess is that you're looking at a larger time frame, where not every point ended up on the graph. The 114 max point isn't displayed visibly, but it affects the Y-axis because it's calculated using that value. If you dropped down to a 1-hour graph you might be able to view that data point.
dminstrel
18-06-2005, 02:42
Yeah, that was my whole point. :) It would be nice if the graphs in Zabbix scaled to only the data points shown on the graph time period. For system administration purposes, it's hard to notice trends looking a 1 hour graphs. So having an adequate amount of detail for daily, weekly, monthly and yearly graphs is hopefully on the TODO for future releases of Zabbix.
Nate Bell
20-06-2005, 16:56
I've run into this problem several times myself. My solution was to make another graph with hand entered y-axis values, but this is pretty clunky.
It would be great if a future release of Zabbix allowed you to change the y-axis from calculated to having a min and max value while viewing the graph, instead of only when defining the graph. It would make analyzing a graph over a long period easier, especially if there are spikes like in the example above.
Nate
My company would like to move away from MRTG to something more flexible, like zabbix. The only bug standing in our way is this one: We need our default "screens" to show data for the past day. (The above solution forces the user to leave the "screen," click to change the time-frame, and view each "graph" separately)
... Then by clicking the graph from the "screen", we should get the day graph again, and also the weekly and yearly graphs.
Is this possible to implement?
Is this the proper place to post a feature request such as this?
Thank you very much for your time, and for the great tool.
mconigliaro
18-08-2005, 17:48
no offense to zabbix, but if you're looking for an mrtg replacement, you should check out cacti (http://www.cacti.net/).
dminstrel:
I think this is working properly (often too properly for my tastes) and that is also the cause of your problem. I posted in another thread about the resolution of the datapoints used to plot the graphs in > 24hour time windows and how it seems to really fall off and I think that's what's happening to you here.
the value ranges for the time period are most likely correct, that is that the data did peak at 114 somewhere WITHIN your seven day window. However, when the graph is plotted, it takes the data from that time and divides it up to get a number of points to plot. The 114 point was probably not within the subset of data that made the actual display even though it was a valid range for the time period, hence the bad scaling of the graph (and the relatively weak resolution of the data display).
If that makes any sense.
to illustrate what I mean, open a graph for something that moves about a lot, cpu usage, io wait, or something of the like; and select a time period of 24 hours. Note how detailed the display of data is. Now click the "+" to the right of the one hour mark in the time period bar in order to make the graph display 25 hours worth of data. Notice the drop off? it makes for misleading visualization, and is most likely the cause of your Y-axis issue IMO.
Then again, what the hell do I know..... :)
Actually, alexei, the method I described above with adding 1 hour to the graph appears broken in the 1.1alpha12 frontend (still says 1.1alpha11 btw) I know it worked in 1.1alpha10 as I used it frequently.
But again. Is it possible to have daily views in the "screen"?
erisan500
23-08-2005, 19:59
As a complete php & linux noob i managed to show 1 day graphs in the screens.
The sollution is pretty simple. Edit screens.php and almost at the end you will see the following:
if($resource == 0)
{
echo "<a href=charts.php?graphid=$resourceid><img src='chart2.php?graphid=$resourceid&width=$width&height=$height&period=3600&border=0' border=0></a>";
}
else if($resource == 1)
{
echo "<a href=history.php?action=showhistory&itemid=$resourceid><img src='chart.php?itemid=$resourceid&width=$width&height=$height&period=3600&border=0' border=0></a>";
}
all you need to do is replace the number after 'period' from 3600 to 86400.
so it becomes like this:
if($resource == 0)
{
echo "<a href=charts.php?graphid=$resourceid><img src='chart2.php?graphid=$resourceid&width=$width&height=$height&period=86400&border=0' border=0></a>";
}
else if($resource == 1)
{
echo "<a href=history.php?action=showhistory&itemid=$resourceid><img src='chart.php?itemid=$resourceid&width=$width&height=$height&period=86400&border=0' border=0></a>";
}
This is a quick (and dirty ?) sollution to show other time periods in the screens.
Greetings EriSan
That you veru much! That was exactly what I was looking for!
One question though. If I use a non-standard value, such as 115200 (1d8h), it doesn't display any information. This isn't such a big issue, as 1d is enough for us, but I'm curious as to why this is.
Kudos.
That you veru much! That was exactly what I was looking for!
One question though. If I use a non-standard value, such as 115200 (1d8h), it doesn't display any information. This isn't such a big issue, as 1d is enough for us, but I'm curious as to why this is.
Kudos.
This used to work (see my post above)
I think it may be a bug.
This used to work (see my post above)
I think it may be a bug.
Anything <=1 day works well. Anything over one day gives me empty graphs.
...although under the graphs, it does give me min/max values, etc...