fortinet.fortios.fortios_monitor_fact – Retrieve Facts of FortiOS Monitor Objects.

Note

This plugin is part of the fortinet.fortios collection (version 2.1.2).

To install it use: ansible-galaxy collection install fortinet.fortios.

To use it in a playbook, specify: fortinet.fortios.fortios_monitor_fact.

New in version 2.10: of fortinet.fortios

Synopsis

  • Collects monitor facts from network devices running the fortios operating system. This facts module will only collect those facts which user specified in playbook.

Requirements

The below requirements are needed on the host that executes this module.

  • install galaxy collection fortinet.fortios >= 2.0.0.

Parameters

Parameter Choices/Defaults Comments
access_token
string
Token-based authentication. Generated from GUI of Fortigate.
enable_log
boolean
    Choices:
  • no ←
  • yes
Enable/Disable logging for task.
filters
list / elements=string
A list of expressions to filter the returned results.
The items of the list are combined as LOGICAL AND with operator ampersand.
One item itself could be concatenated with a comma as LOGICAL OR.
formatters
list / elements=string
A list of fields to display for returned results.
params
dictionary
the parameter for each selector, see definition in above list.
selector
string / required
    Choices:
  • firewall_acl6
  • firewall_ippool
  • webfilter_malicious-urls
  • fortiguard_redirect-portal
  • firewall_policy-lookup
  • system_acquired-dns
  • wifi_interfering_ap
  • system_botnet-domains
  • firewall_address-dynamic
  • vpn_ocvpn_status
  • wifi_vlan-probe
  • system_sandbox_status
  • system_running-processes
  • system_storage
  • router_ipv4
  • log_historic-daily-remote-logs
  • webfilter_malicious-urls_stat
  • ips_anomaly
  • wanopt_peer_stats
  • wifi_network_status
  • log_hourly-disk-usage
  • wifi_region-image
  • system_object_usage
  • wifi_euclid
  • system_current-admins
  • system_sandbox_test-connect
  • system_interface_speed-test-status
  • user_info_query
  • wifi_rogue_ap
  • system_config-revision_info
  • utm_antivirus_stats
  • system_3g-modem
  • endpoint-control_installer_download
  • network_arp
  • firewall_address-fqdns
  • wifi_firmware
  • user_fsso
  • system_interface
  • endpoint-control_installer
  • utm_app-lookup
  • system_firmware
  • system_interface_dhcp-status
  • wifi_client
  • system_botnet-domains_stat
  • firewall_address6-dynamic
  • system_external-resource_entry-list
  • webfilter_fortiguard-categories
  • log_local-report-list
  • firewall_internet-service-match
  • router_policy6
  • virtual-wan_sla-log
  • system_security-rating
  • switch-controller_managed-switch_dhcp-snooping
  • system_time
  • system_fortimanager_backup-details
  • firewall_shaper
  • system_available-interfaces
  • system_fortimanager_status
  • system_sensor-info
  • system_status
  • nsx_instance
  • web-ui_custom-language_download
  • wanopt_history
  • log_forticloud
  • system_vdom-link
  • utm_blacklisted-certificates
  • webcache_stats
  • system_config-revision_file
  • user_device
  • system_dhcp
  • router_lookup
  • utm_blacklisted-certificates_statistics
  • log_device_state
  • vpn_one-click_status
  • system_sniffer
  • system_firmware_upgrade-paths
  • router_ospf_neighbors
  • system_sandbox_stats
  • wanopt_webcache
  • network_lldp_neighbors
  • log_local-report_download
  • system_config-error-log_download
  • firewall_load-balance
  • vpn_ocvpn_meta
  • system_sandbox_cloud-regions
  • firewall_address-fqdns6
  • firewall_acl
  • system_link-monitor
  • system_com-log_download
  • user_device_query
  • fortiguard_service-communication-stats
  • fortiview_sandbox-file-details
  • system_available-certificates
  • registration_forticloud_domains
  • switch-controller_fsw-firmware
  • system_ha-table-checksums
  • fortiview_statistics
  • router_ipv6
  • endpoint-control_registration_summary
  • firewall_gtp-runtime-statistics
  • firewall_uuid-list
  • router_statistics
  • system_config_usb-filelist
  • endpoint-control_ems_cert-status
  • system_config-script
  • user_banned
  • system_sdn-connector_nsx-security-tags
  • system_object-tagging_usage
  • system_com-log_update
  • system_global-resources
  • system_ipconf
  • switch-controller_mclag-icl_eligible-peer
  • user_fortitoken-cloud_status
  • firewall_per-ip-shaper
  • wifi_network_list
  • ips_exceed-scan-range
  • log_current-disk-usage
  • license_status
  • firewall_session
  • firewall_ippool_mapping
  • virtual-wan_members
  • switch-controller_managed-switch_faceplate-xml
  • firewall_security-policy
  • endpoint-control_record-list
  • videofilter_fortiguard-categories
  • webfilter_category-quota
  • log_forticloud-report-list
  • log_policy-archive_download
  • system_ha-checksums
  • system_debug_download
  • system_automation-action_stats
  • log_fortianalyzer-queue
  • network_ddns_servers
  • system_nat46-ippools
  • system_vdom-resource
  • system_modem
  • firewall_proxy-policy
  • nsx_service_status
  • azure_application-list
  • log_forticloud-report_download
  • user_info_thumbnail
  • system_sdn-connector_status
  • vpn_ipsec
  • endpoint-control_ems_status-summary
  • firewall_multicast-policy
  • switch-controller_validate-switch-prefix
  • system_security-rating_history
  • endpoint-control_summary
  • system_csf
  • license_forticare-resellers
  • endpoint-control_profile_xml
  • wifi_ap_status
  • user_device-category
  • system_ntp_status
  • firewall_gtp-statistics
  • utm_application-categories
  • router_lookup-policy
  • system_ha-history
  • license_forticare-org-list
  • system_security-rating_lang
  • router_bgp_paths6
  • vpn_one-click_members
  • switch-controller_managed-switch_health
  • system_timezone
  • firewall_sdn-connector-filters
  • webfilter_trusted-urls
  • system_usb-log
  • network_lldp_ports
  • system_fortiguard-blacklist
  • firewall_policy
  • system_ha-statistics
  • switch-controller_matched-devices
  • network_dns_latency
  • system_fortimanager_backup-summary
  • system_sniffer_download
  • user_detected-device
  • system_botnet_stat
  • system_vm-information
  • system_security-rating_supported-reports
  • user_fortitoken
  • system_botnet
  • vpn_ssl_stats
  • switch-controller_managed-switch_transceivers
  • webfilter_override
  • log_stats
  • system_csf_pending-authorizations
  • system_resolve-fqdn
  • log_fortianalyzer
  • log_ips-archive_download
  • system_interface-connected-admins-info
  • system_config-revision
  • router_bgp_neighbors
  • user_collected-email
  • ips_rate-based
  • switch-controller_detected-device
  • webproxy_pacfile_download
  • registration_forticloud_device-status
  • firewall_policy6
  • endpoint-control_ems_status
  • router_policy
  • system_sandbox_connection
  • user_firewall
  • firewall_multicast-policy6
  • user_device-type
  • switch-controller_managed-switch_cable-status
  • system_automation-stitch_stats
  • system_traffic-history_interface
  • network_ddns_lookup
  • wifi_managed_ap
  • system_interface_transceivers
  • system_config_backup
  • system_traffic-history_top-applications
  • firewall_uuid-type-lookup
  • virtual-wan_interface-log
  • network_reverse-ip-lookup
  • firewall_health
  • router_bgp_neighbors6
  • system_security-rating_status
  • registration_forticloud_disclaimer
  • system_botnet-domains_hits
  • firewall_internet-service-details
  • log_event
  • system_config-sync_status
  • network_fortiguard_live-services-latency
  • fortiview_sandbox-file-list
  • system_fortiguard_server-info
  • vpn_ssl
  • system_check-port-availability
  • log_av-archive_download
  • license_fortianalyzer-status
  • virtual-wan_health-check
  • router_bgp_paths
  • endpoint-control_avatar_download
  • system_resource_usage
  • system_certificate_download
  • system_ha-peer
  • system_interface_poe
  • ips_metadata
  • extender-controller_extender
  • firewall_local-in
  • wifi_spectrum
  • firewall_consolidated-policy
  • switch-controller_managed-switch
  • system_trusted-cert-authorities
  • vpn_ocvpn_members
selector of the retrieved fortimanager facts
sorters
list / elements=string
A list of expressions to sort the returned results.
The items of the list are in ascending order with operator ampersand.
One item itself could be in decending order with a comma inside.
vdom
string
Default:
"root"
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.

Notes

Note

  • Different selector may have different parameters, users are expected to look up them for a specific selector.

  • For some selectors, the objects are global, no params are allowed to appear.

  • Not all parameters are required for a slector.

  • This module is exclusivly for FortiOS monitor API.

  • The result of API request is stored in results.

Examples

- hosts: fortigate03
  connection: httpapi
  collections:
  - fortinet.fortios
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:

  - fortios_monitor_fact:
       vdom: ""
       formatters:
            - model_name
       filters:
            - model_name==FortiGat
       selector: 'system_status'

  - name: fact gathering
    fortios_monitor_fact:
       vdom: ""
       access_token: ""
       selector: 'firewall_acl'

  - name: fact gathering
    fortios_monitor_fact:
       vdom: ""
       access_token: ""
       selector: 'firewall_security-policy'
       params:
           policyid: '1'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
build
string
always
Build number of the fortigate image

Sample:
1547
http_method
string
always
Last method used to provision the content into FortiGate

Sample:
GET
name
string
always
Name of the table used to fulfill the request

Sample:
firmware
path
string
always
Path of the table used to fulfill the request

Sample:
system
revision
string
always
Internal revision number

Sample:
17.0.2.10658
serial
string
always
Serial number of the unit

Sample:
FGVMEVYYQT3AB5352
status
string
always
Indication of the operation's result

Sample:
success
vdom
string
always
Virtual domain used

Sample:
root
version
string
always
Version of the FortiGate

Sample:
v5.6.3


Authors

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@fshen01)