fmgd_system_sdwan_healthcheck – SD-WAN status checking or health checking.
Added in version 1.0.0.
Synopsis
This module is able to configure a FortiManager device.
Examples include all parameters and values need to be adjusted to data sources before usage.
Tested with FortiManager v7.x.
Requirements
The below requirements are needed on the host that executes this module.
ansible-core>=2.16.0
FortiManager Version Compatibility
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Parameters
- access_token -The token to access FortiManager without using username and password. type: str required: false
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
- device - The parameter in requested url type: str required: true
- vdom - The parameter in requested url type: str required: true
- system_sdwan_healthcheck - SD-WAN status checking or health checking. type: dict
- addr_mode (Alias name: addr-mode) Address mode (ipv4 or ipv6). type: str choices: [ipv4, ipv6] more...
- class_id (Alias name: class-id) Traffic class id. type: list more...
- detect_mode (Alias name: detect-mode) The mode determining how to detect the server. type: str choices: [active, passive, prefer-passive, remote, agent-based] more...
- diffservcode Differentiated services code point (dscp) in the ip header of the probe packet. type: str more...
- dns_match_ip (Alias name: dns-match-ip) Response ip expected from dns server if the protocol is dns. type: str more...
- dns_request_domain (Alias name: dns-request-domain) Fully qualified domain name to resolve for the dns probe. type: str more...
- embed_measured_health (Alias name: embed-measured-health) Enable/disable embedding measured health information. type: str choices: [disable, enable] more...
- failtime Support meta variable type: int more...
- ftp_file (Alias name: ftp-file) Full path and file name on the ftp server to download for ftp health-check to probe. type: str more...
- ftp_mode (Alias name: ftp-mode) Ftp mode. type: str choices: [passive, port] more...
- ha_priority (Alias name: ha-priority) Ha election priority (1 - 50). type: int more...
- http_agent (Alias name: http-agent) String in the http-agent field in the http header. type: str more...
- http_get (Alias name: http-get) Url used to communicate with the server if the protocol if the protocol is http. type: str more...
- http_match (Alias name: http-match) Response string expected from the server if the protocol is http. type: str more...
- interval Support meta variable type: int more...
- members Member sequence number list. type: list more...
- mos_codec (Alias name: mos-codec) Codec to use for mos calculation (default = g711). type: str choices: [g711, g722, g729] more...
- name Status check or health check name. type: str more...
- packet_size (Alias name: packet-size) Packet size of a twamp test session. type: int more...
- password Twamp controller password in authentication mode. type: list more...
- port Port number used to communicate with the server over the selected protocol (0 - 65535, default = 0, auto select. type: int more...
- probe_count (Alias name: probe-count) Number of most recent probes that should be used to calculate latency and jitter (5 - 30, default = 30). type: int more...
- probe_packets (Alias name: probe-packets) Enable/disable transmission of probe packets. type: str choices: [disable, enable] more...
- probe_timeout (Alias name: probe-timeout) Support meta variable type: int more...
- protocol Protocol used to determine if the fortigate can communicate with the server. type: str choices: [ping, tcp-echo, udp-echo, http, twamp, ping6, dns, tcp-connect, ftp, https] more...
- quality_measured_method (Alias name: quality-measured-method) Method to measure the quality of tcp-connect. type: str choices: [half-close, half-open] more...
- recoverytime Support meta variable type: int more...
- security_mode (Alias name: security-mode) Twamp controller security mode. type: str choices: [none, authentication] more...
- server Support meta variable type: list more...
- sla Sla. type: list
more...
- id Sla id. type: int more...
- jitter_threshold (Alias name: jitter-threshold) Support meta variable type: int more...
- latency_threshold (Alias name: latency-threshold) Support meta variable type: int more...
- link_cost_factor (Alias name: link-cost-factor) Criteria on which to base link selection. type: list choices: [latency, jitter, packet-loss, mos, remote, custom-profile-1] more...
- mos_threshold (Alias name: mos-threshold) Support meta variable type: str more...
- packetloss_threshold (Alias name: packetloss-threshold) Support meta variable type: int more...
- priority_in_sla (Alias name: priority-in-sla) Value to be distributed into routing table when in-sla (0 - 65535, default = 0). type: int more...
- priority_out_sla (Alias name: priority-out-sla) Value to be distributed into routing table when out-sla (0 - 65535, default = 0). type: int more...
- custom_profile_threshold (Alias name: custom-profile-threshold) Custom profile threshold for sla to be marked as pass(0 - 10000000, default = 0). type: int more...
- sla_fail_log_period (Alias name: sla-fail-log-period) Time interval in seconds that sla fail log messages will be generated (0 - 3600, default = 0). type: int more...
- sla_id_redistribute (Alias name: sla-id-redistribute) Select the id from the sla sub-table. type: int more...
- sla_pass_log_period (Alias name: sla-pass-log-period) Time interval in seconds that sla pass log messages will be generated (0 - 3600, default = 0). type: int more...
- source Support meta variable type: str more...
- source6 Source ipv6 address used in the health-check packet to server. type: str more...
- system_dns (Alias name: system-dns) Enable/disable system dns as the probe server. type: str choices: [disable, enable] more...
- threshold_alert_jitter (Alias name: threshold-alert-jitter) Alert threshold for jitter (ms, default = 0). type: int more...
- threshold_alert_latency (Alias name: threshold-alert-latency) Alert threshold for latency (ms, default = 0). type: int more...
- threshold_alert_packetloss (Alias name: threshold-alert-packetloss) Alert threshold for packet loss (percentage, default = 0). type: int more...
- threshold_warning_jitter (Alias name: threshold-warning-jitter) Warning threshold for jitter (ms, default = 0). type: int more...
- threshold_warning_latency (Alias name: threshold-warning-latency) Warning threshold for latency (ms, default = 0). type: int more...
- threshold_warning_packetloss (Alias name: threshold-warning-packetloss) Warning threshold for packet loss (percentage, default = 0). type: int more...
- update_cascade_interface (Alias name: update-cascade-interface) Enable/disable update cascade interface. type: str choices: [disable, enable] more...
- update_static_route (Alias name: update-static-route) Enable/disable updating the static route. type: str choices: [disable, enable] more...
- user The user name to access probe server. type: str more...
- vrf Virtual routing forwarding id. type: int more...
- fortiguard Enable/disable use of fortiguard predefined server. type: str choices: [disable, enable] more...
- fortiguard_name (Alias name: fortiguard-name) Predefined health-check target name. type: list more...
- agent_probe_timeout (Alias name: agent-probe-timeout) Time to wait before a probe packet is considered lost when detect-mode is agent (5000 - 3600*1000 msec, default = 60000). type: int more...
- remote_probe_timeout (Alias name: remote-probe-timeout) Time to wait before a probe packet is considered lost when detect-mode is remote (20 - 3600*1000 msec, default = 5000). type: int more...
- bandwidth_weight (Alias name: bandwidth-weight) Coefficient of reciprocal of available bidirectional bandwidth in the formula of custom-profile-1. type: int more...
- jitter_weight (Alias name: jitter-weight) Coefficient of jitter in the formula of custom-profile-1. type: int more...
- latency_weight (Alias name: latency-weight) Coefficient of latency in the formula of custom-profile-1. type: int more...
- packet_loss_weight (Alias name: packet-loss-weight) Coefficient of packet-loss in the formula of custom-profile-1. type: int more...
- update_bgp_route (Alias name: update-bgp-route) Enable/disable updating the bgp route. type: str choices: [disable, enable] more...
Notes
Note
Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
To create or update an object, use state: present directive.
To delete an object, use state: absent directive
Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples
- name: Example playbook (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
gather_facts: false
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: SD-WAN status checking or health checking.
fortinet.fmgdevice.fmgd_system_sdwan_healthcheck:
# bypass_validation: false
# workspace_locking_adom: <global or your adom name>
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device: <your own value>
vdom: <your own value>
state: present # <value in [present, absent]>
system_sdwan_healthcheck:
name: "your value" # Required variable, string
# addr_mode: <value in [ipv4, ipv6]>
# class_id: <list or string>
# detect_mode: <value in [active, passive, prefer-passive, ...]>
# diffservcode: <string>
# dns_match_ip: <string>
# dns_request_domain: <string>
# embed_measured_health: <value in [disable, enable]>
# failtime: <integer>
# ftp_file: <string>
# ftp_mode: <value in [passive, port]>
# ha_priority: <integer>
# http_agent: <string>
# http_get: <string>
# http_match: <string>
# interval: <integer>
# members: <list or string>
# mos_codec: <value in [g711, g722, g729]>
# packet_size: <integer>
# password: <list or string>
# port: <integer>
# probe_count: <integer>
# probe_packets: <value in [disable, enable]>
# probe_timeout: <integer>
# protocol: <value in [ping, tcp-echo, udp-echo, ...]>
# quality_measured_method: <value in [half-close, half-open]>
# recoverytime: <integer>
# security_mode: <value in [none, authentication]>
# server: <list or string>
# sla:
# - id: <integer>
# jitter_threshold: <integer>
# latency_threshold: <integer>
# link_cost_factor:
# - "latency"
# - "jitter"
# - "packet-loss"
# - "mos"
# - "remote"
# - "custom-profile-1"
# mos_threshold: <string>
# packetloss_threshold: <integer>
# priority_in_sla: <integer>
# priority_out_sla: <integer>
# custom_profile_threshold: <integer>
# sla_fail_log_period: <integer>
# sla_id_redistribute: <integer>
# sla_pass_log_period: <integer>
# source: <string>
# source6: <string>
# system_dns: <value in [disable, enable]>
# threshold_alert_jitter: <integer>
# threshold_alert_latency: <integer>
# threshold_alert_packetloss: <integer>
# threshold_warning_jitter: <integer>
# threshold_warning_latency: <integer>
# threshold_warning_packetloss: <integer>
# update_cascade_interface: <value in [disable, enable]>
# update_static_route: <value in [disable, enable]>
# user: <string>
# vrf: <integer>
# fortiguard: <value in [disable, enable]>
# fortiguard_name: <list or string>
# agent_probe_timeout: <integer>
# remote_probe_timeout: <integer>
# bandwidth_weight: <integer>
# jitter_weight: <integer>
# latency_weight: <integer>
# packet_loss_weight: <integer>
# update_bgp_route: <value in [disable, enable]>
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:
- meta - The result of the request.returned: always type: dict
- request_url - The full url requested. returned: always type: str sample: /sys/login/user
- response_code - The status of api request. returned: always type: int sample: 0
- response_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
This module is not guaranteed to have a backwards compatible interface.