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

Note

This module is part of the fortinet.fortios collection (version 2.1.6).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

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.0.0: 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

Comments

access_token

string

Token-based authentication. Generated from GUI of Fortigate.

enable_log

boolean

Enable/Disable logging for task.

Choices:

  • no ← (default)

  • yes

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

selector of the retrieved fortiOS facts.

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

  • firewall_central-snat-map

  • wifi_rogue_ap

  • system_config-revision_info

  • ips_hold-signatures

  • utm_antivirus_stats

  • system_3g-modem

  • endpoint-control_installer_download

  • network_arp

  • firewall_address-fqdns

  • wifi_firmware

  • user_fsso

  • switch-controller_managed-switch_port-stats

  • endpoint-control_installer

  • utm_app-lookup

  • system_firmware

  • system_interface_dhcp-status

  • user_banned_check

  • system_botnet-domains_stat

  • wifi_matched-devices

  • system_external-resource_entry-list

  • webfilter_fortiguard-categories

  • system_fortimanager_backup-details

  • firewall_internet-service-match

  • router_policy6

  • virtual-wan_sla-log

  • system_security-rating

  • switch-controller_managed-switch_dhcp-snooping

  • system_time

  • log_local-report-list

  • vpn-certificate_cert-name-available

  • firewall_shaper

  • system_available-interfaces

  • system_fortimanager_status

  • system_sensor-info

  • system_status

  • firewall_gtp

  • 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

  • system_ipam_status

  • 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_proxy_sessions

  • firewall_acl

  • system_link-monitor

  • system_com-log_download

  • user_device_query

  • fortiguard_service-communication-stats

  • switch-controller_managed-switch_status

  • 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

  • firewall_internet-service-details

  • firewall_internet-service-reputation

  • 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

  • wifi_client

  • endpoint-control_record-list

  • videofilter_fortiguard-categories

  • webfilter_category-quota

  • log_forticloud-report-list

  • log_policy-archive_download

  • wifi_ap-names

  • 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_dnat

  • firewall_multicast-policy

  • switch-controller_validate-switch-prefix

  • system_security-rating_history

  • system_lte-modem_status

  • fortiview_sandbox-file-details

  • endpoint-control_summary

  • system_csf

  • license_forticare-resellers

  • switch-controller_managed-switch_models

  • endpoint-control_profile_xml

  • wifi_ap_status

  • user_device-category

  • system_ntp_status

  • firewall_gtp-statistics

  • utm_application-categories

  • router_lookup-policy

  • system_performance_status

  • system_ha-history

  • license_forticare-org-list

  • system_security-rating_lang

  • system_global-search

  • router_bgp_paths6

  • vpn_one-click_members

  • system_interface_kernel-interfaces

  • switch-controller_managed-switch_health

  • system_timezone

  • firewall_sdn-connector-filters

  • router_bgp_paths-statistics

  • webfilter_trusted-urls

  • system_usb-log

  • network_lldp_ports

  • system_fortiguard-blacklist

  • firewall_policy

  • system_ha-statistics

  • switch-controller_matched-devices

  • system_crash-log_download

  • network_dns_latency

  • system_fortimanager_backup-summary

  • firewall_shaper_multi-class-shaper

  • system_sniffer_download

  • user_detected-device

  • system_botnet_stat

  • system_vm-information

  • system_security-rating_supported-reports

  • user_fortitoken

  • system_botnet

  • user_info_thumbnail-file

  • vpn_ssl_stats

  • system_ha-checksums

  • webfilter_override

  • log_stats

  • system_csf_pending-authorizations

  • system_resolve-fqdn

  • log_fortianalyzer

  • log_ips-archive_download

  • wifi_meta

  • 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

  • system_acme-certificate-status

  • router_policy

  • switch-controller_managed-switch_transceivers

  • fortiview_proxy-statistics

  • 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_traffic-history_top-applications

  • firewall_uuid-type-lookup

  • virtual-wan_interface-log

  • network_reverse-ip-lookup

  • firewall_health

  • router_bgp_neighbors6

  • wifi_unassociated-devices

  • system_security-rating_status

  • registration_forticloud_disclaimer

  • wifi_ap_channels

  • system_botnet-domains_hits

  • system_ipam_list

  • 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

  • firewall_address6-dynamic

  • system_config_restore-status

  • router_bgp_paths

  • endpoint-control_avatar_download

  • system_resource_usage

  • system_certificate_download

  • system_ha-peer

  • system_sandbox_connection

  • log_forticloud_connection

  • system_interface_poe

  • ips_metadata

  • system_interface

  • extender-controller_extender

  • firewall_local-in

  • wifi_spectrum

  • firewall_consolidated-policy

  • switch-controller_managed-switch

  • system_trusted-cert-authorities

  • vpn_ocvpn_members

selectors

list / elements=dictionary

A list of selectors for retrieving the fortiOS facts.

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

selector of the retrieved fortiOS facts

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

  • firewall_central-snat-map

  • wifi_rogue_ap

  • system_config-revision_info

  • ips_hold-signatures

  • utm_antivirus_stats

  • system_3g-modem

  • endpoint-control_installer_download

  • network_arp

  • firewall_address-fqdns

  • wifi_firmware

  • user_fsso

  • switch-controller_managed-switch_port-stats

  • endpoint-control_installer

  • utm_app-lookup

  • system_firmware

  • system_interface_dhcp-status

  • user_banned_check

  • system_botnet-domains_stat

  • wifi_matched-devices

  • system_external-resource_entry-list

  • webfilter_fortiguard-categories

  • system_fortimanager_backup-details

  • firewall_internet-service-match

  • router_policy6

  • virtual-wan_sla-log

  • system_security-rating

  • switch-controller_managed-switch_dhcp-snooping

  • system_time

  • log_local-report-list

  • vpn-certificate_cert-name-available

  • firewall_shaper

  • system_available-interfaces

  • system_fortimanager_status

  • system_sensor-info

  • system_status

  • firewall_gtp

  • 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

  • system_ipam_status

  • 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_proxy_sessions

  • firewall_acl

  • system_link-monitor

  • system_com-log_download

  • user_device_query

  • fortiguard_service-communication-stats

  • switch-controller_managed-switch_status

  • 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

  • firewall_internet-service-details

  • firewall_internet-service-reputation

  • 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

  • wifi_client

  • endpoint-control_record-list

  • videofilter_fortiguard-categories

  • webfilter_category-quota

  • log_forticloud-report-list

  • log_policy-archive_download

  • wifi_ap-names

  • 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_dnat

  • firewall_multicast-policy

  • switch-controller_validate-switch-prefix

  • system_security-rating_history

  • system_lte-modem_status

  • fortiview_sandbox-file-details

  • endpoint-control_summary

  • system_csf

  • license_forticare-resellers

  • switch-controller_managed-switch_models

  • endpoint-control_profile_xml

  • wifi_ap_status

  • user_device-category

  • system_ntp_status

  • firewall_gtp-statistics

  • utm_application-categories

  • router_lookup-policy

  • system_performance_status

  • system_ha-history

  • license_forticare-org-list

  • system_security-rating_lang

  • system_global-search

  • router_bgp_paths6

  • vpn_one-click_members

  • system_interface_kernel-interfaces

  • switch-controller_managed-switch_health

  • system_timezone

  • firewall_sdn-connector-filters

  • router_bgp_paths-statistics

  • webfilter_trusted-urls

  • system_usb-log

  • network_lldp_ports

  • system_fortiguard-blacklist

  • firewall_policy

  • system_ha-statistics

  • switch-controller_matched-devices

  • system_crash-log_download

  • network_dns_latency

  • system_fortimanager_backup-summary

  • firewall_shaper_multi-class-shaper

  • system_sniffer_download

  • user_detected-device

  • system_botnet_stat

  • system_vm-information

  • system_security-rating_supported-reports

  • user_fortitoken

  • system_botnet

  • user_info_thumbnail-file

  • vpn_ssl_stats

  • system_ha-checksums

  • webfilter_override

  • log_stats

  • system_csf_pending-authorizations

  • system_resolve-fqdn

  • log_fortianalyzer

  • log_ips-archive_download

  • wifi_meta

  • 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

  • system_acme-certificate-status

  • router_policy

  • switch-controller_managed-switch_transceivers

  • fortiview_proxy-statistics

  • 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_traffic-history_top-applications

  • firewall_uuid-type-lookup

  • virtual-wan_interface-log

  • network_reverse-ip-lookup

  • firewall_health

  • router_bgp_neighbors6

  • wifi_unassociated-devices

  • system_security-rating_status

  • registration_forticloud_disclaimer

  • wifi_ap_channels

  • system_botnet-domains_hits

  • system_ipam_list

  • 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

  • firewall_address6-dynamic

  • system_config_restore-status

  • router_bgp_paths

  • endpoint-control_avatar_download

  • system_resource_usage

  • system_certificate_download

  • system_ha-peer

  • system_sandbox_connection

  • log_forticloud_connection

  • system_interface_poe

  • ips_metadata

  • system_interface

  • extender-controller_extender

  • firewall_local-in

  • wifi_spectrum

  • firewall_consolidated-policy

  • switch-controller_managed-switch

  • system_trusted-cert-authorities

  • vpn_ocvpn_members

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.

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

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.

Default: “root”

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:

  - name: Get license shizzle
    fortios_monitor_fact:
      vdom: ""
      selectors:
        - selector: license_status
        - selector: system_status
        - selector: firewall_security-policy
          params:
            policyid: '1'

  - 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'

Return Values

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

Key

Description

build

string

Build number of the fortigate image

Returned: always

Sample: “1547”

http_method

string

Last method used to provision the content into FortiGate

Returned: always

Sample: “GET”

name

string

Name of the table used to fulfill the request

Returned: always

Sample: “firmware”

path

string

Path of the table used to fulfill the request

Returned: always

Sample: “system”

revision

string

Internal revision number

Returned: always

Sample: “17.0.2.10658”

serial

string

Serial number of the unit

Returned: always

Sample: “FGVMEVYYQT3AB5352”

status

string

Indication of the operation’s result

Returned: always

Sample: “success”

vdom

string

Virtual domain used

Returned: always

Sample: “root”

version

string

Version of the FortiGate

Returned: always

Sample: “v5.6.3”

Authors

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@fshen01)