rrdquery.pl

Intro

rrdquery.pl retrieves one datasource from an RRD (round robin database) and optionally filters its values. It is like rrdtool fetch but with projection and optional selection.
Intention for this was to determine whether and when a datasource exceeds a threshold. E.g. if you record your interface error rate and if that interface shows just a couple of times per week some discards or such, then it might be easier to use this Perl script instead of extending the RRD graphics definition or even zooming in and out the graph.

Usage

rrdquery.pl selects data from an RRD file with a SQL like approach where each
consolidation function (CF) represents its own table, and each datasource plus
the timestamp are the columns.
Most commandline options are shared with rrdfetch(1). Additional parameters
are explained below.

Usage:
  rrdquery.pl <rrdfile> --info|-i
  rrdquery.pl <rrdfile> <cf> <filter> [--resolution|-r <resolution>]
              [--start|-s <start>] [--end|-e <end>] [--align-start|-a]
              [--daemon|-d <address>] [--utc|-u]
  rrdquery.pl --help|-h

Description:
  --info, -i   Output the names of all round robin archives (RRAs), the names
               of all datasources, as well as the oldest and latest update
               timestamp found in the round robin database (RRD) <rrdfile>
  --utc, -u    Display each timestamp in UTC time instead of local time
  --help, -h   Display this help ;-)
  <filter>     Select a datasource and optionally filter rows

Filter syntax:
  <dsname> [<comparator> <value>|IS NULL]

  <dsname>      The name of a datasource in <rrdfile>
  <comparator>  Any of =, !=, <> (same as !=), <, <=, >=, or >
  <value>       An integer or float value
  IS NULL       Output any row where <dsname> is null or NaN

  Whitespace between <dsname>, <comparator>, and/or <value> may be omitted.
  Check for occurences where <dsname> has a non-NULL value can be achieved by
  specifying <dsname> only.

Files