:source: fadcos_health_check.py
:orphan:
.. fadcos_health_check:
fadcos_health_check -- health check configuration in Fortinet's FortiADC
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Configure FortiADC health check
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.8
FortiADC Version Compatibility
------------------------------
.. raw:: html
|
v7.0.0 |
v7.0.1 |
v7.0.2 |
v7.1.0 |
v7.1.4 |
v7.2.2 |
v7.4.0 |
| fortiadc_health_check |
yes |
yes |
yes |
yes |
yes |
yes |
yes |
Parameters
----------
.. raw:: html
- action - Type of action to perform on the objecttype: str required: true
- addr_type - Type of address (IPv4/IPv6)type: str required: false default: ipv4
- agent_type - SNMP agent typetype: str required: false default: UCD
- acct_appid - Specify the type Unsigned32 accounting application ID used to advertise support of the accounting portion of an application.type: str required: false default: 0
- auth_appid - Specify the type Unsigned32 authentication application ID used to advertise support of the authentication and authorization portion of an application.type: str required: false default: 0
- allow_ssl_version - Allowed SSL versionstype: str required: false default: sslv3 tlsv1.0 tlsv1.1 tlsv1.2
- attribute - Attributes for the LDAP health check object.type: str required: false
- basedn - The distinguished name where a LDAP server will search from.type: str required: false
- binddn - The distinguished name used to bind to a LDAP server.type: str required: false
- column - The column in which the send string (command) takes effecttype: str required: false
- community - Must match the SNMP community string set on the backend server. If this does not match, all SNMP health checks fail.type: str required: false
- compare_type - SNMP compare typetype: str required: false default: less
- connect_type - Oracle connect typetype: str required: false default: service_name
- cpu - Maximum normal CPU usage. If overburdened, the health check fails.type: str required: false default: 96
- cpu_weight - CPU Weighttype: str required: false default: 100
- database - Databasetype: str required: false
- dest_addr - IP address to send health check traffic.type: str required: false default: 0.0.0.0
- dest_addr6 - IP address to send health check traffic.type: str required: false default: ::
- dest_addr_type - Destination address IP type.type: str required: false default: ipv4
- disk - Maximum normal disk usage. If the disk is too full, the health check fails.type: str required: false default: 96
- disk_weight - Disk Weighttype: str required: false default: 100
- domain_name - The FQDN, such as www.example.com, to use in the DNS A/AAAA record health check.type: str required: false
- down_retry - Attempts to retry the health check to see if an up server has become unavailable.type: str required: false
- file_name - Specify a file that exists on the backend server. Path is relative to the initial login path. If the file does not exist or is not accessible, the health check fails.type: str required: false default: welcome.txt
- folder_name - Select an email mailbox to use in the health check. If the mailbox does not exist or is not accessible, the health check fails. The default is INBOX.type: str required: false default: INBOX
- host_ip6_addr - Specify the type IPv6 address used to inform a Diameter peer of the sender's IP address when the destination address type is IPv6. The default is blank, meaning that it is the address of the FortiADC's outgoing interface.type: str required: false default: ::
- host_ip_addr - Specify the type IPv4 address used to inform a Diameter peer of the sender's IP address when the destination address type is IPv4. The default is blank, meaning that it is the address of the FortiADC's outgoing interface.type: str required: false default: 0.0.0.0
- hostname - For HTTP or HTTPS health checks, you can specify the hostname (FQDN) instead of the destination IP address. This is useful in VM environments where multiple applications have the same IP address.type: str required: false
- http_extra_string - The non-empty additional string should end with '\r\n'.type: str required: false
- host_addr - IP address that matches the FQDN, indicating a successful health check.type: str required: false default: 0.0.0.0
- host_addr6 - IP address that matches the FQDN, indicating a successful health check.type: str required: false default: ::
- http_connect - If the real server pool members are HTTP proxy servers, specify an HTTP CONNECT option.type: str required: false default:no_connect
- http_version - Specify the HTTP versiontype: str required: false default: http_1.1
- interval - Seconds between each health check. Should be more than the timeout to prevent overlapping health checks.type: str required: false default: 5
- filter - Criteria to use in selecting results.type: str required: false
- local_cert - Local SSL Health Check Client certificate.type: str required: false default: Factory
- match_type - Match String/Match Status/Match All (match both string and status)type: str required: false default: match_string
- mem - Maximum normal RAM usage. If overburdened, the health check fails.type: str required: false default: 96
- mem_weight - Memory weighttype: str required: false default: 100
- method_type - HTTP method for the test traffic.type: str required: false default: http_head
- mssql_row - The row in which the send string (command) takes effect.type: str required: false
- mssql_column - The column in which the send string (command) takes effect.type: str required: false
- mssql_receive_string - A string expected in return when the request is successful.type: str required: false
- mssql_send_string - The request string.type: str required: false
- mysql_server_type - MySQL server type (primary/secondary)type: str required: false default: primary
- name - Heath check name.type: str required: true
- nas_ip - NAS IP address RADIUS attribute (if the RADIUS server requires this attribute to make a connection).type: str required: false
- oracle_receive_string - The string we accept in order to receive.type: str required: false
- oracle_send_string - Send a string (command) to the OracleDb server.type: str required: false
- origin_host - Specify the FortiADC appliance that originates the Diameter message. The value is in FQDN format and used to uniquely identify a Diameter node for duplicate connection and routing loop detection.type: str required: false
- origin_realm - Specify the realm of the FortiADC appliance that originates the Diameter message. The value is in FQDN format.type: str required: false
- passive - Select this option if the backend server uses passive FTP.type: str required: false default: enable
- password - Specify the password, if applicable.type: str required: false
- pwd_type - RADIUS password type (User/CHAP)type: str required: false default: user-password
- port - Specify the port number. Valid values range from 0 to 65535.type: str required: false default: 0
- product_name - Specify the type UTF8String product name which contains the vendor assigned name for the product.type: str required: false default: FortiADC
- radius_reject - RADIUS reject (enable/disable)type: str required: false default: disable
- receive_string - A string expected in return when the HTTP GET request is successful.type: str required: false default: receive-string
- rtsp_method_type - RTSP Options/RTSP Describetype: str required: false default: options
- rtsp_describe_url - Specify the RTSP describe URLtype: str required: false
- row - The row in which the send string (command) takes effecttype: str required: false
- remote_username - Remote server username.type: str required: false
- remote_password - Remote server password, if applicable.type: str required: false
- remote_host - If you use HTTP CONNECT to test proxy servers, specify the remote server IP address.type: str required: false
- remote_port - If you use HTTP CONNECT to test proxy servers, specify the remote server port.type: str required: false default: 0
- script - Specify the script which we create or which we have pre-definedtype: str required: false default: CURL_HTTP_CODE
- secret_key - The secret set on the backend server.type: str required: false
- send_string - The request URL, such as /contact.php.type: str required: false default: /
- sip_request_type - Specify the SIP request type to be used for health checks: SIP Options/SIP Registertype: str required: false default: register
- ssl_ciphers - List of SSL cipherstype: str required: false default: List
- status_code - The health check sends an HTTP request to the server. Specify the HTTP status code in the server reply that indicates a successful test. Typically, you use status code 200 (OK). Other status codes indicate errors.type: str required: false default: 200
- timeout - Seconds to wait for a reply before assuming that the health check has failed. The default is 5.type: str required: false default: 5
- hc_type - Health Check Type.type: str required: true
- up_retry - health check sends an HTTP request to the server. Specify the HTTP status code in the server reply that indicates a s Attempts to retry the health check to see if a down server has become available.type: str required: false default: 1
- username - Username of an account on the backend server.type: str required: false
- vendor_id - Specify the type Unsigned32 vendor ID which contains the IANA "SMI Network Management Private Enterprise Codes" value assigned to the vendor of a Diameter application.type: str required: false default: 12356
- version - SNMP v1 or v2c.type: str required: false default: v1
- vdom - VDOM name if enabled.type: str required: true (if VDOM is enabled)
Examples
--------
.. code-block:: yaml+jinja
- name:
hosts: all
connection: httpapi
gather_facts: false
tasks:
- name: Manage Health Checks
fadcos_health_check:
action: add
name: test_hc
dest_addr_type: ipv4
dest_addr: 1.2.3.5
up_retry: 1
down_retry: 3
interval: 5
timeout: 3
hc_type: icmp
Return Values
-------------
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
.. raw:: html
- 200 - OK: Request returns successful.
- 400 - Bad Request: Request cannot be processed by the API.
- 401 - Not Authorized: Request without successful login session.
- 403 - Forbidden: Request is missing CSRF token or administrator is missing access profile permissions.
- 404 - Resource Not Found: Unable to find the specified resource.
- 405 - Method Not Allowed: Specified HTTP method is not allowed for this resource.
- 413 - Request Entity Too Large: Request cannot be processed due to large entity.
- 424 - Failed Dependency: Fail dependency can be duplicate resource, missing required parameter, missing required attribute, or invalid attribute value.
- 429 - Access temporarily blocked: Maximum failed authentications reached. The offended source is temporarily blocked for certain amount of time.
- 500 - Internal Server Error: Internal error when processing the request.
For errorcode please check FortiADC API errorcode at : https://fndn.fortinet.net/index.php?/fortiapi/981-fortiadc/
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Jie Li
- Aravindh Sri
.. hint::
If you notice any issues in this documentation, you can create a pull request to improve it at: https://github.com/fortinet-ansible-dev/ansible-galaxy-fortiadc-sphinxdoc/pulls