MAX result value conflict between Graph and CLI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

MAX result value conflict between Graph and CLI

Post by zaji_nms »

dear Expert

this is my template to plot latency graph (/usr/local/nagios/share/pnp/templates/)

$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
$def[1] .= "GPRINT:var1:MIN:\"%8.0lf MIN\" " ;
$def[1] .= "GPRINT:var1:AVERAGE:\"%8.0lf AVG\" " ;
$def[1] .= "GPRINT:var1:MAX:\"%8.0lf MAX\" " ;
$def[1] .= "GPRINT:var1:LAST:\"%8.0lf LAST\\n\" " ;

Please check the attached rrd graph
MIN = 29
AVG = 33
MAX = 49
LAST = 35

and compare below CLI result.............why only MAX value is not same...........I tried many other Bandwidth and Latency graph but MAX value in CLI not matching with graph value.

rrdtool graph dummy -s20190101 -e20190201 DEF:test=$chorchor:1:AVERAGE PRINT:test:MIN:'Value - %.3lf'
Value - 29.021

rrdtool graph dummy -s20190101 -e20190201 DEF:test=$chorchor:1:AVERAGE PRINT:test:AVERAGE:'Value - %.3lf'
Value - 33.244

rrdtool graph dummy -s20190101 -e20190201 DEF:test=$chorchor:1:AVERAGE PRINT:test:MAX:'Value - %.3lf'
Value - 44.497 <<<<<<<<<<< why only this value not matching with attached rrd graph

rrdtool graph dummy -s20190101 -e20190201 DEF:test=$chorchor:1:AVERAGE PRINT:test:LAST:'Value - %.3lf'
Value - 35.000
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: MAX result value conflict between Graph and CLI

Post by tgriep »

I think how your command is defined, you are printing the MAX of the Average data.
Try this instead to get the Max value.

Code: Select all

rrdtool graph dummy -s20190101 -e20190201 DEF:test=$chorchor:1:MAX PRINT:test:MAX:'Value - %.3lf'
Be sure to check out our Knowledgebase for helpful articles and solutions!
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: MAX result value conflict between Graph and CLI

Post by zaji_nms »

I had tried many combinations but no luck

rrdtool graph dummy -s20190101 -e20190201 DEF:test=$chorchor:1:MAX PRINT:test:MAX:'Value - %.3lf'
Value - 56.924

Can you please do trial and error in your lab environment?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: MAX result value conflict between Graph and CLI

Post by tgriep »

I did run some tests and it seemed to match up.
Take a look at the raw data during that time to see if the numbers match up.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked