Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

rrdhandler.h File Reference


Detailed Description

This handler records events to a 'Round Robin Database', see http://www.rrdtool.org. This data can then be graphed though the web interface using the 'rrdgrf' tag or manipulated with other rrdtool programs. Since this handler and the 'rrfgrf' tag both use the rrdtool data formats, please refer to the documentation for how to set up an RRD database and generate graphs.

Tested with rrdtool versions:

Wire keywords (standard handler keywords documented in Wire )

Example:

// keep loadavg in rrd create handler rrd { rrdfilename: loadavg.rrd desc: "Load Average" create: '-s 300 DS:loadavg:GAUGE:600:U:U RRA:AVERAGE:0.5:1:12 RRA:AVERAGE:0.5:6:48' // hourly (single sample) and daily (30min sample) regevent: $load.15min }

Events accepted:
TypeDescription
any Record in rrd

#include <stdio.h>
#include "rrd.h"
#include "monitor.h"
#include "wire.h"

Go to the source code of this file.

Data Structures

struct  aw_rrdhandler_t
 Rrd handler object. More...


Functions

aw_rrdhandler_t * aw_create_rrdhandler (const byte_t *rrdfilename, const byte_t *desc, const byte_t *create, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *aware_logger)
 Create a rrd filter handler.

void aw_free_rrdhandler (aw_rrdhandler_t *h)
 Free handler and all associated resources.

aw_handler_t * aw_wire_rrdhandler (aw_wire_mkhandler_args_t *args)
 Create a rrdhandler using "wire". See header doc for keyword documentation.


Function Documentation

aw_rrdhandler_t* aw_create_rrdhandler (  const byte_t *  rrdfilename,
const byte_t *  desc,
const byte_t *  create,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  aware_logger
) 
 

Create a rrd filter handler.

aw_create_rrdhandler

Parameters:
rrdfilename Name of rrd file (created if does not exist)
desc Optional Description string
create The create argument string just as you would use it with rrdtool create ...
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
aware_logger Aware logger object
Returns:
Handler object

void aw_free_rrdhandler (  aw_rrdhandler_t *  h  ) 
 

Free handler and all associated resources.

aw_free_rrdhandler

Parameters:
h The handler

aw_handler_t* aw_wire_rrdhandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a rrdhandler using "wire". See header doc for keyword documentation.

aw_wire_rrdhandler

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)