The NS1 Connect platform solution allows you to create monitoring jobs (i.e., probes) to track the health and performance of a specified device or endpoint. After creating the monitor, you can connect it to a corresponding answer within a DNS record to automatically update the answer metadata.
This article explains setting up a TCP monitor and connecting it to answer metadata using the NS1 Filter Chain. Server/device TCP monitoring tracks the availability and response time of a TCP server from a local network — for example if a TCP server is deployed within an intranet and is not accessible outside of it.
-
In the NS1 portal, navigate to the Monitors page.
-
Click the + on the right side of the menu to launch the Create a probe modal.
-
Select TCP from the drop-down list in the upper left corner.
-
Under Configuration, adjust the settings as desired while considering the following:
Name
(Required) Enter a name for the TCP monitor.
Monitor Paused
Toggle the switch to activate or deactivate the monitor. By default, this option is disabled meaning the monitor is active.
Notifications On
Toggle the switch to enable or disable notifications related to this monitor. By default, this option is enabled meaning notifications are active.
Monitoring Regions
(Required) Select the locations from which monitoring will be executed.
Policy
Select the policy this monitor should use to determine if the monitored endpoint is down. Choose one of the following from the drop-down menu:
-
Quorum: The host is marked “down” if tests conducted from a majority of the monitoring regions do not pass the “up” conditions.
-
All: The host is marked “down” if tests conducted from all of the monitoring regions do not pass the “up” conditions.
-
One: The host is marked “down” if tests conducted from a single monitoring region do not pass the “up” conditions.
Frequency
(Required) Enter the amount of time in seconds between each monitoring test conducted in each region. The minimum setting is 60 seconds.
Up Conditions
Click Add Condition to define the condition(s) the hostname must meet in order to be considered "up."
First, choose the metric to validate during the test:
-
Output (string) - Output received from any connection if any.
-
Time to connect (integer) - The amount of time (in milliseconds) from the first attempt by the monitor to connect to the host until the time at which it connects successfully. This condition is only checked after a successful connection is made within the “connection timeout” (specified in the next step). Use the comparison operators (equal to, greater than, less than, etc.) to define the “up” condition. For example, if you set the condition to “less than 1000,” then the connection must have occurred in less than 1000 milliseconds in order for the host to be considered “up.”
You can add multiple "up" conditions. Note that all conditions must be met in order for a test run to consider the host "up."
Rapid Recheck
Check this box to automate a second verification test before changing the status of a host. Enabling this option can help prevent false positives.
-
-
Under TCP Settings, adjust the settings as desired while considering the following:
Response timeout
Tthe amount of time in milliseconds after connecting to wait for output.
Connect over IPv6
If enabled, verify that you entered either an FQDN or IPv6 address. Note: If enabled, the monitor will connect exclusively over IPv6.
String to send
A string sent to hosts upon connecting. Note that string escapes (e.g., /n) are not permitted.
Connect timeout
The amount of time in milliseconds the monitoring probe will attempt to connect to a host before it is marked as “failed” or “down.”
Connect with SSL
Enable or disable the option to connect with SSL.
IP address or hostname
(Required) The IP address (IPv4 or IPv6) or fully qualified domain name (FQDN) of the device you would like to monitor.
Add TLS verify
Select the checkbox to enable TLS verification on this monitor. NS1 recommends keeping this option disabled if the monitor is failing due to a certificate error, such as an expired certificate for which you do not want this to be used as a failure condition.
TCP Port
(Required) If you are monitoring an HTTP server, set the TCP port to 80. For an HTTPS server, set the TCP port to 443.
-
Once complete, click Save probe. The new TCP monitor appears in your list of monitors used.
To complete the setup process, you must connect the monitor to an answer to automatically change the “up” metadata to reflect the monitor's status. When the tested host meets the "up" conditions, it will change the metadata to up=true. If the tested host does not meet the "up" conditions, the metadata is automatically changed to up=false.
-
Under DNS > Zones, navigate to the zone and record upon which you want to attach the monitor. Then click into the record to view associated answers.
-
Click Create Filter Chain (which alternatively displays as Edit Filter Chain if filters already exist on the record).
-
Select or drag-and-drop the Up filter option (and any other desired filters) to the list of active filters.
-
Click Save filter chain. Now you can see the Filter Chain configuration to the left of the answer list.
-
On the left-hand sidebar showing the Filter Chain configuration, click the Up filter to expand that box and reveal filter-specific metadata options.
-
Click the up: unset metadata label beneath the answer to view the Answer Metadata configuration screen.
-
Click the icon in the Feed column next to the up/down filter setting to reveal a list of available data feeds—including the monitor you created earlier.
-
Select the TCP monitor you created earlier, and click Ok.
-
Click Save record to save your changes.
When the TCP monitor detects a failed endpoint, it automatically adjusts the answer metadata to indicate that the endpoint is “down.” As a result, DNS traffic is steered to better-performing endpoints.