:source: fortios_alertemail_setting.py
:orphan:
.. fortios_alertemail_setting:
fortios_alertemail_setting -- Configure alert email settings in Fortinet's FortiOS and FortiGate.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify alertemail feature and setting category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.15
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v6.0.0 -> v7.6.6
Parameters
----------
.. raw:: html
- access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: false
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
- member_path - Member attribute path to operate on. type: str
- member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
- alertemail_setting - Configure alert email settings. type: dict
more...
| Supported Version Ranges |
| alertemail_setting |
v6.0.0 -> 7.6.6 |
- admin_login_logs - Enable/disable administrator login/logout logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| admin_login_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- alert_interval - Alert alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| alert_interval |
v6.0.0 -> 7.6.6 |
- amc_interface_bypass_mode - Enable/disable Fortinet Advanced Mezzanine Card (AMC) interface bypass mode logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| amc_interface_bypass_mode |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- antivirus_logs - Enable/disable antivirus logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| antivirus_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- configuration_changes_logs - Enable/disable configuration change logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| configuration_changes_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- critical_interval - Critical alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| critical_interval |
v6.0.0 -> 7.6.6 |
- debug_interval - Debug alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| debug_interval |
v6.0.0 -> 7.6.6 |
- email_interval - Interval between sending alert emails (1 - 99999 min). type: int
more...
|
Supported Version Ranges |
| email_interval |
v6.0.0 -> 7.6.6 |
- emergency_interval - Emergency alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| emergency_interval |
v6.0.0 -> 7.6.6 |
- error_interval - Error alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| error_interval |
v6.0.0 -> 7.6.6 |
- FDS_license_expiring_days - Number of days to send alert email prior to FortiGuard license expiration (1 - 100 days). type: int
more...
|
Supported Version Ranges |
| FDS_license_expiring_days |
v6.0.0 -> v7.2.4 |
- FDS_license_expiring_warning - Enable/disable FortiGuard license expiration warnings in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| FDS_license_expiring_warning |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- FDS_update_logs - Enable/disable FortiGuard update logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| FDS_update_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- filter_mode - How to filter log messages that are sent to alert emails. type: str choices: category, threshold
more...
|
Supported Version Ranges |
| filter_mode |
v6.0.0 -> 7.6.6 |
| [category] |
v6.0.0 -> 7.6.6 |
| [threshold] |
v6.0.0 -> 7.6.6 |
- FIPS_CC_errors - Enable/disable FIPS and Common Criteria error logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| FIPS_CC_errors |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- firewall_authentication_failure_logs - Enable/disable firewall authentication failure logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| firewall_authentication_failure_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- fortiguard_log_quota_warning - Enable/disable FortiCloud log quota warnings in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| fortiguard_log_quota_warning |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- FSSO_disconnect_logs - Enable/disable logging of FSSO collector agent disconnect. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| FSSO_disconnect_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- HA_logs - Enable/disable HA logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| HA_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- information_interval - Information alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| information_interval |
v6.0.0 -> 7.6.6 |
- IPS_logs - Enable/disable IPS logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| IPS_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- IPsec_errors_logs - Enable/disable IPsec error logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| IPsec_errors_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- local_disk_usage - Disk usage percentage at which to send alert email (1 - 99 percent). type: int
more...
|
Supported Version Ranges |
| local_disk_usage |
v6.0.0 -> 7.6.6 |
- log_disk_usage_warning - Enable/disable disk usage warnings in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| log_disk_usage_warning |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- mailto1 - Email address to send alert email to (usually a system administrator) (max. 63 characters). type: str
more...
|
Supported Version Ranges |
| mailto1 |
v6.0.0 -> 7.6.6 |
- mailto2 - Optional second email address to send alert email to (max. 63 characters). type: str
more...
|
Supported Version Ranges |
| mailto2 |
v6.0.0 -> 7.6.6 |
- mailto3 - Optional third email address to send alert email to (max. 63 characters). type: str
more...
|
Supported Version Ranges |
| mailto3 |
v6.0.0 -> 7.6.6 |
- notification_interval - Notification alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| notification_interval |
v6.0.0 -> 7.6.6 |
- PPP_errors_logs - Enable/disable PPP error logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| PPP_errors_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- severity - Lowest severity level to log. type: str choices: emergency, alert, critical, error, warning, notification, information, debug
more...
|
Supported Version Ranges |
| severity |
v6.0.0 -> 7.6.6 |
| [emergency] |
v6.0.0 -> 7.6.6 |
| [alert] |
v6.0.0 -> 7.6.6 |
| [critical] |
v6.0.0 -> 7.6.6 |
| [error] |
v6.0.0 -> 7.6.6 |
| [warning] |
v6.0.0 -> 7.6.6 |
| [notification] |
v6.0.0 -> 7.6.6 |
| [information] |
v6.0.0 -> 7.6.6 |
| [debug] |
v6.0.0 -> 7.6.6 |
- ssh_logs - Enable/disable SSH logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| ssh_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- sslvpn_authentication_errors_logs - Enable/disable Agentless VPN authentication error logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| sslvpn_authentication_errors_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- username - Name that appears in the From: field of alert emails (max. 63 characters). type: str
more...
|
Supported Version Ranges |
| username |
v6.0.0 -> 7.6.6 |
- violation_traffic_logs - Enable/disable violation traffic logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| violation_traffic_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- warning_interval - Warning alert interval in minutes. type: int
more...
|
Supported Version Ranges |
| warning_interval |
v6.0.0 -> 7.6.6 |
- webfilter_logs - Enable/disable web filter logs in alert email. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| webfilter_logs |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- name: Configure alert email settings.
fortinet.fortios.fortios_alertemail_setting:
vdom: "{{ vdom }}"
alertemail_setting:
admin_login_logs: "enable"
alert_interval: "2"
amc_interface_bypass_mode: "enable"
antivirus_logs: "enable"
configuration_changes_logs: "enable"
critical_interval: "3"
debug_interval: "60"
email_interval: "5"
emergency_interval: "1"
error_interval: "5"
FDS_license_expiring_days: "15"
FDS_license_expiring_warning: "enable"
FDS_update_logs: "enable"
filter_mode: "category"
FIPS_CC_errors: "enable"
firewall_authentication_failure_logs: "enable"
fortiguard_log_quota_warning: "enable"
FSSO_disconnect_logs: "enable"
HA_logs: "enable"
information_interval: "30"
IPS_logs: "enable"
IPsec_errors_logs: "enable"
local_disk_usage: "75"
log_disk_usage_warning: "enable"
mailto1: ""
mailto2: ""
mailto3: ""
notification_interval: "20"
PPP_errors_logs: "enable"
severity: "emergency"
ssh_logs: "enable"
sslvpn_authentication_errors_logs: "enable"
username: ""
violation_traffic_logs: "enable"
warning_interval: "10"
webfilter_logs: "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:
.. raw:: html
- build - Build number of the fortigate image returned: always type: str sample: 1547
- http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
- http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
- mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
- name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
- path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
- revision - Internal revision number returned: always type: str sample: 17.0.2.10658
- serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
- status - Indication of the operation's result returned: always type: str sample: success
- vdom - Virtual domain used returned: always type: str sample: root
- version - Version of the FortiGate returned: always type: str sample: v5.6.3
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Hongbin Lu (@fgtdev-hblu)
- Frank Shen (@frankshen01)
- Miguel Angel Munoz (@mamunozgonzalez)
- Nicolas Thomas (@thomnico)
.. hint::
If you notice any issues in this documentation, you can create a pull request to improve it.