Check_Mk RRD File Average Value Mismatch - rrdtool

I am trying to pull the data from the Check Mk server RRD File for CPU and Memory. From that, am trying to find the MAX and Average value for the particular Host for 1 month period. For the maximum value, I have fetched the file from the Check_mk server using the RRD fetch command and I get the exact value when I compared the output in the check_mk graph but when I try to do the same for the Average value I get the wrong output which does not match the Check_mk graph value and RRD File raw value. Kindly refer to the attached images where I have verified the value for average manually by fetching the data but it shows the wrong output.
Hello #Steve shipway,
Please find the requested data.
1)Structure of RRD File. Attached the image.
2)We are not generating the graph from the Check_mk . We are generating the RRD File using rrdtool dump CPU_utilization.xml > /tmp/CPU_utilization1.xml rrdtool fetch CPU_utilization_user.rrd MAX -r 6h -s Starting Date-e ending date.
Share
enter image description here

Related

Tensorboard download Histogram's data

When extracting data "website link trick" (see https://github.com/tensorflow/tensorboard/issues/3543#issuecomment-618527147), the data end on 50 epochs, independent of number of epochs.
For example:
This histogram has 200 epochs and end on 200.
But when opened through "website link trick" as a JSON file, the data have only 50 epochs.
I have tried to diagnose it, and seems that Tensorboard initially loads 50 epochs, and then needs time to load the rest. The histogram graf gets lodade. Nevertheless, the JSON never gets refereshed!
Version of Tensorboard: TensorBoard 2.11.2 (latest)

get Second last modified data from rrd file using rrdtool

How to get Second last modified data from rrd file using rrdtool?
By command rrdtool lastupdate we can get only last modified data. I want to get second last modified data.
Can any one tell me?
If you mean to get the actual data submitted, then you cannot do this. Remember that RRDTool stores normalised and consolidated data, not the raw data.
rrdtool lastupdate with give you the point in time and raw data value(s) of the last actual update, before normalisation and consolidation. This is stored so that ongoing rates can be calculated. After the next update, this data is normalised and consolidated so is no longer available.
You can use rrdtool fetch to obtain the last entries in any RRA (after normalisation and colsolidation). You can specify which RRA to use by giving the requested data resolution and consolidtion factor. Depending on the nature of your data (Gauge vs. Counter) and the time of submission (on the interval boundary or not) then this may or may not be the same.
So, in summary, if you have a 5-minute-interval RRD, with a 1cdp=1pdp AVG RRA, and you submit data at 11:59, 12:04 and 12:08, then lastupdate will give you "12:08" plus the data value(s) submitted; fetch will give you "12:00" (the start of the only completed 5-min time bucket) plus the normalised data for the 12:00-12:05 bucket.

RRD Tool Graph is not generating correct for one week and yearly

I have a case where I have collected SNMP data and stored it via rrdtool.
for daily and weekly graph is coming correct but when i see monthly and yearly it is showing only that day portion not correct graph as shown below.
Daily Graph code is : (working correct)
/usr/bin/rrdtool graph /opt/elitecore/ManageEngine/AppManager11/working/graphs/daily-tps.png -v "TPS" -t "TIME" DEF:tps1=/root/graphs/Total_TPS.rrd:TPS:MAX -s -86400 CDEF:tps2=tps1,300,* LINE1:tps2#ff0000:TOTAL_TPS GPRINT:tps2:LAST:"Cur: %5.2lf" GPRINT:tps2:AVERAGE:"Avg: %5.2lf" GPRINT:tps2:MAX:"Max: %5.2lf" GPRINT:tps2:MIN:"Min: %5.2lf\t\t\t"
Monthly Graph code is : (not coming graph as expected)
/usr/bin/rrdtool graph /opt/elitecore/ManageEngine/AppManager11/working/graphs/monthly-tps.png -v "TPS" -t "WEEK" DEF:tps1=/root/graphs/Total_TPS.rrd:TPS:MAX -s -2592000 CDEF:tps2=tps1,300,* LINE1:tps2#ff0000:TOTAL_TPS GPRINT:tps2:LAST:"Cur: %5.2lf" GPRINT:tps2:AVERAGE:"Avg: %5.2lf" GPRINT:tps2:MAX:"Max: %5.2lf" GPRINT:tps2:MIN:"Min: %5.2lf\t\t\t"
Yearly Graph code is : (not coming graph as expected)
/usr/bin/rrdtool graph /opt/elitecore/ManageEngine/AppManager11/working/graphs/yearly-tps.png -v "TPS" -t "MONTH" DEF:tps1=/root/graphs/Total_TPS.rrd:TPS:MAX -s -31536000 CDEF:tps2=tps1,300,* LINE1:tps2#ff0000:TOTAL_TPS GPRINT:tps2:LAST:"Cur: %5.2lf" GPRINT:tps2:AVERAGE:"Avg: %5.2lf" GPRINT:tps2:MAX:"Max: %5.2lf" GPRINT:tps2:MIN:"Min: %5.2lf\t\t\t"
Kindly let me know if i am doing any wrong.
yours Faithfully
Jignesh Dholakiya
Answer
The graph only shows five day's worth of data in the graphs because that is all the data there is in your RRD. Your RRD is configured to automatically discard any data older than this.
Explanation
The graphs show that your RRD currently only has 6 days' worth of data to display. As you cannot graph data which you do not have, the graphs show what they do have, and nothing for the rest.
Your rrdtool info gives this for RRA definitions (trimmed for clarity):
step = 300
rra[0].cf = "MAX"
rra[0].rows = 1500
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
This means that you have a single RRA, type MAX, which has 1pdp per row and 1500 rows.
As a result, your RRA is (step)x(pdp per row)x(number of rows) long, which is 1500x300 seconds, which is a little over 5 days.
Since your RRD only has a single RRA, all of your graph functions will use this one -- doing additional consolidation on the fly if necessary. Thus all your graphs use this single RRA.
However, your RRA is only 5-and-a-bit days long. Therefore, data will be expired and discarded when it is this old. As a result, only the last 5-and-a-bit days' worth of data are available at any time for graphing, which is what you see in the graphs.
Solution:
You need to keep the data for longer. There are two ways to do this --
Increase the length of the existing RRA
Create additional RRAs to hold the consolidated data for the lower-resolution graphs.
Option 1 is the simplest, as you can use rrdtool tune to grow the size of RRA number 0. However, it is very expensive in disk space (since you will be keeping the detailed data for the entire time period), plus it is expensive in CPU (RRDtool will have to consolidate on the fly when making yearly graphs). This option is only recommended if you really need the high-resolution data for the entire period -- such as if you are calculating 95th Percentiles, for example.
Option 2 is the best. You add a new RRA, with the same CF but more pdp_per_row, for each graph you will be wishing to create. For a Weekly graph, use pdp_per_row=6 (for a half-hour consolidation), for Monthly use 24 (two-hourly) and for Yearly, use 288 (daily consolidation). As time goes by, the data will be consolidated up into these new RRA, and the graph functions will use them in preference. This is less computationally expensive, and uses less disk space; however you lose the high-resolution data over time, and your historical data will not be automatically consolidated into the new RRAs. Also, you cannot just add a new RRA to an existing RRD file -- you will need to either create a new RRD, or use a tool such as rrdmerge.

RRDTOOL and custom data

I'm trying to use rrdtool to make some graphs. But it's not working as i wanted...
Here is the situation:
I have a file with data that are collected every 30 seconds but i can access this file only the day after. For example if i want to graph Tuesday data, i have to wait Wednesday morning.
So what i have done is to create a new database with these information:
rrdtool create filename.rrd --step '30' 'DS:t634:GAUGE:60:U:U' 'RRA:AVERAGE:0.5:1:1000'
collected data:
rrdtool update filename.rrd 1390231080:1
rrdtool update filename.rrd 1390231110:2
rrdtool update filename.rrd 1390231140:3
rrdtool update filename.rrd 1390231170:4
....
generated a graph:
rrdtool graph 'graph.png' --width '400' --height '100' 'DEF:T634=filename.rrd:t634:AVERAGE' 'LINE1:T634#0000FF:T634'
I have a graph with no line on it...
Is my rrd file creation false?
Thanks in advance for your help!
Your 'rrdtool graph' call does not specify a start and end time for the graph. The default is a 1day graph from the current time. If the data are historical, the most recent data point may be outside the default graph time window. Specify a start and end time point in your graph request.
You can verify that the data are in the RRD by using an 'rrdtool fetch' request.
I figured out the problem... There was too few data in the file and the graph offset time was too high...
Thanks a lot for your help!

RRD tool retrieve maximum value

am trying to get the speed and maximum values for all of my interface using rrdtool using rrdtool fetch ... etc but the max value is for the standard time
ex :
rrdtool fetch xxx.rrd MAX -r 7200 -s 1357041600 -e now
i just need to get the highest maximum value for 1 year
Use rrdtool graph VDEF and PRINT without giving any actual graphing commands. This will return the number you are looking for.