---
title: "DTC TCP Monitor"
canonical: "https://docs.infoblox.com/space/niosmodulesansible/433619083/DTC%20TCP%20Monitor"
format: markdown
---
Use the `nios_dtc_monitor_tcp` module to create, update, or remove instances of the DTC TCP monitor object from a NIOS Grid. The DTC TCP monitor opens a TCP connection for communication between the NIOS Grid member and the DTC server. 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_tcp` module:

| **Parameter** | **Required/Optional** | **Description** |
| --- | --- | --- |
| `name` | Required | Specifies the display name for this DTC monitor. |
| `port` | Required | Specifies the port number for the TCP request. |
| `interval` | Optional | Specifies the interval for the TCP 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 TCP 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 TCP monitor object.  
This field accepts a set of key / value pairs for the configuration. |
| `state` | Optional | Specifies the state of the DTC TCP 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 TCP 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_tcp` module must be run locally. |

## Examples

`name: Configure a DTC TCP monitor`  
`infoblox.nios_modules.nios_dtc_monitor_tcp:`  
`  name: tcp_monitor`  
`  port: 8080`  
`  state: present`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`


`name: Add a comment to an existing DTC TCP monitor`  
`infoblox.nios_modules.nios_dtc_monitor_tcp:`  
`  name: tcp_monitor`  
`  port: 8080`  
`  comment: this is a test comment`  
`  state: present`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`


`name: Remove a DTC TCP monitor from the system`  
`infoblox.nios_modules.nios_dtc_monitor_tcp:`  
`  name: tcp_monitor`  
`  port: 8080`  
`  state: absent`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`