Case Study - Defending against DDoS attacks, improving DNS management, and enhancing web redirects

Update monitoring check

Description

Update a monitoring check


 Parameters

Name Data Type Status Description
auth-id Integer Required Authentication parameter
auth-password String Required Authentication parameter
name String Required Name of the monitoring check
check_type Integer Required

Monitoring check types for this Failover:

  • 1 - Ping (15% threshold)
  • 2 - Ping (25% threshold)
  • 3 - Ping (50% threshold)
  • 4 - HTTP
  • 5 - HTTPS
  • 6 - HTTP custom string
  • 7 - HTTPS custom string
  • 8 - TCP
  • 9 - UDP
  • 10 - DNS
  • 12 - Heartbeat
  • 13 - TLS (SSL) certificate
id Integer Required The ID of the monitoring check, that you want to update
ip String Optional The IP address which will be monitored, it is required for all checks except the Heartbeat check. 
status_change_checks Integer Optional The number of checks to confirm the change of status. By default, the value is 1.
monitoring_region String Optional

Parameter required if you would like to specify a monitoring region or country. Possible values:

  • global - Global
  • eur - Europe
  • nam - North America
  • asi - Asia-Pacific
  • at - Austria
  • bg - Bulgaria
  • br - Brazil
  • ca - Canada
  • de - Germany
  • es - Spain
  • fi - Finland
  • hk - Hong Kong
  • hu - Hungary
  • il - Israel
  • in - India
  • it - Italy
  • jp - Japan
  • kr - South Korea
  • mx - Mexico
  • nl - Netherlands
  • pe - Peru
  • pl - Poland
  • ro - Romania
  • ru - Russian Federation
  • sg - Singapore
  • tr - Turkey
  • tw - Taiwan
  • uk - United Kingdom
  • us - United States
  • za - South Africa
host String Optional Parameter required for HTTP, HTTPS, Custom HTTP, Custom HTTPS and DNS check types. It must contain a hostname (FQDN).
port Integer Optional Parameter required for HTTP, HTTPS, Custom HTTP, Custom HTTPS, TCP and UDP check types. It must contain the port of the server. For TCP/UDP is a port on the Main IP.
path String Optional Parameter for HTTP, HTTPS, Custom HTTP and Custom HTTPS check types. If there is a specific path on the FQDN, it must be filled in this parameter.
content String Optional Parameter required for Custom HTTP and Custom HTTPS check types. In case you require a specific output to be returned, it must be filled in this parameter (e.g. OK).
open_port String Optional

Parameter required for TCP and UDP check types:

  • 0 - Monitoring check will be considered as UP if the port is closed, filtered or there is no successful connection
  • 1 - Monitoring check will be considered as UP If the port is opened.
query_type String Optional Parameter required for DNS check type. It must contain the record type (e.g. A).
query_response String Optional  Parameter required for DNS check type. You must fill in the response of the DNS server for this specific record.
check_period Integer Optional

Time-frame between each monitoring check. Possible values:

  • 60 - 1 minute
  • 120 - 2 minutes
  • 300 - 5 minutes
  • 600 - 10 minutes
  • 900 - 15 minutes
  • 1200 - 20 minutes
  • 1800 - 30 minutes
  • 3600 - 1 hour
state Integer Optional

Default value is Active. Possible values:

  • 0 - Paused
  • 1 - Active
timeout Integer Optional Seconds to wait for the server to reply. Must be between 4 and 10.
http_status_code Integer Required HTTP status code the monitored server will return. It can be between 100 and 599.
content_match String Optional Is the expected content an exact match or is it a keyword in the returned content from the server? The default value is - exact match. Possible values:
  • exact
  • keyword
  • regex
custom_header String Optional Custom header name for HTTP/S check. The header name must contain only Latin letters (upper and/or lowercase), dash, and/or underscore (a-zA-Z-_).
custom_header_value String Optional Custom header value for HTTP/S check.

Return: Status and message.


Errors

When the authentication of API user is not correct, any API request will fail with the following status and statusDescription:

{"status":"Failed","statusDescription":"Invalid authentication, incorrect auth-id or auth-password."}

If you have entered a missing, or invalid name, the following status will be returned:

{"status":"Failed","statusDescription":"Name is mandatory, it should be no longer than 32 characters and can only contain a-z, A-Z, 0-9, -, ., and space characters."}

If the value for "check_type" is missing, or invalid, the following status will be returned:

{"status":"Failed","statusDescription":"This is invalid monitoring type."}

If the value for "id" is missing, or invalid, the following status will be returned:

{"status":"Failed","statusDescription":"Missing monitoring record."}

If the value for "ip" is missing, or invalid, the following status will be returned:

{"status":"Failed","statusDescription":"Invalid IP address"}

Note: These are example errors in JSON format, and these are not the only errors that can be displayed.


 Example

URL JSON: https://api.cloudns.net/monitoring/update.json
POST/GET: auth-id=0&auth-password=password&id=170&name=name&check_type=5&ip=127.0.0.1&host=cloudns.net&port=443&check_period=600

URL XML: https://api.cloudns.net/monitoring/update.xml
POST/GET: auth-id=0&auth-password=password&id=170&name=name&check_type=5&ip=127.0.0.1&host=cloudns.net&port=443&check_period=600


Last modified: 2024-02-13
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more