mr2mysql

(meterreader2mysql)

Introduction

This is the 'main tool' that continually monitors a meter (i.e. NeTraMet) and periodically retrieves flow information from it.
This flow information is then stored in a MySql database.

The information retrieved by the metereader is 'static' at this moment, and consists of:

mr2mysql will download flow information from any ruleset you download to the meter it is monitoring.
It will however, ignore the 'standard' ruleset every NeTraMet meter has.
NeMaC (part of the NeTraMet package) can be used for downloading rulesets to the meter.

Options

You need to provide several options to mr2mysql so it can do its job. These options are:

-n <flowreader name>
flowreader name used
-h <hostname[:port]>
hostname of the traffic meter + optional port number
-w <community string>
community string for write access to the meter
-m <MySql hostname[:port]>
hostname of the MySql database + optional port number
-u <MySql user>
user name to use when accessing the MySql database
NULL is the default (and sufficient for databases named 'test_xxxxx')
-p <MySql password>
password to use when accessing the MySql database
NULL is the default (and sufficient for databases named 'test_xxxxx')
-d <database name>
The name of the database to store flow information in.
The default name is test_mr2mysql.
If this database does not exist, it is created for you.
-c <collection interval in seconds>
The number of seconds to wait between flow retrievals.
The default is 300 seconds (every 5 minutes).
-v <verbosity>
The verbosity level. Between 0 and x.
This is for debugging purposes.
-x <ruleset name [ruleset name] [..]>
Rulesets at the meter with this name(s)
are excluded when retrieving flow information.
-i <ruleset name [ruleset name] [..]>
If this option is used only rulesets with this name(s)
are included when retrieving flow information.

So to start a meter reader that collects flow data from a meter running on meter.mydomain.org on port 4000 (with community string 'secret') every 15 minutes, storing it in a database called 'test_meter' on host mysql.mydomain.org specifically excluding a ruleset called 'bogus' you would use:

mr2mysql -h meter.mydomain.org:4000 -w secret -m mysql.mydomain.org -d test_meter -c 900 -x bogus

rmruleset

rmruleset

This is a little utility that can be used when developing programs/tools for the meter-mib.

It is intended for removing rule sets from the meter that are left unintentionally by a manager (for example because it crashed)
It can also be used to just list all the rule sets, manager and meter reader entries in the meter-mib.

Options

You need to provide several options to rmruleset so it can do its job. These options are:

-h <hostname[:port]>
hostname of the traffic meter + optional port number
-w <community string>
community string for read/write access to the meter
(if you want to delete a ruleset the community string must give write access).
-r <ruleset name>
The name of the ruleset to remove
-o <ruleset manager (owner)>
name of the manager that installed the ruleset
(i.e. the owner name)

So to remove a ruleset named 'foo' from a meter running on meter.mydomain.org on port 4000 (with community string 'secret') that was installed by a manager called 'bar' you would use:

rmruleset -h meter.mydomain.org:4000 -w secret -r foo -o bar

To just list all the rulesets from that same meter you would use:

rmruleset -h meter.mydomain.org:4000 -w secret

In this case a community string with read access would be sufficient.

This page was last updated January 1, 1970.
For questions please contact Remco Poortinga