~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to man/snmptrapd.conf.5.def

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-13 12:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040913120621-g952ntonlleihcvm
Tags: upstream-5.1.1
ImportĀ upstreamĀ versionĀ 5.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH SNMPTRAPD.CONF 5 "28 Aug 2001" VVERSIONINFO "Net-SNMP"
 
2
.UC 4
 
3
.SH NAME
 
4
SYSCONFDIR/snmp/snmptrapd.conf - configuration file for the Net-SNMP trap daemon.
 
5
.SH DESCRIPTION
 
6
.B snmptrapd.conf
 
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
 
10
.B DIRECTIVES
 
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.
 
14
.SH PLEASE READ FIRST
 
15
First, make sure you have read the
 
16
.I snmp_config(5)
 
17
manual page that
 
18
describes how the Net-SNMP configuration files operate, where they
 
19
are located and how they all work together.
 
20
.SH DIRECTIVES
 
21
.IP "traphandle OID|default PROGRAM [ARGS ...]"
 
22
The
 
23
.I traphandle
 
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
 
27
.I default
 
28
then any trap not matching any other trap handler will call this
 
29
default one instead.
 
30
The program is fed details about the trap to its standard input, in the
 
31
following format, one entry per line:
 
32
.RS
 
33
.IP HOSTNAME
 
34
The name of the host in question that sent the trap, as determined by
 
35
.IR gethostbyaddr(3) .
 
36
.br
 
37
.IP IPADDRESS
 
38
The IP address of the host that sent the trap.
 
39
.IP VARBINDS
 
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).
 
50
.br
 
51
.IP Example:
 
52
A traptoemail script has been included in the Net-SNMP package that
 
53
can be used as a trap handle directive:
 
54
.br
 
55
.RS
 
56
.P
 
57
traphandle /usr/bin/perl BINDIR/traptoemail -s mysmtp.somewhere.com -f admin@somewhere.com me@somewhere.com
 
58
.RE
 
59
.RE
 
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]"
 
68
See the 
 
69
.I snmpd.conf(5)
 
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
 
72
snmpd.conf.
 
73
.RE
 
74
.IP "format1 format"
 
75
The format used to print a SNMPv1 TRAP message. See
 
76
.IR snmptrapd(8)
 
77
for the layout characters available.
 
78
.RE
 
79
.IP "format2 format"
 
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).
 
85
.SH NOTES
 
86
.IP o
 
87
The daemon blocks on the executing traphandle commands.  (This should
 
88
be fixed in the future with an appropriate signal catch and wait()
 
89
combination).
 
90
.SH "SEE ALSO"
 
91
snmp_config(5), snmptrapd(8), syslog(8), variables(5), snmpd.conf(5), read_config(3).
 
92