SNMPv2 の場合 デバイスの IP アドレスおよびデバイスの_コミュニティ文字列_を指定してインスタンスを構成します。
init_config:loader:core # use core check implementation of SNMP integration. recommendeduse_device_id_as_hostname:true# recommendedinstances:- ip_address:'1.2.3.4'community_string:'sample-string'# enclose with single quotetags:- 'key1:val1'- 'key2:val2'
SNMPv3 の場合は、デバイスの IP アドレスおよび SNMPv3 資格情報 (デバイスに応じて) を指定してインスタンスを構成します。例: user、authProtocol、authKey、privProtocol、privKey:
init_config:loader:core # use core check implementation of SNMP integration. recommendeduse_device_id_as_hostname:true# recommendedinstances:- ip_address:'1.2.3.4'snmp_version:3# optional, if omitted which version of SNMP you are using is auto-detecteduser:'user'authProtocol: 'SHA256' # choices:MD5, SHA, SHA224, SHA256, SHA384, SHA512authKey:'fakeKey'# enclose with single quoteprivProtocol: 'AES256' # choices:DES, AES, AES192, AES192C, AES256, AES256CprivKey:'fakePrivKey'# enclose with single quotetags:- 'key1:val1'- 'key2:val2'
network_devices:autodiscovery:workers:100# number of workers used to discover devices concurrentlydiscovery_interval:3600# interval between each autodiscovery in secondsloader:core # use core check implementation of SNMP integration. recommendeduse_device_id_as_hostname:true# recommendedconfigs:- network_address:10.10.0.0/24 # CIDR subnetloader:coresnmp_version:2port:161community_string:'***'# enclose with single quotetags:- "key1:val1"- "key2:val2"- network_address:10.20.0.0/24loader:coresnmp_version:2port:161community_string:'***'tags:- "key1:val1"- "key2:val2"
network_devices:autodiscovery:workers:100# number of workers used to discover devices concurrentlydiscovery_interval:3600# interval between each autodiscovery in secondsloader:core # use core check implementation of SNMP integration. recommendeduse_device_id_as_hostname:true# recommendedconfigs:- network_address:10.10.0.0/24 # CIDR subnetsnmp_version:3user:'user'authProtocol: 'SHA256' # choices:MD5, SHA, SHA224, SHA256, SHA384, SHA512authKey:'fakeKey'# enclose with single quoteprivProtocol: 'AES256' # choices:DES, AES, AES192, AES192C, AES256, AES256CprivKey:'fakePrivKey'# enclose with single quotetags:- 'key1:val1'- 'key2:val2'- network_address:10.20.0.0/24snmp_version:3user:'user'authProtocol:'SHA256'authKey:'fakeKey'privProtocol:'AES256'privKey:'fakePrivKey'tags:- 'key1:val1'- 'key2:val2'
注: Datadog Agent は検出された各 IP の SNMP チェックを自動で構成します。検出されたデバイスは、SNMP を使用してポールされた際に正常に応答する IP となります。
Note: Make sure you are on Agent 7.53+ for this syntax. For previous versions, see the previous config_template.yaml
Install or upgrade the Datadog Agent to v7.52+. For platform specific instructions, see the Datadog Agent documentation.
Edit the snmp.d/conf.yaml file in the conf.d/ folder at the root of your Agent’s configuration directory for individual devices, or the datadog.yaml Agent configuration file for Autodiscovery. See the sample snmp.d/conf.yaml for all available configuration options.
Linux Only: If you’re receiving errors when running ping, you may need to configure the integration to send pings using a raw socket. This requires elevated privileges and is done using the Agent’s system-probe. See the linux.use_raw_socketsystem-probe configuration below.
Note: For Autodiscovery, Datadog does not ping devices that do not respond to SNMP.
To apply ping settings to all manually configured devices, add the ping configuration in the init_config section.
init_config:loader:coreuse_device_id_as_hostname:trueinstances:- ip_address:'1.2.3.4'community_string:'sample-string'tags:- 'key1:val1'- 'key2:val2'ping:enabled:true# (default false) enable the ping checklinux:# (optional) Linux specific configurationuse_raw_socket:true# (optional, default false) send pings using a raw socket (see step 3 above)
To apply ping settings to all Autodiscovery subnets, create the ping configuration under the network_devices.autodiscovery section.
network_devices:autodiscovery:workers:100discovery_interval:3600loader:coreuse_device_id_as_hostname:trueconfigs:- network_address:10.10.0.0/24loader:coresnmp_version:2port:161community_string:'***'tags:- "key1:val1"- "key2:val2"ping:enabled:true# (default false) enable the ping checklinux:# (optional) Linux specific configurationuse_raw_socket:true# (optional, default false) send pings using a raw socket (see step 3 above)
If you’re on Linux and want to use raw sockets for ping, you must also enable ping in the system-probe configuration file in addition to the Agent configuration.
Edit /etc/datadog-agent/system-probe.yaml to set the enable flag to true.
ping:enabled:true
After successfully enabling ping on your network devices, the Ping State column in the UI is enabled, allowing you to see the ping state statuses for your devices:
The following are the status names in the Ping State column and their descriptions: