## Description

  • Waits 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 lib available with the `opsview-snmptraps-base`.

  • Once a trap is processed, it is either a result which is sent to the results forwarder fifo, or an exception which is sent to the `snmp-traps-exception-queue`

  • This also manages traces, start and stopping of traces set on a host.

  • If a trace is enabled on a host, it runs that trace for the given duration in minutes or hours, max is 48hrs.

  • The collector manages traces, starting, stopping, removal and update.

  • Collector reads messages from the `snmptrace-request-<machine-ref>` queue and sends messages to the `orchestrator-queue` and `snmp-traps-exception-queue`

## Dependencies

  • 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 the `result-snmp`.

  • The package requires access to the `opsview-messagequeue` to receive trace request message from the orchestrator

## Installation

This is deployed when installating Opsview Monitor.

See [MIBs for SNMP Traps and Gets](🔗) to add your MIBs that are required for translating SNMP Traps.

## Configuration

_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:

## Management

### Managing the component

The command to start, stop and restart the component is:

The component logs in the syslog like all other components. **Note:** 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 a Reload is performed.