Skip to main content

Snmp Receiver

Status Available in: contrib Maintainers: @tamir-michaeli Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

Purpose

The purpose of this receiver is to allow users to generically monitor metrics using SNMP. If one of the specified SNMP data values cannot be loaded on startup, a warning will be printed, but the application will not fail fast.

Prerequisites

This receiver supports SNMP versions:
  • v1
  • v2c
  • v3

Configuration

Connection Configuration

These configuration options are for connecting to a SNMP host.
  • collection_interval: (default = 10s): This receiver collects metrics on an interval. This value must be a string readable by Golang’s time.ParseDuration. Valid time units are ns, us (or µs), ms, s, m, h.
  • timeout: (default: 5s): Timeout for each SNMP request. This value must be a string readable by Golang’s time.ParseDuration. Valid time units are ns, us (or µs), ms, s, m, h.
  • endpoint (default: udp://localhost:161): SNMP endpoint to connect to in the form of [udp|tcp][://]{host}[:{port}]
    • If no scheme is supplied, a default of udp is assumed
    • If no port is supplied, a default of 161 is assumed
  • version: (default = v2c): SNMP version options are
    • v1: SNMP version 1
    • v2c: SNMP version 2c
    • v3: SNMP version 3
  • community: (default = public): The community string for the SNMP connection. This is not available for SNMP version v3.
  • user: The user for the SNMP connection. This is only available for SNMP version v3.
  • security_level: (default = no_auth_no_priv): The security requirements of the SNMP connection. This is only available for SNMP version v3. SNMP security_level options are
    • no_auth_no_priv: No authentication protocol and no privacy protocol used
    • auth_no_priv: Authentication protocol is used but no privacy protocol used
    • auth_priv: Both authentication and privacy protocols are used
  • auth_type: (default = MD5): The authentication protocol used for the SNMP connection. This is only available if security_level is not set to no_auth_no_priv. SNMP auth_type options are
    • MD5
    • SHA
    • SHA224
    • SHA256
    • SHA384
    • SHA512
  • auth_password: The authentication password used for the SNMP connection. This is only available if security_level is not set to no_auth_no_priv.
  • privacy_type: (default = DES): The privacy protocol used for the SNMP connection. This is only available if security_level is set to auth_priv. SNMP privacy_type options are
    • DES
    • AES
    • AES192
    • AES256
    • AES192c
    • AES256c
  • privacy_password: The privacy password used for the SNMP connection. This is only available if security_level is set to auth_priv.

Metric/Attribute Configuration

These configuration options are for determining what metrics and attributes will be created with what SNMP data
  • resource_attributes: This may be configured with one or more key value pairs of resource attribute names and resource attribute configurations.
  • attributes This may be configured with one or more key value pairs of attribute names and attribute configurations
  • metrics: This is the only required parameter. The must be configured with one or more key value pairs of metric names and metric configuration.

Resource Attribute Configuration

Resource attribute configurations are used to define what resource attributes will be used in a collection.

Attribute Configuration

Attribute configurations are used to define what resource attributes will be used in a collection.

Metric Configuration

GaugeMetric Configuration

SumMetric Configuration

ScalarOID Configuration

ColumnOID Configuration

Attribute

Example Configuration

The full list of settings exposed for this receiver are documented in config.go with detailed sample configurations in testdata/config.yaml.

Configuration

Example Configuration


Last generated: 2026-08-24