Creating an Active Failover service in the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
Understanding How The API Works
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.
REST Syntax
Click to view all REST Resources |
/REST/Failover/ POST — Creates a new Active Failover service at the zone/node indicated.
HTTP Action — POST
URIs — https://api.dynect.net/REST/Failover/<zone>/<fqdn>/ |
Arguments — Click for More Info
- string
address — Required. IPv4 Address or FQDN
- string
failover_mode — Required. Indicates the target failover resource type.
Valid values:
ip – failover to an IPv4 address
cname – failover to a CNAME
- string
failover_data — Required. The IPv4 Address or CNAME data for the failover target.
- string
auto_recover — Indicates whether the service should restore its original state when the source IPs resume online status. Valid values:
Y – The service should come out of failover automatically when IPs come back up.
N – The service should stay in failover until a user explicitly takes the service out of failover.
- string
notify_events — A comma separated list of what events trigger notifications.
Valid values:
ip – Send notifications when individual IPs change status.
svc – Send notifications when the service state changes.
nosrv – Send notifications when an IP labeled ‘Do Not serve’ changes status.
- string
recovery_delay — The number of consecutive monitoring intervals to delay before placing an IP address back in service. Defaults to 0.
- string
syslog_server — The Hostname or IP address of a server to receive syslog notifications on monitoring events.
- string
syslog_port — The port where the remote syslog server listens. Defaults to 514.
- string
syslog_ident — The ident to use when sending syslog notifications. Defaults to dynect.
- string
syslog_facility — The syslog facility to use when sending syslog notifications. Defaults to daemon.
Valid values: kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, ntp, security, console, local0, local1, local2, local3, local4, local5, local6, local7
- string
syslog_delivery – Identifies when ‘health probe’ messages are logged through syslog.
Valid Values:
change – When the service’s status changes. (default)
all – At every monitoring interval.
- string
syslog_probe_fmt — The customizable string for probe notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos probe %tim: %sit %sta %rti “%msg” %adr.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- string
syslog_status_fmt — The customizable string for status notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos status %tim: %reg %sta %ser %rda.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- hash
monitor — Required. The health monitor for the service
- string
protocol — Required. The protocol to monitor.
Valid values: HTTP, HTTPS, PING, SMTP, TCP
- string
interval — Required. How often to run the monitor.
Valid values:
1 – Every minute
5 – Every 5 minutes
10 – Every 10 minutes
15 – Every 15 minutes
- string
retries — The number of retries the monitor attempts on failure before giving up.
- string
timeout — The amount of 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).
- string
expected — For HTTP(S) probes, a string to search for in the response. For SMTP probes, a string to compare the banner against. Failure to find this string means the monitor will report a down status.
- string
contact_nickname — Required. Name of contact to receive notifications.
- string
ttl — Time To Live in seconds of records in the service. Must be less than 1/2 of the Health Probe’s monitoring interval.
Valid values: 30, 60, 150, 300, 450
|
Response — Click for More Info
- integer
task_id – The number assigned to the task to create an active failover instance.
- string
active — Indicates if the service is active.
Valid values:
Y — The service is active.
N — The service is inactive
- string
status — The current state of the service.
Valid values:
unk – The service state is not yet known.
ok – There are no problems with the service.
trouble – One or more node_ips are reporting down.
failover – The number of okay node_ips has fallen below failover_count. The service has failed over.
- string
address — IPv4 Address or FQDN
- string
failover_mode — Indicates the target failover resource type.
Valid values:
ip – Failover to an IPv4 address
cname – Failover to a CNAME
- string
failover_data — The IPv4 Address or CNAME data for the failover target.
- string
auto_recover — Indicates whether the service should restore its original state when the source IPs resume online status. Valid values:
Y – The service should come out of failover automatically when IPs come back up.
N – The service should stay in failover until a user explicitly takes the service out of failover.
- string
notify_events — A comma separated list of what events trigger notifications.
Valid values:
ip – Send notifications when individual IPs change status.
svc – Send notifications when the service state changes.
nosrv – Send notifications when an IP labeled ‘Do Not serve’ changes status.
- string
recovery_delay — The number of consecutive monitoring intervals to delay before placing an IP address back in service. Defaults to 0.
- string
syslog_server — The Hostname or IP address of a server to receive syslog notifications on monitoring events.
- string
syslog_port — The port where the remote syslog server listens. Defaults to 514.
- string
syslog_ident — The ident to use when sending syslog notifications. Defaults to dynect.
- string
syslog_facility — The syslog facility to use when sending syslog notifications. Defaults to daemon.
Valid values: kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, auth, priv, ftp, ntp, security, console, local0, local1, local2, local3, local4, local5, local6, local7
- string
syslog_delivery – Identifies when ‘health probe’ messages are logged through syslog.
Valid Values:
change – When the service’s status changes. (default)
all – At every monitoring interval.
- string
syslog_probe_fmt — The customizable string for probe notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos probe %tim: %sit %sta %rti “%msg” %adr.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- string
syslog_status_fmt — The customizable string for status notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos status %tim: %reg %sta %ser %rda.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- hash
monitor — The health monitor for the service.
- string
protocol — The protocol to monitor.
Valid values: HTTP, HTTPS, PING, SMTP, TCP
- string
interval — How often to run the monitor.
Valid values:
1 – Every minute
5 – Every 5 minutes
10 – Every 10 minutes
15 – Every 15 minutes
- string
retries — The number of retries the monitor attempts on failure before giving up.
- string
timeout — The amount of 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).
- string
expected — For HTTP(S) probes, a string to search for in the response. For SMTP probes, a string to compare the banner against. Failure to find this string means the monitor will report a down status.
- string
contact_nickname — Name of contact to receive notifications.
- string
fqdn — Fully qualified domain name of a node in the zone.
- string
ttl — Time To Live in seconds of records in the service. Must be less than 1/2 of the Health Probe’s monitoring interval. Valid values: 30, 60, 150, 300, 450
- string
zone — Name of the zone.
- array
log — Recent monitoring logs for the address
- string
status — The state of the address at the time of the log entry.
Valid values:
unk – The state of the IP address is not yet known
up – The IP address is up
down – The IP address is down
- string
message — If status is down, an error message explaining the failure.
- string
time — The time or probe interval when this log entry was generated.
- string
site_code — The airport code of the monitoring site that generated this log entry.
|
SOAP Syntax
Click to view all SOAP Commands |
CreateFailover — Creates a new Active Failover service at the zone/node indicated. |
Arguments — Click for More Info
- string
address — Required. IPv4 Address or FQDN.
- string
failover_mode — Required. Indicates the target failover resource type.
Valid values:
ip – failover to an IPv4 address
cname – failover to a CNAME
- string
failover_data — Required. The IPv4 Address or CNAME data for the failover target.
- string
auto_recover — Indicates whether the service should restore its original state when the source IPs resume online status. Valid values:
Y – The service should come out of failover automatically when IPs come back up.
N – The service should stay in failover until a user explicitly takes the service out of failover.
- string
notify_events — A comma separated list of what events trigger notifications.
Valid values:
ip – Send notifications when individual IPs change status.
svc – Send notifications when the service state changes.
nosrv – Send notifications when an IP labeled ‘Do Not serve’ changes status.
- string
recovery_delay — The number of consecutive monitoring intervals to delay before placing an IP address back in service. Defaults to 0.
- string
syslog_server — The Hostname or IP address of a server to receive syslog notifications on monitoring events.
- string
syslog_port — The port where the remote syslog server listens. Defaults to 514.
- string
syslog_ident — The ident to use when sending syslog notifications. Defaults to dynect.
- string
syslog_facility — The syslog facility to use when sending syslog notifications. Defaults to daemon.
Valid values: kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, ntp, security, console, local0, local1, local2, local3, local4, local5, local6, local7
- string
syslog_delivery – Identifies when ‘health probe’ messages are logged through syslog.
Valid Values:
change – When the service’s status changes. (default)
all – At every monitoring interval.
- string
syslog_probe_fmt — The customizable string for probe notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos probe %tim: %sit %sta %rti “%msg” %adr.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- string
syslog_status_fmt — The customizable string for status notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos status %tim: %reg %sta %ser %rda.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- hash
monitor — Required. The health monitor for the service.
- string
protocol — Required. The protocol to monitor.
Valid values: HTTP, HTTPS, PING, SMTP, TCP
- string
interval — Required. How often to run the monitor.
Valid values:
1 – Every minute
5 – Every 5 minutes
10 – Every 10 minutes
15 – Every 15 minutes
- string
retries — The number of retries the monitor attempts on failure before giving up.
- string
timeout — The amount of 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).
- string
expected — For HTTP(S) probes, a string to search for in the response. For SMTP probes, a string to compare the banner against. Failure to find this string means the monitor will report a down status.
- string
contact_nickname — Required. Name of contact to receive notifications.
- string
fqdn — Required. Name of the node where the service will exist.
- string
ttl — Time To Live in seconds of records in the service. Must be less than 1/2 of the Health Probe’s monitoring interval.
Valid values: 30, 60, 150, 300, 450
- string
token — Required. The session identifier.
- string
zone — Required. Name of the zone where the service will exist.
|
Response — Click for More Info
- integer
task_id – The number assigned to the task to create an active failover instance.
- hash
data
- string
active — Indicates if the service is active.
Valid values:
Y — The service is active.
N — The service is inactive
- string
status — The current state of the service.
Valid values:
unk – The service state is not yet known.
ok – There are no problems with the service.
trouble – One or more node_ips are reporting down.
failover – The number of okay node_ips has fallen below failover_count. The service has failed over.
- string
address — IPv4 Address or FQDN
- string
failover_mode — Indicates the target failover resource type.
Valid values:
ip – Failover to an IPv4 address
cname – Failover to a CNAME
- string
failover_data — The IPv4 Address or CNAME data for the failover target.
- string
auto_recover — Indicates whether the service should restore its original state when the source IPs resume online status. Valid values:
Y – The service should come out of failover automatically when IPs come back up.
N – The service should stay in failover until a user explicitly takes the service out of failover.
- string
notify_events — A comma separated list of what events trigger notifications.
Valid values:
ip – Send notifications when individual IPs change status.
svc – Send notifications when the service state changes.
nosrv – Send notifications when an IP labeled ‘Do Not serve’ changes status.
- string
recovery_delay — The number of consecutive monitoring intervals to delay before placing an IP address back in service. Defaults to 0.
- string
syslog_server — The Hostname or IP address of a server to receive syslog notifications on monitoring events.
- string
syslog_port — The port where the remote syslog server listens. Defaults to 514.
- string
syslog_ident — The ident to use when sending syslog notifications. Defaults to dynect.
- string
syslog_facility — The syslog facility to use when sending syslog notifications. Defaults to daemon.
Valid values: kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, auth, priv, ftp, ntp, security, console, local0, local1, local2, local3, local4, local5, local6, local7
- string
syslog_delivery – Identifies when ‘health probe’ messages are logged through syslog.
Valid Values:
change – When the service’s status changes. (default)
all – At every monitoring interval.
- string
syslog_probe_fmt — The customizable string for probe notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos probe %tim: %sit %sta %rti “%msg” %adr.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- string
syslog_status_fmt — The customizable string for status notifications’ syslog message format. The messages will replace the %xxx variables with the data required. Default: %hos status %tim: %reg %sta %ser %rda.
Valid values:
%hos – hostname
%tim – current timestamp or monitored interval
%reg – region code
%sta – status
%ser – record serial
%rda – rdata
%sit – monitoring site
%rti – response time
%msg – message from monitoring
%adr – address of monitored node
%med – median value
- hash
monitor — The health monitor for the service.
- string
protocol — The protocol to monitor.
Valid values: HTTP, HTTPS, PING, SMTP, TCP
- string
interval — How often to run the monitor.
Valid values:
1 – Every minute
5 – Every 5 minutes
10 – Every 10 minutes
15 – Every 15 minutes
- string
retries — The number of retries the monitor attempts on failure before giving up.
- string
timeout — The amount of 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).
- string
expected — For HTTP(S) probes, a string to search for in the response. For SMTP probes, a string to compare the banner against. Failure to find this string means the monitor will report a down status.
- string
contact_nickname — Name of contact to receive notifications.
- string
fqdn — Fully qualified domain name of a node in the zone.
- string
ttl — Time To Live in seconds of records in the service. Must be less than 1/2 of the Health Probe’s monitoring interval. Valid values: 30, 60, 150, 300, 450
- string
zone — Name of the zone.
- array
log — Recent monitoring logs for the address
- string
status — The state of the address at the time of the log entry.
Valid values:
unk – The state of the IP address is not yet known
up – The IP address is up
down – The IP address is down
- string
message — If status is down, an error message explaining the failure.
- string
time — The time or probe interval when this log entry was generated.
- string
site_code — The airport code of the monitoring site that generated this log entry.
|
Example Request — Click for More Info
{
'fqdn' => 'www.example.com',
'address' => '1.2.3.4',
'failover_mode' => 'ip',
'failover_data' => '5.5.5.5',
'auto_recover' => 'Y',
'contact_nickname' => 'owner',
'notify_events' => 'ip,svc',
'monitor' => {
'protocol' => 'HTTP',
'interval' => 1,
},
'token' => 'asdlkfjasl23j4879afa',
'ttl' => '3600',
'zone' => 'example.com',
}
|
<< DNS API Knowledge Base