Change default RRD step value

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
raulpe
Posts: 28
Joined: Mon Nov 25, 2013 10:44 am

Change default RRD step value

Post by raulpe »

Hello,

It seems Nagios XI will create RRDs with a default step size of 60. The RRD documentation says the default value from rrdcreate is 300 so I guess this value is being set by Nagios somewhere. Can someone tell me where this can be changed? I looked at the rra.cfg file but it is not there. I want the step value to be 300 since that is the fastest I will ever check a service. If this could be set individually per service, it would be ideal.

Also, will this cause any problem with the graphing or other default php/javascript?

Thanks!
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Change default RRD step value

Post by jolson »

Are you sure it's not in the rra.cfg file you mentioned?

Code: Select all

cat     /usr/local/nagios/etc/pnp/rra.cfg
#
# 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
The step is the second integer - X:STEP:X
See this forum thread for some additional information: http://support.nagios.com/forum/viewtop ... =6&t=25569

Be aware that changing the default RRD is not supported in the sense that future releases might wind up overwriting the value. You will also lose all of your historical RRD information.

In order for these changes to take effect, you will need to remove/move all your rrds from /usr/local/nagios/share/perfdata/<host>/* - be sure not to remove the directory, it will still need to be in place.

Best,


Jesse
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
raulpe
Posts: 28
Joined: Mon Nov 25, 2013 10:44 am

Re: Change default RRD step value

Post by raulpe »

Jesse,

Thanks for your reply. My post should have been clearer. The number you pointed out in the rra.cfg refers to how many steps will be consolidated on each row of the RRD file. The step size is defined somewhere else and it is defined in seconds. As I read from the rrdtool documentation the default is 300 seconds so that the statement:

Code: Select all

RRA:AVERAGE:0.5:1:2880
will take one sample every 300 seconds and add it to the archive.

The RRD files created by Nagios XI however have set the step size to 60 seconds so the RRD files have one row every minute.

Code: Select all

filename = "Radio_RSSI.rrd"
rrd_version = "0003"
step = 60
last_update = 1436271436
ds[1].type = "GAUGE"
ds[1].minimal_heartbeat = 8460
ds[1].min = NaN
ds[1].max = NaN
ds[1].last_ds = "-56"
ds[1].value = -8.9600000000e+02
ds[1].unknown_sec = 0
Since I don't sample that often I would like the step size to be set to the default 300 seconds (5 min).

My question is, where can I change this value from 60 seconds to 300 seconds.

Thanks,
Raul
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Change default RRD step value

Post by abrist »

You are looking for the rra step value. New rrds are created by the process_perfdata.pl script through npcd. Edit:

Code: Select all

/usr/local/nagios/etc/pnp/process_perfdata.cfg
Change:

Code: Select all

RRA_STEP = 60
To:

Code: Select all

RRA_STEP = 300
Save out.
Unfortunately, you will need to delete all rrds in order to use the rra step value as the process_perfdata.pl script will need to regenerate them with the desired step.
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.
raulpe
Posts: 28
Joined: Mon Nov 25, 2013 10:44 am

Re: Change default RRD step value

Post by raulpe »

That's exactly what I was looking for. Not sure how I missed it. :oops:

Thanks!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Change default RRD step value

Post by abrist »

No problem. As you seem to be comfortable tweaking rrd/rra values, you may wish to take a look around that file as there are a few other rrd/rra specific values like heartbeat, etc.
Change these at your own risk though!

Are we clear to lock this thread?
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.
Locked