The OpenTelemetry Collector provides an integration with SNMP agents to scrape data. From there, the metrics are processed and exported to Lightstep Observability.

To complete the integration, perform the following steps:

  • Configure the SNMP agent
  • Configure the Collector to use the SNMP receiver as a scrape target
  • Enable the integration by adding it to a pipeline

Prerequisites

You’ve configured the Collector to export metric data to Lightstep Observability.

Configure SNMP reporting

Configure the SNMP agent to expose data remotely using proper authorization settings.

1
2
3
agentaddress  udp:snmp-agent-host:161

rouser collector_user AuthPriv

Configure the Collector receiver

In the Collector configuration file, specify SNMP agent as a target endpoint and what metrics need to process.

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
receivers:
  snmp:
    collection_interval: 3s
    endpoint: udp://snmpd:161
    version: v3
    security_level: auth_priv
    user: collector_user
    auth_type: "MD5"
    auth_password: password
    privacy_type: "DES"
    privacy_password: priv_password

    resource_attributes:
      resource_attr.name.1:
        indexed_value_prefix: probe

    metrics:
      snmp_metric_name:
        unit: "By"
        gauge:
          value_type: int
        column_oids:
          - oid: "1.3.6.1.4.1.2021.11.9"
            resource_attributes:
              - resource_attr.name.1

Enable the Collector receiver

After the SNMP receiver is configured, enable it by adding it to one or more pipelines as described in the Collector configuration documentation.

Validate metrics are reporting to Lightstep

You can validate that the metrics are reporting to Lightstep from the Metric details section of the Project Settings page.

  1. Open the Project settings page and scroll to the Metric details section.

  2. Search for SNMP metric names, those were configured in the collector config. Search for metric

  3. If needed, select the metric to edit the description and how the units are displayed in Lightstep.

Create a dashboard for the metrics

Use the Lightstep Terraform Provider to create a dashboard for the metrics.

Additional resources

  • For a complete example that’s ready to run, see the SNMP integration in Lightstep OpenTelemetry Examples.