Understanding How The API Works »
Creating a Monitor using the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
In order for monitoring to occur on your account, please make sure the IP addresses included here (https://manage.dynect.net/help/agents.html) can reach all your network endpoints. The web page requires you to log-on to Dyn’s Managed DNS.
If all fields are left at default for the HTTP, HTTPS, SMTP, or TCP protocols, the measured system will display as ‘healthy’ or ‘online’ if it returns any return code. Adding contents to the Path field will require a 200 level return code for the measured system to display as ‘healthy’ or ‘online’.
Note: Total number of records in a single Response Pool may not be more than 255.
Warning: Dyn recommends setting an explicit fallback record entry in all Traffic Director services to ensure a query is always answered with a record. See
TD Best Practices – Fallback Entry for more information on setting up a fall back entry.
REST Syntax
Click to view all REST Resources |
/REST/DSFMonitor/ POST — Creates a new Monitor.
HTTP Action — POST
URI — https://api.dynect.net/REST/DSFMonitor/ |
Arguments — Click for More Info
- string
label — Required. A label to identify the Monitor.
- string
protocol — Required. The protocol to monitor.
Valid values:
HTTP
HTTPS
PING
SMTP
TCP
- string
response_count – Required. Minimum required ‘up’ agent responses to report response pool host as ‘up’. If ‘up’ responses are less than the minimum, host is set to failover.
Valid values: 0, 1, 2 or 3.
- string
probe_interval — Required. How often to run the monitor. Must be twice the TTL setting.
Valid values:
60 – Every minute
300 – Every 5 minutes
600 – Every 10 minutes
900 – Every 15 minutes
- string
retries — Required. How many retries the monitor should attempt on failure before giving up.
Valid values:
0
1
2
- string
active — Indicates if the Monitor is active.
Valid values:
Y – Monitor is active.
N – Monitor is inactive. Default.
- hash
options — Options that pertain to the Monitor
- string
timeout — Time (in seconds) before the connection attempt times out.
- string
port — For HTTP(S)/SMTP/TCP probes, an alternate connection port. Leaving the field blank means it will monitor the default port (80 for HTTP and TCP, 443 for HTTPS, and 25 for SMTP)
- string
path — For HTTP(S) probes, a specific path to request. Designate a path other than the root to be monitored. Paths should be supplied as a relative path to the root ‘/’ directory of the website.
- string
host — For HTTP(S) probes, a value to pass in to the Host: header.
- string
header — For HTTP(S) probes, additional header fields/values to pass in, separated by the newline character (\n).See Configuring Monitor Headers for more information on using custom headers and macros in your endpoint monitoring.
- string
expected — Designate the data expected in the protocol response while monitoring the host in the pool. Maximum length: 255 bytes. Exceeding the maximum size will result in an ‘Invalid_Data’ error at run time with the message ‘Too long’. Field is case-sensitive. Exact string match required to return ‘up’ status. For HTTP(S) probes, a case sensitive sub-string to search for in the response. For SMTP probes, a string to compare the banner against. Not used for PING, or TCP protocols.
- hash
host_override – Override host data for specific endpoint addresses.
- string
address – Address of an endpoint.
- string
host – Host to use when checking that endpoint.
- array
endpoints — Endpoints that are associated with the Monitor.
- string
active — Indicates whether or not the endpoint is active.
- string
label — A label to identify the endpoint.
- string
address — The address to monitor.
- string
site_prefs — An array of 3-digit codes for the locations you want monitoring the endpoints [site_pref,site_pref . . .].
Use the site codes from this page: https://manage.dynect.net/help/agents.html. You must be logged into your Traffic Director account to view this page.
|
Response — Click for More Info
- string
dsf_monitor_id — Identifier for the Monitor.
- string
label — The unique label for the Monitor.
- string
protocol — The protocol to monitor.
Valid values:
HTTP
HTTPS
PING
SMTP
TCP
- string
active — Indicates whether or not the Monitor is active.
- string
response_count – Minimum required ‘up’ agent responses to report response pool host as ‘up’. If ‘up’ responses are less than the minimum, host is set to failover.
Valid values: 0, 1, 2 or 3.
- string
probe_interval — How often to run the monitor.
Valid values:
60 – Every minute
300 – Every 5 minutes
600 – Every 10 minutes
900 – Every 15 minutes
- string
retries — How many retries the Monitor should attempt on failure before giving up.
- hash
options — Options that pertain to the Monitor.
- string
timeout — Time (in seconds) before the connection attempt times out.
- string
port — For HTTP(S)/SMTP/TCP probes, an alternate connection port.
- string
path — For HTTP(S) probes, a specific path to request.
- string
host — For HTTP(S) probes, a value to pass in to the Host: header.
- string
header — For HTTP(S) probes, additional header fields/values to pass in, separated by the newline character (\n).See Configuring Monitor Headers for more information on using custom headers and macros in your endpoint monitoring.
- string
expected — Designate the data expected in the protocol response while monitoring the host in the pool. Maximum length: 255 bytes. Exceeding the maximum size will result in an ‘Invalid_Data’ error at run time with the message ‘Too long’. Field is case-sensitive. Exact string match required to return ‘up’ status. For HTTP(S) probes, a case sensitive sub-string to search for in the response. For SMTP probes, a string to compare the banner against. Not used for PING, or TCP protocols.
- hash
host_override – Override host data for specific endpoint addresses.
- string
address – Address of an endpoint.
- string
host – Host to use when checking that endpoint.
- array
endpoints — Endpoints that are associated with the Monitor.
- string
active — Indicates whether or not the endpoint is active.
- string
label — A label to identify the endpoint.
- string
address — The address to monitor.
|
SOAP Syntax
Click to view all SOAP Commands |
CreateDSFMonitor — Creates a new Monitor. |
Arguments — Click for More Info
- string
label — Required. A label to identify the Monitor.
- string
protocol — Required. The protocol to monitor.
Valid values:
HTTP
HTTPS
PING
SMTP
TCP
- string
response_count – Minimum required ‘up’ agent responses to report response pool host as ‘up’. If ‘up’ responses are less than the minimum, host is set to failover.
Valid values: 0, 1, 2 or 3.
- string
probe_interval — Required. How often to run the monitor. Must be twice the TTL setting.
Valid values:
60 – Every minute
300 – Every 5 minutes
600 – Every 10 minutes
900 – Every 15 minutes
- string
retries — Required. How many retries the monitor should attempt on failure before giving up.
Valid values:
0
1
2
- string
active — Indicates if the Monitor is active.
Valid values:
Y – Monitor is active.
N – Monitor is inactive. Default.
- hash
options — Options that pertain to the Monitor
- string
timeout — Time (in seconds) before the connection attempt times out.
- string
port — For HTTP(S)/SMTP/TCP probes, an alternate connection port. Leaving the field blank means it will monitor the default port (80 for HTTP and TCP, 443 for HTTPS, and 25 for SMTP)
- string
path — For HTTP(S) probes, a specific path to request. Designate a path other than the root to be monitored. Paths should be supplied as a relative path to the root ‘/’ directory of the website.
- string
host — For HTTP(S) probes, a value to pass in to the Host: header.
- string
header — For HTTP(S) probes, additional header fields/values to pass in, separated by the newline character (\n).See Configuring Monitor Headers for more information on using custom headers and macros in your endpoint monitoring.
- string
expected — Designate the data expected in the protocol response while monitoring the host in the pool. Maximum length: 255 bytes. Exceeding the maximum size will result in an ‘Invalid_Data’ error at run time with the message ‘Too long’. Field is case-sensitive. Exact string match required to return ‘up’ status. For HTTP(S) probes, a case sensitive sub-string to search for in the response. For SMTP probes, a string to compare the banner against. Not used for PING, or TCP protocols.
- hash
host_override – Override host data for specific endpoint addresses.
- string
address – Address of an endpoint.
- string
host – Host to use when checking that endpoint.
- array
endpoints — Endpoints that are associated with the Monitor.
- string
active — Indicates whether or not the endpoint is active.
- string
label — A label to identify the endpoint.
- string
address — The address to monitor.
- string
site_prefs — An array of 3-digit codes for the locations you want monitoring the endpoints [site_pref,site_pref . . .].
Use the site codes from this page: https://manage.dynect.net/help/agents.html. You must be logged into your Traffic Director account to view this page.
- string
token — Required. The session identifier.
|
Response — Click for More Info
- hash
data
- string
dsf_monitor_id — Identifier for the Monitor.
- string
label — The unique label for the Monitor.
- string
protocol — The protocol to monitor.
Valid values:
HTTP
HTTPS
PING
SMTP
TCP
- string
active — Indicates whether or not the Monitor is active.
- string
response_count – Minimum required ‘up’ agent responses to report response pool host as ‘up’. If ‘up’ responses are less than the minimum, host is set to failover.
Valid values: 0, 1, 2 or 3.
- string
probe_interval — How often to run the monitor.
Valid values:
60 – Every minute
300 – Every 5 minutes
600 – Every 10 minutes
900 – Every 15 minutes
- string
retries — How many retries the monitor should attempt on failure before giving up.
- hash
options — Options that pertain to the Monitor.
- string
timeout — Time (in seconds) before the connection attempt times out.
- string
port — For HTTP(S)/SMTP/TCP probes, an alternate connection port.
- string
path — For HTTP(S) probes, a specific path to request.
- string
host — For HTTP(S) probes, a value to pass in to the Host: header.
- string
header — For HTTP(S) probes, additional header fields/values to pass in, separated by the newline character (\n).See Configuring Monitor Headers for more information on using custom headers and macros in your endpoint monitoring.
- string
expected — Designate the data expected in the protocol response while monitoring the host in the pool. Maximum length: 255 bytes. Exceeding the maximum size will result in an ‘Invalid_Data’ error at run time with the message ‘Too long’. Field is case-sensitive. Exact string match required to return ‘up’ status. For HTTP(S) probes, a case sensitive sub-string to search for in the response. For SMTP probes, a string to compare the banner against. Not used for PING, or TCP protocols.
- hash
host_override – Override host data for specific endpoint addresses.
- string
address – Address of an endpoint.
- string
host – Host to use when checking that endpoint.
- array
endpoints — Endpoints that are associated with the Monitor.
- string
active — Indicates whether or not the endpoint is active.
- string
label — A label to identify the endpoint.
- string
address — The address to monitor.
|
Example Request — Click for More Info
{
'label' => 'My Monitor',
'response_count' => 2,
'probe_interval' => 60,
'retries' => 1,
'protocol' => 'HTTP',
'options' => {
'timeout' => 15,
'port' => 8080,
'path' => 'testpage',
'expected' => 'running'
},
'token' => 'asdlj34ot879834cdzjklfK'
}
|
<< DNS API Knowledge Base