Recovering a Failover event 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 »
REST Syntax
Click to view all REST Resources |
/REST/Failover/ PUT — Recover the Failover service on the indicated zone and node.
HTTP Action — PUT
URIs — https://api.dynect.net/REST/Failover/<zone>/<fqdn>/ |
Arguments:
To recover the service — boolean recover — Required. |
Response: Click for More Info
- 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
- 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 |
RecoverFailover — Recovers an existing Active Failover service. |
Arguments:
- string
fqdn — Required. Name of the node where the service exists.
- string
token — Required. The session identifier.
- string
zone — Required. Name of the zone where the service exists.
|
Response — Click for More Info
- 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
- 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
{
'zone' => 'example.com',
'fqdn' => 'somehost.example.com',
'token' => 'asdlj34ot879834cdzjklfK',
}
|
<< DNS API Knowledge Base