Back to OP5 Monitor FAQ

How to trim rrd graphs (remove peaks)

First, be a good sysadmin and take a backup of the rrd-file before you begin.

The RRD files and XML files containing the datasource descriptions and other variables and values the PNP templating engine works with are found under the following path:

/opt/monitor/op5/pnp/perfdata//<Service_Name>.{rrd,xml}

To find out the datasources names and numbers to work with, you can check the XML file:

# cat <graph name>.xml

The two things to look for is the and

Once you know what you want to modify and what the maximum value that the RRD file should accept as a measurement value should be, you can proceed with the following steps:

These are the commands you will need:

## rrdtool tune <path to rrd-file> -a <DS>:<MAX VALUE>
## rrdtool dump <rrd-file> > fix.xml
# rm <rrd-file>
## rrdtool restore fix.xml <rrd-file> -r

Sample:

[root@mnpc-mon9 ~]# cd /opt/monitor/op5/pnp/perfdata/server5
[root@mnpc-mon9 server5]#

[root@mnpc-mon9 server5]# rrdtool info PING_rta.rrd | grep .max
ds[1].max = NaN

[root@mnpc-mon9 server5]# rrdtool tune PING_rta.rrd -a 1:0.030
[root@mnpc-mon9 server5]# rrdtool dump PING_rta.rrd > fix.xml
[root@mnpc-mon9 server5]# rm PING_rta.rrd
rm: remove regular file 'PING_rta.rrd'? y
[root@mnpc-mon9 server5]# rrdtool restore fix.xml PING_rta.rrd -r
[root@mnpc-mon9 server5]#

[root@mnpc-mon9 server5]# rrdtool info PING_rta.rrd | grep .max
ds[1].max = 3.0000000000e-02

Caution: Graphs might have gaps because data beyond 0.030 have been replaced with “NaN” (see bullet number 3 above)

Screenshot

Script to automate these steps:

Especially for bandwidth checks where “peaks” is a phenomenon that is seen in many installations, this is a very easy script to make the above steps a bit easier:

rrd_unpeaker.sh

["Geneos"] ["FAQ"]

Was this topic helpful?