---
title: "DTC SNMP Monitor"
canonical: "https://docs.infoblox.com/space/niosmodulesansible/433946675/DTC%20SNMP%20Monitor"
format: markdown
---
Use the `nios_dtc_monitor_snmp` module to create, update, or remove instances of the DTC SNMP monitor object from a NIOS Grid. The DTC SNMP monitor object is used to determine the health of a server by monitoring the response to an SNMP request. For more information on the health monitor, refer to the *Using DNS Traffic Control Health Monitors* section in the *[Infoblox NIOS Documentation](https://docs.infoblox.com/space/NIOS/35400616/NIOS)*.

The following table describes the parameters you can define in the `nios_dtc_monitor_snmp` module:

| **Parameter** | **Required/Optional** | **Description** |
| --- | --- | --- |
| `name` | Required | Specifies the display name of the DTC monitor. |
| `port` | Optional | Specifies the port number for the SNMP connection.  
The default value is `161`. |
| `version` | Optional | Specifies the version of the SNMP protocol for the SNMP health check.  
The default value is `V2C`. |
| `community` | Optional | Specifies the SNMP community string for SNMP authentication.  
The community string is similar to a password and the  
server accepts queries only from the SNMP monitor that provide the correct community string. Note that  
this community string must match exactly what you enter in the management system.  
The default value is `public`. |
| `user` | Optional | Specifies the SNMPv3 user setting. |
| `context` | Optional | Specifies the SNMPv3 context. |
| `engine_id` | Optional | Specifies the SNMPv3 engine identifier. |
| `oids` | Optional | Specifies the list of OIDs for SNMP monitoring.  
It is a dictionary object where you can define the following subparameters:<br>- `comment`: Specifies a text string comment that is associated with the SNMP OID entry.
- `condition`: Specifies the condition of the validation result for the SNMP health check.  
The default value is `ANY`.
- `first`: Specifies the condition's first term to match against the SNMP health check result.
- `last`: Specifies the condition's second term to match against the SNMP health check result when the `condition` subparameter is set to `RANGE`.
- `oid` (required): Specifies the SNMP OID value for the DTC SNMP monitor health checks.  
An OID is a unique dotted-decimal number that identifies the location of the object in the MIB (Management Information Base) tree.
- `type`: Specifies the condition type for DTC SNMP Monitor health checks results.  
The default value is `STRING`. |
| `interval` | Optional | Specifies the interval for the SNMP health check.  
The interval value is measured from the end of the  
previous monitor cycle.  
The default value is `5`. |
| `retry_down` | Optional | Specifies the number of times the server should appear as down, for it to be treated as dead after it was alive.  
The default value is `1`. |
| `retry_up` | Optional | Specifies the number of times the server should appear as up, for it to be treated as alive after it was dead.  
The default value is `1`. |
| `timeout` | Optional | Specifies the timeout in seconds for the SNMP health check. It is the duration that a monitor waits to receive a response after sending a request. If a response is not received, it considers the check as failed.  
The default value is `15`. |
| `extattrs` | Optional | Specifies extensible attributes for the DTC SNMP monitor object.  
This field accepts a set of key / value pairs for the configuration. |
| `state` | Optional | Specifies the state of the DTC SNMP monitor instance in NIOS. Set one of the following values:<br>- `present` (default): Configures the object on the device.
- `absent`: Removes the object from the device. |
| `comment` | Optional | Describes the DTC SNMP monitor object. |
| `provider` | Required | A dictionary object that contains the connection details.<br>- `host`: DNS host name or IP address to connect to the remote instance of NIOS.
- `username`: User name to use for authenticating the connection to the remote instance.
- `password`: Password to use for authenticating the connection to the remote instance.<br>For information on additional fields you can define, see the list of subparameters in the *[NIOS Modules for Ansible Collections](https://infoblox-docs.atlassian.net/wiki/spaces/niosmodulesansible/pages/44525470)* topic. |
| `connection` | Required | The `nios_dtc_monitor_snmp` module must be run locally. |

## Examples

`name: Configure a DTC SNMP monitor`  
`infoblox.nios_modules.nios_dtc_monitor_snmp:`  
`  name: snmp_monitor`  
`  port: 200`  
`  version: V3`  
`  community: test`  
`  user: admin`  
`  context: test_engine`  
`  engine_id: 1a3f5b7d9e`  
`  oids:`  
`    - comment: oid comment`  
`      condition: EXACT`  
`      first: 0`  
`      last: 100`  
`      oid: .1.3.6.1.2.1.1.1`  
`      type: INTEGER`  
`  interval: 50`  
`  retry_down: 5`  
`  retry_up: 10`  
`  timeout: 150`  
`  extattrs:`  
`    Site: Bangalore`  
`  comment: snmp monitor created with ansible`  
`  state: present`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: admin`  
`    password: admin`  
`connection: local`


`name: Add a comment to an existing DTC SNMP monitor`  
`infoblox.nios_modules.nios_dtc_monitor_snmp:`  
`  name: snmp_monitor`  
`  comment: this is a test comment`  
`  state: present`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: admin`  
`    password: admin`  
`connection: local`


`name: Remove a DTC SNMP monitor from the system`  
`infoblox.nios_modules.nios_dtc_monitor_snmp:`  
`  name: snmp_monitor`  
`  state: absent`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: admin`  
`    password: admin`  
`connection: local`