×
SNMP Traps Collector
SNMP Traps Collector will:
- Wait on the
/opt/opsview/snmptraps/var/run/snmp
FIFO and once a trap is received, it reads it and processes it via the traps processing library available withopsview-snmptraps-base
. - Process a trap by either sending a result to the results forwarder FIFO, or send an exception to the
snmp-traps-exception-queue
. - Manage the starting and stopping of traces set on a host, running the trace for the given duration in minutes or hours (up to a maximum of 48 hours).
- Read messages from the
snmptrace-request-<machine-ref>
queue and sends messages to theorchestrator-queue
andsnmp-traps-exception-queue
.
Dependencies Copied
- The package requires
opsview-datastore
to be installed on the collector so that it can create trace documents. - The package requires access to the
opsview-messagequeue
to send traces and exceptions to theresult-snmp
. - The package requires access to the
opsview-messagequeue
to receive trace request message from the orchestrator.
Installation Copied
This is deployed when installing Opsview Monitor.
See MIBs for SNMP Traps and Gets to add MIBs that are required for translating SNMP Traps.
Configuration Copied
Configuration options available for the component:
- The default configuration file is available in
/opt/opsview/snmptrapscollector/etc/snmptrapscollector.defaults.yaml
. - The user can provide their configs in the same locations as above in the file named
snmptrapscollector.yaml
- The defaults config file:
---
# This is the default configuration file.
# Please only make configuration changes in "snmptrapscollector.yaml".
#
snmptrapscollector:
queue_max_size: 0
worker_timeout_secs: 30
snmptrapstrace_channel_timeout: 10
orchestrator_reply_delay_secs: 10
traps_fifo: /opt/opsview/snmptraps/var/run/snmp
results_fifo: /opt/opsview/var/results.sock
snmp_config_file: snmptraps.cfg
script: /opt/opsview/snmptrapsbase/bin/snmptrap2opsview
local_message_queue: &local_message_queue
provider: rabbitmq
encoder: aes
encoder_key: ZHVtbXllbmNvZGVya2V5MTIzNA==
host: 127.0.0.1
port: 35672
management_port: 45672
user: opsview
password: opsview
snmptrapsexception:
queue: snmp-traps-exception-queue
messagequeue: *local_message_queue
durable: true
snmptrapstrace:
queue: snmptraptrace-exchange:direct.snmptrace-request-@:?
messagequeue: *local_message_queue
durable: true
orchestrator:
queue: orchestrator-queue
messagequeue: *local_message_queue
durable: true
registry:
provider: etcd
host: 127.0.0.1
port: 12379
datastore:
name: opsview-collector
cache: opsviewcache,max_age=5;max_size=10
connection:
provider: couchhttp
host: 127.0.0.1
port: 15984
user: opsview
password: opsview
Management Copied
Managing the component Copied
The command to start, stop and restart the component is:
$ sudo /opt/opsview/watchdog/bin/opsview-monit <start|stop|restart> opsview-snmptrapscollector
The component logs to syslog like all other components. Note that you may see errors in syslog regarding No such file or directory: "/opt/opsview/snmptrapscollector/var/conf/snmptraps.cfg"
until the first SNMP Trap rule is associated with a host and Apply Changes is performed.
["Opsview On-premises"]
["User Guide"]