Trap Forwarder

The Trap Forwarder microservice converts the Unified Assurance JSON event structure for SNMP traps back into SNMP trap format and forwards them to a UDP socket.

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

Autoscaling is enabled by default for this microservice. You can optionally disable autoscaling when you deploy the microservice. See Configuring Autoscaling.

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

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

Trap Forwarder 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. You know the UDP socket port.

Deploying Trap Forwarder

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-forwarder -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-forwarder -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 Forwarder 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 Forwarder 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 The logging level used by the microservice.
STREAM_INPUT persistent://assure1/event/forwarding Text, 255 characters The path to the Pulsar topic to get data from. The topic at end of path may be any text value.
STREAM_OUTPUT udp://:10162/v2 Text, 255 characters The UDP socket port to send data to.
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.
APPEND_ORIGINALADDR_TOVARIABLES false true or false Whether or not to append the original IP address from the input to the output.

Trap Forwarder Autoscaling Configuration

Autoscaling is supported for this microservice. See Configuring Autoscaling for general information and details about the standard autoscaling configurations.

This microservice also supports the additional configurations described in the following table.

Name Default Value Possible Values Notes
thresholds.backlogSize 1000 Integer The number of items that need to be in the backlog before the autoscaling starts additional processes.
thresholds.totalTrapsProcessed 400 Integer Total traps processed by the microservice. If the average of total traps processed in five minutes exceeds the threshold, pods will be scaled.

Trap Forwarder Self-Monitoring Metrics

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

Metric Name Type Description
event_netiq_backlog_size Gauge The number of items pending in the backlog.
total_traps_processed Counter The number of events processed.
processing_time_per_trap Gauge The processing time per event, from receiving it, to sending it, to acknowledging it.

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.