Hi,
We are running Nagios XI 2014R2.0 VMware image 64bit / CentOS 6.5 with no special configurations.
I am using MSSQL Query check to graph a single value returned from the SQL query and am having problems with the resultant graph.
An example of the Performance Data as viewed in the Advanced tab of the service check is:
Performance Data: query_duration=0.788114s;300;900 query_perf=3;;
The query_perf value is what the SQL query returns and is what I want to graph. Only whole number are ever returned. However the performance graph never plots these numbers. What it does plot is a fraction of the number.
Eg. query_perf = 5, plot = 4.687
The plotted numbers are usually a little below the actual query_perf value, however there was one time where it was a little more. I was initially thinking that maybe the query_duration was being taken off the query_result however this doesn't seem to be the case as the numbers don't add up correctly.
Any help with this would be appreciated.
Cheers,
Simon
check_mssql query_perf and Graphs
Re: check_mssql query_perf and Graphs
This is actually the nature of rrds. They are "aggregates over time". This allows them to never grow in size. Essentially, as the records in the db get older, they are averaged against neighbor records to create a new record representing both previous ones. This is lossy over time and will lead to decimal values even though pure integers were originally recorded.
Does this make sense?
You can read more at:
http://oss.oetiker.ch/rrdtool/
Does this make sense?
You can read more at:
http://oss.oetiker.ch/rrdtool/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: check_mssql query_perf and Graphs
Hi,
Thanks for the explanation. My only prior experience with rrds is with MRTG whose 1 hour graph (from memory) plots real values, with the other graphs being averages as you've mentioned. So do I understand correctly that the implementation in NagiosXI averages immediately? If this is the case wouldn't the 1st value plotted be the actual value (which I'm not seeing)?
Cheers,
Simon
Thanks for the explanation. My only prior experience with rrds is with MRTG whose 1 hour graph (from memory) plots real values, with the other graphs being averages as you've mentioned. So do I understand correctly that the implementation in NagiosXI averages immediately? If this is the case wouldn't the 1st value plotted be the actual value (which I'm not seeing)?
Cheers,
Simon
Re: check_mssql query_perf and Graphs
Could you show us what is in your rra.cfg:
Code: Select all
cat /usr/local/nagios/etc/pnp/rra.cfgRe: check_mssql query_perf and Graphs
Hi,
Here's the file:
#
# PNP default RRA config
#
# you will get 400kb of data per datasource
#
# 2880 entries with 1 minute step = 48 hours
#
RRA:AVERAGE:0.5:1:2880
#
# 2880 entries with 5 minute step = 10 days
#
RRA:AVERAGE:0.5:5:2880
#
# 4320 entries with 30 minute step = 90 days
#
RRA:AVERAGE:0.5:30:4320
#
# 5840 entries with 360 minute step = 4 years
#
RRA:AVERAGE:0.5:360:5840
RRA:MAX:0.5:1:2880
RRA:MAX:0.5:5:2880
RRA:MAX:0.5:30:4320
RRA:MAX:0.5:360:5840
RRA:MIN:0.5:1:2880
RRA:MIN:0.5:5:2880
RRA:MIN:0.5:30:4320
RRA:MIN:0.5:360:5840
Cheers,
Simon
Here's the file:
#
# PNP default RRA config
#
# you will get 400kb of data per datasource
#
# 2880 entries with 1 minute step = 48 hours
#
RRA:AVERAGE:0.5:1:2880
#
# 2880 entries with 5 minute step = 10 days
#
RRA:AVERAGE:0.5:5:2880
#
# 4320 entries with 30 minute step = 90 days
#
RRA:AVERAGE:0.5:30:4320
#
# 5840 entries with 360 minute step = 4 years
#
RRA:AVERAGE:0.5:360:5840
RRA:MAX:0.5:1:2880
RRA:MAX:0.5:5:2880
RRA:MAX:0.5:30:4320
RRA:MAX:0.5:360:5840
RRA:MIN:0.5:1:2880
RRA:MIN:0.5:5:2880
RRA:MIN:0.5:30:4320
RRA:MIN:0.5:360:5840
Cheers,
Simon
Re: check_mssql query_perf and Graphs
What you see is averages from when there is more than one sample.