1
.TH SNMPTRAPD.CONF 5 "28 Aug 2001" VVERSIONINFO "Net-SNMP"
4
SYSCONFDIR/snmp/snmptrapd.conf - configuration file for the Net-SNMP trap daemon.
7
is the configuration file(s) which define how the Net-SNMP SNMP trap
8
receiving daemon operates when it receives a trap. These files may
9
contain any of the directives found in the
11
section below. This file is not required for the daemon to operate,
12
receive, or report traps. It is used solely as a method of providing
13
extensibility to the trap daemon.
15
First, make sure you have read the
18
describes how the Net-SNMP configuration files operate, where they
19
are located and how they all work together.
21
.IP "traphandle OID|default PROGRAM [ARGS ...]"
24
configuration directive configures the snmptrapd program to launch an
25
external program any time it receives a trap matching the OID token.
26
If the OID token is the word
28
then any trap not matching any other trap handler will call this
30
The program is fed details about the trap to its standard input, in the
31
following format, one entry per line:
34
The name of the host in question that sent the trap, as determined by
35
.IR gethostbyaddr(3) .
38
The IP address of the host that sent the trap.
40
A list of variable bindings that describe the trap and the variables
41
enclosed in it. The first token on the line, up until the space, in
42
the OID and the remainder of the line is its value. The first OID
43
should be the system.sysUpTime.0 OID, and the second should be
44
the ...snmpTrap.snmpTrapOID.0 OID. The remainder of the OIDs, with the
45
possible exception of the last one, are the variable bindings
46
contained within the trap. For SNMPv1 traps, the very last OID will
47
be the ...snmpTrap.snmpTrapEnterprise OID and its value. Essentially,
48
SNMPv1 traps have been converted to the SNMPv2 trap PDU type by the
49
method described in the SNMPv1/SNMPv2/SNMPv3 coexistence document (RFC2576).
52
A traptoemail script has been included in the Net-SNMP package that
53
can be used as a trap handle directive:
57
traphandle /usr/bin/perl BINDIR/traptoemail -s mysmtp.somewhere.com -f admin@somewhere.com me@somewhere.com
60
.IP "dontRetainLogs true"
61
Turns off the support for the NOTIFICATION-LOG-MIB and thus doesn't
62
retain logged traps. Normally the snmptrapd program keeps a certain
63
number of traps around in memory so they can be retrieved via querying
64
the nlmLogTable and nlmLogvariableTable tables.
65
See the snmptrapd manual page and the
66
NOTIFICATION-LOG-MIB for details.
67
.IP "createUser username (MD5|SHA) authpassphrase [DES]"
70
manual page for a description of how to create SNMPv3 users. It's
71
roughly the same, but the file name changes to snmptrapd.conf from
75
The format used to print a SNMPv1 TRAP message. See
77
for the layout characters available.
80
The format used to print a SNMPv2 TRAP2 or INFORM message (note that
81
the SNMPv3 protocol uses SNMPv2 style TRAPs and INFORMs).
82
.IP "forward OID|default DESTINATION"
83
Forwards traps received to DESTINATION if they match the notification
84
type indicated by OID (or the word default forwards them all).
87
The daemon blocks on the executing traphandle commands. (This should
88
be fixed in the future with an appropriate signal catch and wait()
91
snmp_config(5), snmptrapd(8), syslog(8), variables(5), snmpd.conf(5), read_config(3).