Enabling Op5 performance data, by default, creates RRD files that hold four years worth of values. This amounts to each service/host check utilizing about 400K of disk space in the /opt/monitor/op5/pnp/perfdata/ directory. As our distributed monitoring environment grows, this can amount to hundreds of gigabytes of storage used to hold performance data. In order to tune your perfdata directory in OP5 to get smaller RRD files, you will need to backup and edit your `/opt/monitor/etc/pnp/rra.cfg` file.
*WARNING* This will cause you to lose all your historical performance data. *WARNING*
Start by connecting to your OP5 monitor server, and first backup your /opt/monitor/etc/pnp/rra.cfg file.
cp /opt/monitor/etc/pnp/rra.cfg <backup location>
Next edit your the rra.cfg file
vi /opt/monitor/etc/pnp/rra.cfg
This rra.cfg will give you 48 hrs and 10 days worth of values:
(The bolded text in config below are the what needs to be changed)
—————————————————————————————————
# Define the default RRA Step in seconds
# More Infos on
# http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
#
RRA_STEP=60
#
# PNP default RRA config
#
# you will get 140 kb 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
—————————————————————————————————
Once you have edited your rra.cfg you will need to delete all your RRDs from your /opt/monitor/op5/pnp/perfdata directory. The following script will delete blocks of 100 RRDs then sleep for 5 mins, and continue until all original RRDs from that folder are deleted. They will then rebuild, the next time the node is polled, at the smaller (140 kb) size.
Additionally, if you wanted to hold 48 hrs, 7 days, and 30 days worth of values your rra.cfg would look like this:
(The bolded text in config below are the what needs to be changed)
—————————————————————————————————
# Define the default RRA Step in seconds
# More Infos on
# http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
#
RRA_STEP=60
#
# PNP default RRA config
#
# you will get 152K of data per datasource
#
# 2880 entries with 1 minute step = 48 hours
#
RRA:AVERAGE:0.5:1:2016
#
# 2016 entries with 5 minute step = 7 days
#
RRA:AVERAGE:0.5:5:2016 #
# 1440 entries with 30 minute step = 30 days
#
RRA:AVERAGE:0.5:30:1440
RRA:MAX:0.5:1:2880
RRA:MAX:0.5:5:2016
RRA:MAX:0.5:30:1440 #RRA:MAX:0.5:360:5840
RRA:MIN:0.5:1:2880
RRA:MIN:0.5:5:2016 RRA:MIN:0.5:30:1440 #RRA:MIN:0.5:360:5840