[rrd-developers] VC++ example and program : SnmpGraph

Antoine Guilmard guilmard at free.fr
Thu Feb 19 15:00:41 MET 2004


Hi,

I've just terminated my Snmp Grapher using rrdtool lib in VC++7.
It's a program wich can monitor Oid value, running or not as
NT service. Sources are availables.

It uses just one config file with the same command as rrdtool :

##############################################
# Example of configuration file of SnmpGraph
##############################################

# Section [OPTION]
# 300 refresh all graphs at 300 seconde intervals.
# CreateDataBase=1 if you would erase and recreate rrd base on a launch.
# CreateDataBase=0 if you wouldn't (keep old rrd base).

[OPTION]
UpdateGraphTime=300
CreateDataBase=0
[END]


# Section [CREATE]
# This section provides parameters of the rrd base to create.
# Same usage as rrdtool between [CREATE] and [END].

[CREATE]
create DBName.rrd
--step 30
DS:ethdl:COUNTER:120:U:U
DS:ethup:COUNTER:120:U:U
DS:wlandl:COUNTER:120:U:U
DS:wlanup:COUNTER:120:U:U
RRA:AVERAGE:0.5:3:480
[END]

# Section [PROBE]
# This section provides the OIDs to monitor.
# example : ethdl=public at 192.168.1.11@.1.3.6.1.2.1.2.2.1.10.65539
# ethdl is the name of DS in the rrd base.
# then community @  ip @ OID

[PROBE]
ethdl=public at 192.168.1.11@.1.3.6.1.2.1.2.2.1.10.65539
ethup=public at 192.168.1.11@.1.3.6.1.2.1.2.2.1.16.65539
wlandl=public at 192.168.1.12@.1.3.6.1.2.1.2.2.1.10.65539
wlanup=public at 192.168.1.12@.1.3.6.1.2.1.2.2.1.16.65539
[END]


# Section [GRAPH]
# This section provide parameters of the graphs.
# Same usage as rrdtool between [GRAPH] and [END].
# We add a section [GRAPH] by graph to draw.
# Here two graphs.

[GRAPH]
graph d:\Serveur\www\wlan.png
-s e-12h
--imgformat PNG
--title "Wifi (interface Wlan0)"
--vertical-label "Débit"
-h 100 -w 600 --rigid --upper-limit 130000
DEF:Line1=DBName.rrd:wlandl:AVERAGE
DEF:Line2=DBName.rrd:wlanup:AVERAGE
AREA:Line1#ffff5f:Download
LINE2:Line2#0000FF:Upload
[END]

[GRAPH]
...others graph parameters
[END]

##############################################
# Example End
##############################################

Very simple usage :

SnmpGraph.exe -k install [config.cfg directory] : install the service with
associated config.cfg
SnmpGraph.exe -k uninstall
SnmpGraph.exe -k start : start the service
SnmpGraph.exe -k stop
SnmpGraph.exe -k pause
SnmpGraph.exe -k resume
SnmpGraph.exe [config.cfg directory] : launch SnmpGraph with associated
config.cfg

It's available on my website in "Telecharger" (I'm french ;-)) :
http://guilmard.free.fr/index.php?page=snmpgraph&section=introduction

Thanks Tobi Oetiker, rrdtool is very very usefull !

Antoine Guilmard.

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list