rtgpoll(1)

NAME
rtgpoll - RTG SNMP polling daemon

SYNOPSIS
rtgpoll -t file [options]

DESCRIPTION
rtgpoll queries SNMP-capable devices and inserts the results of these queries into a MySQL database. The poller reads a fixed-format target file, randomizes the targets and maintains a set number of queries in flight. rtgpoll optionally reads a configuration file to modify run-time parameters.

OPTIONS

-t file
    Target file. See target file section below for additional details.

-c file
    Configuration file. See configuration file section below for additional details.

-d  Disable database inserts.

-m  Skip checking for multiple instances.

-z  Force database insertion of zero deltas.

-v  Increase verbosity by one level. Four verbosity levels exist (in increasing order): Off, Low, High, Debug.

CONFIGURATION FILE

All RTG programs attempt to find an rtg.conf file in the following path order:

1. ./rtg.conf
2. /usr/local/rtg/etc/rtg.conf
3. /etc/rtg.conf

If rtgpoll or rtgplot cannot find an rtg.conf file in any of these paths, it will attempt to create one in the current working directory. Most users maintain a master rtg.conf file customized for their environment. rtg.conf contains the following configurable fields:

  Interval 300
  HighSkewSlop 3.0
  LowSkewSlop 0.5
  OutOfRange 93750000000
  SNMP_Ver 1
  SNMP_Port 161
  DB_Host localhost
  DB_Database rtg
  DB_User snmp
  DB_Pass rtgdefault
  Threads 5

Interval is the time between successive polls of the target list, default is 300 seconds (5 minutes). HighSkewSlop defines the maximum number of Intervals allowed between two consecutive poll values before the time in seconds between said points is deemed too large to calculate a valid rate. With the default Interval and HighSkewSlop values, that time would be 300 * 3 (15 minutes). LowSkewSlop defines the minimum number of Intervals alloweed between two consecutive poll values before the time in seconds between said points is deemed two low to calculate a valid rate. With the default Interval and LowSkewSlop values, that time would be 300 * 0.5 (2.5 minutes). OutOfRange defines an upper bound above which rtgpoll will never attempt an insert into the database. OutOfRange should be a multiple of the maximum number of bytes possible in the defined Interval for your highest speed link. The default OutOfRange value will suffice in most installations. SNMP_Ver specifies the SNMP version the poller will use. The number of threads rtgpoll will use is defined in the variable Threads. Variables in rtg.conf must match the names above exactly. Comments and blank lines are allowed and the ordering of variables in rtg.conf does not matter.

TARGET FILE

The target file specifies the objects to be SNMP polled. Comments must be preceded with a '#' sign. Elements in the target file are tab delimited. The format of the target file is fixed:

  # Host OID 64/32 Community Table ID Description

where

  Host = IP or hostname of target
  OID = Full SNMP OID, e.g. .1.3.6.1.2.1.31.1.1.1.10.19
  64/32/0 = Specify 64/32 bit objects or 0 for gauge objects
  Community = SNMP Community
  Table = MySQL table in the database to use
  ID = A unique ID that is used with each insert
  Description = Text

RTG can monitor OIDs that return a gauge value allowing one to monitor items such as temperature, CPU, users, etc. If an entry in the target file has 0 (zero) specified as the OID bit width instead of 64 or 32, the poller assumes that it is monitoring a gauge and does not attempt to calculate an interval delta value.

rtgpoll first reads the configuration file, then the target file. For each SNMP poll, rtgpoll will attempt an SQL INSERT of the form:

  INSERT INTO Table VALUES (ID, NOW(), bigint)

Where Table is the name of the database table and ID is an integer. Both Table and ID come from the target list, NOW() is the current timestamp and bigint is the delta value between successive SNMP polls.

SIGNALS

rtgpoll accepts a number of signals. SIGHUP forces a reload of the target file. If rtgpoll is actively polling, the target file is reloaded when rtgpoll becomes idle. This is useful when automating the target list creation based on your active network. SIGUSR1 increases the verbosity of a running rtgpoll; SIGUSR2 decreases the verbosity.

SEE ALSO
rtgplot(1)

VERSION
This manual page documents rtgpoll version 0.7.4

AUTHOR
(c) 2002-2003 by Robert Beverly