fortios_alertemail_setting – Configure alert email settings in Fortinet’s FortiOS and FortiGate.
Added in version 2.0.0.
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.0
Parameters
- 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...
- admin_login_logs - Enable/disable administrator login/logout logs in alert email. type: str choices: enable, disable more...
- alert_interval - Alert alert interval in minutes. type: int more...
- amc_interface_bypass_mode - Enable/disable Fortinet Advanced Mezzanine Card (AMC) interface bypass mode logs in alert email. type: str choices: enable, disable more...
- antivirus_logs - Enable/disable antivirus logs in alert email. type: str choices: enable, disable more...
- configuration_changes_logs - Enable/disable configuration change logs in alert email. type: str choices: enable, disable more...
- critical_interval - Critical alert interval in minutes. type: int more...
- debug_interval - Debug alert interval in minutes. type: int more...
- email_interval - Interval between sending alert emails (1 - 99999 min). type: int more...
- emergency_interval - Emergency alert interval in minutes. type: int more...
- error_interval - Error alert interval in minutes. type: int more...
- FDS_license_expiring_days - Number of days to send alert email prior to FortiGuard license expiration (1 - 100 days). type: int more...
- FDS_license_expiring_warning - Enable/disable FortiGuard license expiration warnings in alert email. type: str choices: enable, disable more...
- FDS_update_logs - Enable/disable FortiGuard update logs in alert email. type: str choices: enable, disable more...
- filter_mode - How to filter log messages that are sent to alert emails. type: str choices: category, threshold more...
- FIPS_CC_errors - Enable/disable FIPS and Common Criteria error logs in alert email. type: str choices: enable, disable more...
- firewall_authentication_failure_logs - Enable/disable firewall authentication failure logs in alert email. type: str choices: enable, disable more...
- fortiguard_log_quota_warning - Enable/disable FortiCloud log quota warnings in alert email. type: str choices: enable, disable more...
- FSSO_disconnect_logs - Enable/disable logging of FSSO collector agent disconnect. type: str choices: enable, disable more...
- HA_logs - Enable/disable HA logs in alert email. type: str choices: enable, disable more...
- information_interval - Information alert interval in minutes. type: int more...
- IPS_logs - Enable/disable IPS logs in alert email. type: str choices: enable, disable more...
- IPsec_errors_logs - Enable/disable IPsec error logs in alert email. type: str choices: enable, disable more...
- local_disk_usage - Disk usage percentage at which to send alert email (1 - 99 percent). type: int more...
- log_disk_usage_warning - Enable/disable disk usage warnings in alert email. type: str choices: enable, disable more...
- mailto1 - Email address to send alert email to (usually a system administrator) (max. 63 characters). type: str more...
- mailto2 - Optional second email address to send alert email to (max. 63 characters). type: str more...
- mailto3 - Optional third email address to send alert email to (max. 63 characters). type: str more...
- notification_interval - Notification alert interval in minutes. type: int more...
- PPP_errors_logs - Enable/disable PPP error logs in alert email. type: str choices: enable, disable more...
- severity - Lowest severity level to log. type: str choices: emergency, alert, critical, error, warning, notification, information, debug more...
- ssh_logs - Enable/disable SSH logs in alert email. type: str choices: enable, disable more...
- sslvpn_authentication_errors_logs - Enable/disable SSL-VPN authentication error logs in alert email. type: str choices: enable, disable more...
- username - Name that appears in the From: field of alert emails (max. 63 characters). type: str more...
- violation_traffic_logs - Enable/disable violation traffic logs in alert email. type: str choices: enable, disable more...
- warning_interval - Warning alert interval in minutes. type: int more...
- webfilter_logs - Enable/disable web filter logs in alert email. type: str choices: enable, disable more...
Notes
Note
Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
Examples
- 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: "<your_own_value>"
mailto2: "<your_own_value>"
mailto3: "<your_own_value>"
notification_interval: "20"
PPP_errors_logs: "enable"
severity: "emergency"
ssh_logs: "enable"
sslvpn_authentication_errors_logs: "enable"
username: "<your_own_value>"
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:
- 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.