|
NAMEbsnmp-regex —
an SNMP module which produces counters from logs or other
text
DESCRIPTIONbsnmp-regex is a module for
bsnmpd(1)
which allows you to make SNMP counters from log files or other text. For
example you could count the number of occurances of a certain string in a text
file. You can also match specific numbers or text to build SNMP values.
MIBSThe counters will be available as a table under the following MIB:.1.3.6.1.4.1.12325.1.203 Or if the appropriate MIB.txt files have been installed: enterprises.fokus.begemot.regex The following SNMP MIBs are available for use (where X is the counter index):
OPTIONSTo activate thebsnmp-regex module you must load the
module in /etc/snmpd.config and configure the location
for the UNIX socket and
bsnmp-regex.conf(5)
file. See the examples section below.
EXAMPLESFor a simplebsnmp-regex configuration add the following
to /etc/snmpd.config:
begemotSnmpdModulePath."regex" = "/usr/local/lib/snmp_regex.so" %regex regexConfig = "/usr/local/etc/bsnmp-regex.conf" regexSocket = "/var/run/bsnmp-regex.sock" For details on what /usr/local/etc/bsnmp-regex.conf should contain, see the bsnmp-regex.conf(5) man page. To pipe logs or text to match into the socket use the sockin(1) utility, run something like this: # sockin /var/run/bsnmp-regex.sock tail -f /var/log/maillog To have syslogd(8) send all logs for matching add a line like this to the /etc/syslog.conf file: *.* | sockin /var/run/bsnmp-regex.sock SEE ALSObsnmp-regex.conf(5), bsnmpd(1), sockin(1), syslog.conf(5)AUTHORStef Walter ⟨stef@memberwebs.com⟩
Visit the GSP FreeBSD Man Page Interface. |