Our SNMP integration monitors any application that exposes metrics with SNMP.
Read on to install the integration, and to configure a YAML file to start collecting metrics. This doc also contains sample YAML files to help you get started.
Compatibility and requirements
Our integration is compatible with SNMP version 2 or 3.
Before installing the integration, make sure that you meet the following requirements:
- SNMP monitoring enabled device or application.
- If SNMP is not running on Kubernetes or Amazon ECS, you must install the infrastructure agent on a Linux OS host that's running SNMP. Otherwise:
- If running on Kubernetes, see these requirements.
- If running on ECS, see these requirements.
Install and activate
To install the SNMP integration, follow the instructions for your environment:
Additional notes:
- Advanced: Integrations are also available in tarball format to allow for install outside of a package manager.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
Configure the integration
An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Kubernetes: see Monitor services running on Kubernetes.
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config files.
For an example configuration, see the host connection file example.
Important
With secrets management, you can configure on-host integrations with New Relic infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management.
Integration configuration
The configuration accepts the following arguments.
snmp_host
: The host SNMP is running on. Default:localhost
. This field is required.snmp_port
: The port SNMP is running on. Default:161
. This field is required.timeout
: The number of seconds to wait before a request times out. Default:10
.retries
: The number of attemps to fetch metrics. Default:0
.exponential_timeout
: Doubles timeout value in each retry attempt. Default:false
.v2
: Use SNMP version 2 Default:true
.v3
: Use SNMP version 3. Default:false
.community
: The SNMP v2 community string. Default:public
. This field is applicable only for SNMP v2.username
: The security name that identifies an SNMP v3 user. This field is applicable only for SNMP v3.security_level
: The security level. Valid values are noAuthnoPriv,. authNoPriv or authPriv. This field is applicable only for SNMP v3.auth_protocol
: The authentication protocol. It can be eitherMD5
orSHA
. Default:MD5
. This field is applicable only for SNMP v3.auth_passphrase
: The password used to generate the key used for authentication. This field is applicable only for SNMP v3.priv_protocol
: The encryption protocol. It can beAES
orDES
. Default:AES
. This field is applicable only for SNMP v3.priv_passphrase
: The password used to generate the key used to encrypt messages. This field is applicable only for SNMP v3.collection_files
: Comma-separated list of full file paths to the metric collection definition files. Default:/etc/newrelic-infra/integrations.d/snmp-metrics.yml
.
Metric collection files
The metrics collection definition files are structured YAML files which tell the integration what metrics to collect. For an example configuration, see the metrics collection file example.
Sample metrics collection file: /etc/newrelic-infra/integrations.d/snmp-metrics.yml.sample
Tip
You can write different collection files to ease organization and maintenance. See configuration file below for an example.
Devices
A collection file collects and organizes metrics. Each file contains a single collect:
block which contains one or more devices. For each device, the following keys are defined:
device
: The name of the SNMP device from which metrics are being collected. This field is required.metrics_sets
: A list of metric sets that organize metrics to collect from this device. See Metric Sets.inventory
: A list of Object Identifiers (OIDs) to collect from this device and report as inventory. See Inventory.
Metric Sets
Metrics Set represents a logical grouping of SNMP Object Identifiers (OIDs) to get from the SNMP device and report to New Relic. For each metric set, the following keys are defined:
name
: The metric set name.event_type
: The event type name for a collection from this metric set.For tips on naming event types, see Naming tips.
type
: The metric set type. Usescalar
to describe a metric set of SNMP scalar OIDs ortable
to describe a metric set that corresponds to the metrics from an SNMP table.root_oid
: Iftype
is atable
, enter the root OID of the table. The integration performs an SNMP walk from this OID to get the table metrics.index
: Iftype
is atable
, enter one or more table column index OIDs that define the table's row uniquely. For each index OID, the following keys are defined:oid
: The OID name to collect, e.g.,.1.3.6.1.4.1.52032.1.2.1.1.1
. This field is required.name
: The name under which the metric will appear in New Relic. If unspecified, it will default to the OID name.
metrics
: List of SNMP OIDs to be collected as part of this metric set. Enter a list ofscalar OIDs
ortable column OIDs
as appropriate for thetype
.oid
: The OID name to collect, e.g.,1.3.6.1.4.1.52032.1.1.2.0
. This field is required.metric_name
: The name under which the metric will appear in New Relic. If unspecified, it will default to the OID name.metric_type
: The New Relic metric type to collect this attribute as. Options aregauge
,delta
,pdelta
,rate
,prate
orattribute
. If unspecified, the integration attempts to infer the metric type .
Inventory
Inventory is an array of SNMP Object Identifiers (OIDs) to be collected and reported as inventory items. For each OID, the following keys are defined:
oid
: The OID name to collect, e.g.,1.3.6.1.4.1.52032.1.1.4.0
. This field is required.category
: The category name under which the inventory item will appear in New Relic. This field is required.name
: The name under which the inventory item will appear in New Relic. This field is required.
Example configuration
Example configuration files:
For more about the general structure of on-host integration configuration, see Configuration.
Tips for naming your data
Metrics are sent and stored in the form of samples. This is a list of key-value pairs that include metric data and metadata. Each sample is stored as an event in New Relic’s event database.
You are responsible for creating and naming the SNMP data reported to New Relic. For this reason, New Relic strongly recommends following these conventions when naming your event types. To ensure you have a consistent naming scheme:
- Use camel case.
- Use a name that clearly identifies what data it contains.
Example: MyorgApplicationSample
Recommendation: Use the same naming scheme for similar metrics across different applications.
Find and use data
Data from this service is not reported to an integration dashboard because the samples gathered are generally unique to the device being monitored. You will need to build your own dashboard.
SNMP metrics are attached to the user defined event type specified in the configuration file. You can query this data for troubleshooting purposes or to create custom charts and dashboards.
For more on how to find and use your data, see Understand integration data.
Metric data
The metrics generated by the integration include metadata associated with the collection they are collecting from. This metadata should be used in NRQL queries to filter and facet the data so that the query returns only the data for the desired metric set.
Each event contains the following metadata:
Name | Description |
---|---|
| The device name for these metrics. |
| The SNMP host the metrics are being collected from. |
| The SNMP port the metrics are being collected from. |
| The metric set name for these metrics. |
Inventory data
The SNMP integration captures the configuration parameters of the SNMP integration. The data is available on the Infrastructure Inventory page, under the config/snmp source. For more about inventory data, see Understand integration data.
Troubleshooting
Troubleshooting tips:
Check the source code
This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.