:source: fmgd_alertemail_setting.py
:orphan:
.. _fmgd_alertemail_setting:
fmgd_alertemail_setting -- Configure alert email settings.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
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
----------------------------------
.. raw:: html
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Parameters
----------
.. raw:: html
- 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
- 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
- alertemail_setting - Configure alert email settings. type: dict
- FDS_license_expiring_warning (Alias name: FDS-license-expiring-warning) Enable/disable fortiguard license expiration warnings in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- FDS_update_logs (Alias name: FDS-update-logs) Enable/disable fortiguard update logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- FIPS_CC_errors (Alias name: FIPS-CC-errors) Enable/disable fips and common criteria error logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- FSSO_disconnect_logs (Alias name: FSSO-disconnect-logs) Enable/disable logging of fsso collector agent disconnect. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- HA_logs (Alias name: HA-logs) Enable/disable ha logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- IPS_logs (Alias name: IPS-logs) Enable/disable ips logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- IPsec_errors_logs (Alias name: IPsec-errors-logs) Enable/disable ipsec error logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- PPP_errors_logs (Alias name: PPP-errors-logs) Enable/disable ppp error logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- admin_login_logs (Alias name: admin-login-logs) Enable/disable administrator login/logout logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- alert_interval (Alias name: alert-interval) Alert alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- amc_interface_bypass_mode (Alias name: amc-interface-bypass-mode) Enable/disable fortinet advanced mezzanine card (amc) interface bypass mode logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- antivirus_logs (Alias name: antivirus-logs) Enable/disable antivirus logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- configuration_changes_logs (Alias name: configuration-changes-logs) Enable/disable configuration change logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- critical_interval (Alias name: critical-interval) Critical alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- debug_interval (Alias name: debug-interval) Debug alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- email_interval (Alias name: email-interval) Interval between sending alert emails (1 - 99999 min, default = 5). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- emergency_interval (Alias name: emergency-interval) Emergency alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- error_interval (Alias name: error-interval) Error alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- filter_mode (Alias name: filter-mode) How to filter log messages that are sent to alert emails. type: str choices: [category, threshold]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- firewall_authentication_failure_logs (Alias name: firewall-authentication-failure-logs) Enable/disable firewall authentication failure logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- fortiguard_log_quota_warning (Alias name: fortiguard-log-quota-warning) Enable/disable forticloud log quota warnings in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- information_interval (Alias name: information-interval) Information alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- local_disk_usage (Alias name: local-disk-usage) Disk usage percentage at which to send alert email (1 - 99 percent, default = 75). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- log_disk_usage_warning (Alias name: log-disk-usage-warning) Enable/disable disk usage warnings in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- mailto1 Email address to send alert email to (usually a system administrator) (max. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- mailto2 Optional second email address to send alert email to (max. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- mailto3 Optional third email address to send alert email to (max. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- notification_interval (Alias name: notification-interval) Notification alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- severity Lowest severity level to log. type: str choices: [emergency, alert, critical, error, warning, notification, information, debug]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ssh_logs (Alias name: ssh-logs) Enable/disable ssh logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- sslvpn_authentication_errors_logs (Alias name: sslvpn-authentication-errors-logs) Enable/disable ssl-vpn authentication error logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- username Name that appears in the from: field of alert emails (max. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- violation_traffic_logs (Alias name: violation-traffic-logs) Enable/disable violation traffic logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- warning_interval (Alias name: warning-interval) Warning alert interval in minutes. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- webfilter_logs (Alias name: webfilter-logs) Enable/disable web filter logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- FDS_license_expiring_days (Alias name: FDS-license-expiring-days) Number of days to send alert email prior to fortiguard license expiration (1 - 100 days, default = 15). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- fpx_license_logs (Alias name: fpx-license-logs) Enable/disable fortiproxy license related logs in alert email. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10, v7.6.4 -> latest
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
--------
.. code-block:: yaml+jinja
- 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: Configure alert email settings.
fortinet.fmgdevice.fmgd_alertemail_setting:
# bypass_validation: false
# workspace_locking_adom:
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device:
vdom:
alertemail_setting:
# FDS_license_expiring_warning:
# FDS_update_logs:
# FIPS_CC_errors:
# FSSO_disconnect_logs:
# HA_logs:
# IPS_logs:
# IPsec_errors_logs:
# PPP_errors_logs:
# admin_login_logs:
# alert_interval:
# amc_interface_bypass_mode:
# antivirus_logs:
# configuration_changes_logs:
# critical_interval:
# debug_interval:
# email_interval:
# emergency_interval:
# error_interval:
# filter_mode:
# firewall_authentication_failure_logs:
# fortiguard_log_quota_warning:
# information_interval:
# local_disk_usage:
# log_disk_usage_warning:
# mailto1:
# mailto2:
# mailto3:
# notification_interval:
# severity:
# ssh_logs:
# sslvpn_authentication_errors_logs:
# username:
# violation_traffic_logs:
# warning_interval:
# webfilter_logs:
# FDS_license_expiring_days:
# fpx_license_logs:
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
- 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.
Authors
-------
- Xinwei Du (@dux-fortinet)
- Xing Li (@lix-fortinet)
- Jie Xue (@JieX19)
- Link Zheng (@chillancezen)
- Frank Shen (@fshen01)
- Hongbin Lu (@fgtdev-hblu)