-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtrapperkeeper.yaml
123 lines (108 loc) · 3.87 KB
/
trapperkeeper.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Trap handlers are how we react to receiving specified traps. All
# handlers inherit from the default settings which are configured
# under the defaults header as well as the possibility of inheriting
# from a template.
#
# Defaults:
defaults:
# Expiration is how long a trap stays in an active state. a null
# value will indicate the trap needs to be manually resolved.
#
# Type: str (time spec)
expiration: "15m"
# Blackhole allows you to drop traps on the floor, never
# making it to e-mail or the database. This is useful for
# very chatty traps that you don't care about.
#
# Type: bool
blackhole: false
# Sets the default severity of all traps. Severity is useful
# in use with external monitoring. For example you might want to
# Page on critical, E-mail on warning, and ignore informational.
#
# Type str (Allowed informational, warning, critical)
severity: "warning"
# If you don't want mail sent by default you would comment
# out this section. If mail is null no e-mail will be sent.
mail:
# The subject to use for mail that is sent. The following
# format strings are available to use:
# hostname: The hostname of the agent that sent the trap.
# ipaddress: The IP address of the agent that sent the trap.
# trap_name: The textual name for the received trap.
# trap_oid: The OID for the received trap.
#
# Type: str
subject: "%(hostname)s %(trap_name)s"
# The recipients of the message, comma delimited, for a given
# trap. If this value is falsey then no e-mail is sent.
#
# Type: str
recipients: "root@localhost"
# When running multiple instances of trapperkeeper as a manager for a
# given device, the message will be deduplicated in the database. If
# you want the e-mail to be sent even when the message has been
# deduplicated then mark this true
#
# Type: bool
mail_on_duplicate: false
# Templates allow you to set up a class of traps to reduce the amount of
# configuration required per handler. All options available above (in the
# defaults section) are available under templates.
#
# Templates:
templates:
# This is the name for the template. You can use any name you like
# though I'm overloading the severity names as they map pretty cleanly
# to the class of traps I normally receive.
critical:
expiration: null
severity: "critical"
informational:
expiration: "0s"
severity: "informational"
mail: null
# Finally you have the actual configuration for various traps. In this
# section you actually have configuration for individual traps. Again
# all of the options above (defaults) are available with use additional
# keyword, use, to inherit from templates.
#
# Trap Handlers:
traphandlers:
# Name or OID of the trap to match on.
#
# Type: str
"SNMPv2-MIB::coldStart":
# Template to inherit from.
#
# Type: str
use: "critical"
"TRAPPERKEEPER-MIB::testV2Trap":
severity: warning
"TRAPPERKEEPER-MIB::testV1Trap":
severity: critical
# Top level configuration for TrapperKeeper.
config:
# Takes a SqlAlchemy URL to the database to store traps. More details
# can be found at the following URL:
# http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html#database-urls
#
# Type: str
database: "sqlite:///trapperkeeper.sqlite"
# The port to listen for traps on.
#
# Type: int
trap_port: 162
# The port to expose stats on.
#
# Type: int
stats_port: 8889
# Only accept traps with the following SNMP community. If community
# is a falsey value, then all traps will be allowed through.
#
# Type: str
community: null
# Listen for traps on an IPv6 address
#
# Type: bool
ipv6: false