|
Devices may be configured statically, or dynamically by running a script to examine the device and return the object definitions that should be collected. Dynamically described devices may include other ``sub-devices'', e.g. virtual routers, which can only be discovered by examining the primary device. It is up to the configuration script to detect these.
# Configuration file for snmpacc # # Set up logging # Log serious problems to syslog # Log general stuff to snmpacc.log log syslog daemon warning log file snmpacc.log info# # Write output to data/YYYYMMDDHH.dat # Write a sample every five minutes. This means that there will be 12 # samples written every hour. # If auditing is turned on, put audit files in the audit directory # output data/%Y%m%d%H.dat dumpevery 5m auditdir audit
# # Log the edge routers # These are all similar, so set some defaults for community, query # frequency, maximum data rate and configuration script etc first # community secret-password # SNMP community string version 2 # SNMP version 2c script genconf.edge # Config script checkevery 1h # Re-run configuration script every hour maxbps 100m # Maximum port speed is 100 Mbps frequency 15 # Poll every 15 seconds
# # Edge routers A & B # device edgea address 192.168.1.2 end device
device edgeb address 192.168.1.3 end device
# # Unix name server we want to collect data on # Has only static configuration # device ns1 address 192.168.1.4 community ns1-secret-password version 1 script none object ns1.eth0.in interfaces.ifTable.ifEntry.ifInOctets.1 object ns1.eth0.out interfaces.ifTable.ifEntry.ifOutOctets.1 end device
/home/snmpacc/bin/snmpacc -u snmpacc -d /home/snmpacc
The full set of options is listed under Command Line Options.
The check-snmpacc.sh script is also provided to check that snmpacc is running. See the Appendix on how to run this from cron.
snmpctl can request snmpacc to flush log files, re-read its master configuration file or exit. In addition, the program can kill the snmpacc daemon. See the reference section for snmpctl options.
Audit records are stored in a file contained within the directory defined by the auditdir option. The file name is based on the counter name, with any ``/'' characters changed to ``.''.
|