Trap Collector

The Trap Collector microservice receives SNMP traps and informs and converts them into a JSON event structure that includes the trap OID, varbinds, network socket information, and timestamp. By default, it publishes the JSON to the Pulsar topic to which the FCOM Processor microservice is subscribed.

This microservice is part of the Event microservice pipeline. See Understanding the Event Pipeline in Unified Assurance Concepts for conceptual information.

You can enable redundancy for this microservice when you deploy it. See Configuring Microservice Redundancy for general information.

This microservice provides additional Prometheus monitoring metrics. See Trap Collector Self-Monitoring Metrics.

Trap Collector Prerequisites

Before deploying the microservice, confirm that the following prerequisites are met:

  1. A microservice cluster is set up. See Microservice Cluster Setup.

  2. The Apache Pulsar microservice is deployed. See Pulsar.

  3. If you are collecting SNMP v3 informs, you have created an SNMP v3 access profile with authentication information to send acknowledgments. To create a profile:

    1. Log in to the Unified Assurance user interface.

    2. From the Configuration menu, select Device Discovery, then select SNMP Access.

    3. Click Add.

    4. From SNMP Version, select 3.

    5. Fill out the required fields, save the profile, and make note of the ID assigned to it in the All SNMP Profiles table.

      See SNMP in Unified Assurance User's Guide for information about the fields in this interface.

      Note:

      The engine ID that you use in the profile should be a remote engine ID.

Deploying Trap Collector

To deploy the microservice in a single server environment, run the following commands:

su - assure1
export NAMESPACE=<namespace>
export WEBFQDN=<WebFQDN> 
a1helm install <microservice-release-name> assure1/trap-collector -n $NAMESPACE --set global.imageRegistry=$WEBFQDN

In a multi-server environment, deploy the Trap Collector microservice to a specific node by running the following commands:

su - assure1
export NAMESPACE=namespace>
export WEBFQDN=<WebFQDN>
export NODEFQDN=<NodeFQDN>
a1helm install <microservice-release-name> assure1/trap-collector -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set nodeSelector."kubernetes\.io/hostname"=$NODEFQDN

In the commands:

You can also use the Unified Assurance UI to deploy microservices. See Deploying a Microservice by Using the UI for more information.

Changing Trap Collector Configuration Parameters

When running the install command, you can optionally change default configuration parameter values by including them in the command with additional --set arguments. You can add as many additional --set arguments as you need.

For example:

Default Trap Collector Configuration

The following table describes the default configuration parameters found in the Helm chart under configData for the microservice.

Name Default Value Possible Values Notes
LOG_LEVEL INFO FATAL, ERROR, WARN, INFO, DEBUG Logging level used by application.
STREAM_INPUT udp://:162 Text, 255 characters UDP socket port.
STREAM_OUTPUT persistent://assure1/event/collection Text, 255 characters Apache Pulsar topic path. Topic at end of path may be any text value.
LOOKUP_CACHE_TTL 120 Number DNS reverse lookup cache record TTL in seconds.
REDUNDANCY_POLL_PERIOD 5 Integer The number of seconds between status checks from the secondary microservice to the primary microservice.
REDUNDANCY_FAILOVER_THRESHOLD 4 Integer The number of times the primary microservice must fail checks before the secondary microservice becomes active.
REDUNDANCY_FALLBACK_THRESHOLD 1 Integer The number of times the primary microservice must succeed checks before the secondary microservice becomes inactive.
SNMPV1_RFC3584S312_TRANSLATION false Bool Whether to enable SNMP to RFC3584 translation. See section 3.1.2 of RFC3584.
SNMPV3_INFORM_ACCESS_PROFILE "" Integer The ID of the SNMP access profile configured for SNMP v3. You must set this parameter to receive SNMP v3 informs. If you do not set it, SNMP v3 informs are ignored.

Trap Collector Self-Monitoring Metrics

The Trap Collector microservice exposes the self-monitoring metrics described in the following table to Prometheus.

Metric Name Type Description
total_traps_processed Counter Number of traps processed.
processing_time_per_trap Gauge Processing time per trap from receiving it to sending
receive_queue_length_udp Gauge Indicates the length of the receive queue waiting to be read in UDP buffer
receive_queue_length_udp6 Gauge Indicates the length of the receive queue waiting to be read in UDP6 buffer
count_of_v1_traps_per_second Gauge The number of SNMP v1 traps received per second.
count_of_v2_traps_per_second Gauge The number of SNMP v2 traps received per second.
count_of_v3_traps_per_second Gauge The number of SNMP v3 traps received per second.

Note:

Metric names in the database include a prefix that indicates the service that inserted them. The prefix is prom_ for metrics inserted by Prometheus. For example, total_traps_processed is stored as prom_total_traps_processed in the database.