lix_fortinet.fortios.fortios_monitor_fact (102.2.120) — module

Retrieve Facts of FortiOS Monitor Objects.

| "added in version" 2.0.0 of lix_fortinet.fortios"

Authors: Jie Xue (@JieX19), Link Zheng (@chillancezen), Hongbin Lu (@fgtdev-hblu), Frank Shen (@fshen01)

preview | supported by community

Install collection

Install with ansible-galaxy collection install lix_fortinet.fortios:==102.2.120


Add to requirements.yml

  collections:
    - name: lix_fortinet.fortios
      version: 102.2.120

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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'

Inputs

    
vdom:
    default: root
    description:
    - 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.
    required: false
    type: str

params:
    description:
    - the parameter for each selector, see definition in above list.
    required: false
    type: dict

filters:
    description:
    - 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.
    elements: str
    required: false
    type: list

sorters:
    description:
    - 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.
    elements: str
    required: false
    type: list

selector:
    choices:
    - endpoint-control_profile_xml
    - endpoint-control_record-list
    - endpoint-control_registration_summary
    - endpoint-control_installer
    - endpoint-control_installer_download
    - endpoint-control_avatar_download
    - firewall_health
    - firewall_local-in
    - firewall_acl
    - firewall_acl6
    - firewall_internet-service-match
    - firewall_internet-service-details
    - firewall_policy
    - firewall_policy6
    - firewall_proxy-policy
    - firewall_policy-lookup
    - firewall_session
    - firewall_shaper
    - firewall_per-ip-shaper
    - firewall_load-balance
    - firewall_address-fqdns
    - firewall_address-fqdns6
    - firewall_ippool
    - firewall_address-dynamic
    - firewall_address6-dynamic
    - fortiview_statistics
    - fortiview_sandbox-file-details
    - geoip_geoip-query
    - ips_rate-based
    - license_status
    - license_forticare-resellers
    - license_forticare-org-list
    - log_current-disk-usage
    - log_device_state
    - log_forticloud
    - log_fortianalyzer
    - log_fortianalyzer-queue
    - log_hourly-disk-usage
    - log_historic-daily-remote-logs
    - log_stats
    - log_forticloud-report_download
    - log_ips-archive_download
    - log_policy-archive_download
    - log_av-archive_download
    - log_event
    - registration_forticloud_disclaimer
    - registration_forticloud_domains
    - router_ipv4
    - router_ipv6
    - router_statistics
    - router_lookup
    - router_policy
    - router_policy6
    - system_config-revision
    - system_config-revision_file
    - system_config-revision_info
    - system_current-admins
    - system_time
    - system_global-resources
    - system_vdom-resource
    - system_dhcp
    - system_firmware
    - system_firmware_upgrade-paths
    - system_storage
    - system_csf
    - system_csf_pending-authorizations
    - system_modem
    - system_3g-modem
    - system_resource_usage
    - system_sniffer
    - system_sniffer_download
    - system_automation-stitch_stats
    - switch-controller_managed-switch
    - switch-controller_managed-switch_faceplate-xml
    - switch-controller_managed-switch_dhcp-snooping
    - switch-controller_fsw-firmware
    - switch-controller_detected-device
    - switch-controller_validate-switch-prefix
    - system_interface
    - system_interface_dhcp-status
    - system_available-interfaces
    - system_acquired-dns
    - system_resolve-fqdn
    - system_nat46-ippools
    - system_usb-log
    - system_ipconf
    - system_fortiguard_server-info
    - system_fortimanager_status
    - system_fortimanager_backup-summary
    - system_fortimanager_backup-details
    - system_available-certificates
    - system_certificate_download
    - system_debug_download
    - system_com-log_update
    - system_com-log_download
    - system_botnet_stat
    - system_botnet
    - system_botnet-domains
    - system_botnet-domains_stat
    - system_botnet-domains_hits
    - system_ha-statistics
    - system_ha-history
    - system_ha-checksums
    - system_ha-peer
    - system_link-monitor
    - system_config_backup
    - system_config_usb-filelist
    - system_sandbox_stats
    - system_sandbox_status
    - system_sandbox_test-connect
    - system_object_usage
    - system_object-tagging_usage
    - system_status
    - system_timezone
    - system_sensor-info
    - system_security-rating
    - system_security-rating_history
    - system_security-rating_status
    - system_security-rating_lang
    - system_fortiguard-blacklist
    - system_check-port-availability
    - system_external-resource_entry-list
    - extender-controller_extender
    - system_sdn-connector_status
    - user_firewall
    - user_banned
    - user_fortitoken
    - user_detected-device
    - user_device
    - user_device-type
    - user_device-category
    - user_fsso
    - utm_rating-lookup
    - utm_app-lookup
    - utm_application-categories
    - utm_antivirus_stats
    - virtual-wan_health-check
    - virtual-wan_members
    - webfilter_override
    - webfilter_malicious-urls
    - webfilter_malicious-urls_stat
    - webfilter_category-quota
    - webfilter_fortiguard-categories
    - webfilter_trusted-urls
    - vpn_ipsec
    - vpn_one-click_members
    - vpn_one-click_status
    - vpn_ssl
    - vpn_ssl_stats
    - wanopt_history
    - wanopt_webcache
    - wanopt_peer_stats
    - webproxy_pacfile_download
    - webcache_stats
    - wifi_client
    - wifi_managed_ap
    - wifi_firmware
    - wifi_ap_status
    - wifi_interfering_ap
    - wifi_euclid
    - wifi_rogue_ap
    - wifi_spectrum
    - endpoint-control_summary
    - endpoint-control_ems_status
    - firewall_consolidated-policy
    - firewall_security-policy
    - firewall_uuid-list
    - firewall_uuid-type-lookup
    - fortiguard_redirect-portal
    - firewall_sdn-connector-filters
    - fortiview_sandbox-file-list
    - ips_metadata
    - ips_anomaly
    - license_fortianalyzer-status
    - log_forticloud-report-list
    - log_local-report-list
    - log_local-report_download
    - network_lldp_neighbors
    - network_lldp_ports
    - network_dns_latency
    - network_fortiguard_live-services-latency
    - network_ddns_servers
    - network_ddns_lookup
    - router_lookup-policy
    - system_config-script
    - system_config-sync_status
    - system_vdom-link
    - switch-controller_managed-switch_transceivers
    - system_interface_poe
    - system_trusted-cert-authorities
    - system_sandbox_cloud-regions
    - system_interface_transceivers
    - system_vm-information
    - system_security-rating_supported-reports
    - nsx_service_status
    - nsx_instance
    - system_sdn-connector_nsx-security-tags
    - web-ui_custom-language_download
    - user_collected-email
    - user_info_query
    - user_info_thumbnail
    - utm_blacklisted-certificates
    - utm_blacklisted-certificates_statistics
    - virtual-wan_interface-log
    - virtual-wan_sla-log
    - vpn_ocvpn_members
    - vpn_ocvpn_status
    - vpn_ocvpn_meta
    - wifi_network_list
    - wifi_network_status
    - wifi_region-image
    - azure_application-list
    - endpoint-control_ems_cert-status
    - endpoint-control_ems_status-summary
    - fortiguard_service-communication-stats
    - network_reverse-ip-lookup
    - registration_forticloud_device-status
    - switch-controller_managed-switch_health
    - switch-controller_managed-switch_cable-status
    - switch-controller_mclag-icl_eligible-peer
    - system_interface_speed-test-status
    - user_fortitoken-cloud_status
    - wifi_vlan-probe
    - firewall_ippool_mapping
    - network_arp
    - system_interface-connected-admins-info
    - system_ntp_status
    - system_config-error-log_download
    - system_running-processes
    - user_device_query
    - ips_exceed-scan-range
    - firewall_multicast-policy
    - firewall_multicast-policy6
    - firewall_gtp-statistics
    - firewall_gtp-runtime-statistics
    - router_bgp_neighbors
    - router_bgp_neighbors6
    - router_bgp_paths
    - router_bgp_paths6
    - router_ospf_neighbors
    - system_automation-action_stats
    - switch-controller_matched-devices
    - system_ha-table-checksums
    - system_sandbox_connection
    - system_traffic-history_interface
    - system_traffic-history_top-applications
    - videofilter_fortiguard-categories
    - firewall_central-snat-map
    - firewall_dnat
    - ips_hold-signatures
    - router_bgp_paths-statistics
    - system_lte-modem_status
    - system_global-search
    - switch-controller_managed-switch_status
    - switch-controller_managed-switch_port-stats
    - switch-controller_managed-switch_models
    - system_interface_kernel-interfaces
    - system_config_restore-status
    - wifi_meta
    - wifi_ap_channels
    - wifi_ap-names
    - firewall_internet-service-reputation
    - firewall_shaper_multi-class-shaper
    - log_forticloud_connection
    - system_performance_status
    - system_ipam_list
    - system_ipam_status
    - system_acme-certificate-status
    - system_crash-log_download
    - user_banned_check
    - user_info_thumbnail-file
    - vpn-certificate_cert-name-available
    - wifi_unassociated-devices
    - wifi_matched-devices
    - firewall_proxy_sessions
    - firewall_gtp
    - fortiview_proxy-statistics
    - system_ha-hw-interface
    - user_firewall_count
    - firewall_internet-service-basic
    - firewall_vip-overlap
    - switch-controller_managed-switch_port-health
    - switch-controller_managed-switch_tx-rx
    - firewall_network-service-dynamic
    - system_ipam_utilization
    - system_ha-nonsync-checksums
    - wifi_station-capability
    description:
    - selector of the retrieved fortiOS facts.
    required: false
    type: str

selectors:
    description:
    - A list of selectors for retrieving the fortiOS facts.
    elements: dict
    required: false
    suboptions:
      filters:
        description:
        - 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.
        elements: str
        required: false
        type: list
      formatters:
        description:
        - A list of fields to display for returned results.
        elements: str
        required: false
        type: list
      params:
        description:
        - the parameter for each selector, see definition in above list.
        required: false
        type: dict
      selector:
        choices:
        - endpoint-control_profile_xml
        - endpoint-control_record-list
        - endpoint-control_registration_summary
        - endpoint-control_installer
        - endpoint-control_installer_download
        - endpoint-control_avatar_download
        - firewall_health
        - firewall_local-in
        - firewall_acl
        - firewall_acl6
        - firewall_internet-service-match
        - firewall_internet-service-details
        - firewall_policy
        - firewall_policy6
        - firewall_proxy-policy
        - firewall_policy-lookup
        - firewall_session
        - firewall_shaper
        - firewall_per-ip-shaper
        - firewall_load-balance
        - firewall_address-fqdns
        - firewall_address-fqdns6
        - firewall_ippool
        - firewall_address-dynamic
        - firewall_address6-dynamic
        - fortiview_statistics
        - fortiview_sandbox-file-details
        - geoip_geoip-query
        - ips_rate-based
        - license_status
        - license_forticare-resellers
        - license_forticare-org-list
        - log_current-disk-usage
        - log_device_state
        - log_forticloud
        - log_fortianalyzer
        - log_fortianalyzer-queue
        - log_hourly-disk-usage
        - log_historic-daily-remote-logs
        - log_stats
        - log_forticloud-report_download
        - log_ips-archive_download
        - log_policy-archive_download
        - log_av-archive_download
        - log_event
        - registration_forticloud_disclaimer
        - registration_forticloud_domains
        - router_ipv4
        - router_ipv6
        - router_statistics
        - router_lookup
        - router_policy
        - router_policy6
        - system_config-revision
        - system_config-revision_file
        - system_config-revision_info
        - system_current-admins
        - system_time
        - system_global-resources
        - system_vdom-resource
        - system_dhcp
        - system_firmware
        - system_firmware_upgrade-paths
        - system_storage
        - system_csf
        - system_csf_pending-authorizations
        - system_modem
        - system_3g-modem
        - system_resource_usage
        - system_sniffer
        - system_sniffer_download
        - system_automation-stitch_stats
        - switch-controller_managed-switch
        - switch-controller_managed-switch_faceplate-xml
        - switch-controller_managed-switch_dhcp-snooping
        - switch-controller_fsw-firmware
        - switch-controller_detected-device
        - switch-controller_validate-switch-prefix
        - system_interface
        - system_interface_dhcp-status
        - system_available-interfaces
        - system_acquired-dns
        - system_resolve-fqdn
        - system_nat46-ippools
        - system_usb-log
        - system_ipconf
        - system_fortiguard_server-info
        - system_fortimanager_status
        - system_fortimanager_backup-summary
        - system_fortimanager_backup-details
        - system_available-certificates
        - system_certificate_download
        - system_debug_download
        - system_com-log_update
        - system_com-log_download
        - system_botnet_stat
        - system_botnet
        - system_botnet-domains
        - system_botnet-domains_stat
        - system_botnet-domains_hits
        - system_ha-statistics
        - system_ha-history
        - system_ha-checksums
        - system_ha-peer
        - system_link-monitor
        - system_config_backup
        - system_config_usb-filelist
        - system_sandbox_stats
        - system_sandbox_status
        - system_sandbox_test-connect
        - system_object_usage
        - system_object-tagging_usage
        - system_status
        - system_timezone
        - system_sensor-info
        - system_security-rating
        - system_security-rating_history
        - system_security-rating_status
        - system_security-rating_lang
        - system_fortiguard-blacklist
        - system_check-port-availability
        - system_external-resource_entry-list
        - extender-controller_extender
        - system_sdn-connector_status
        - user_firewall
        - user_banned
        - user_fortitoken
        - user_detected-device
        - user_device
        - user_device-type
        - user_device-category
        - user_fsso
        - utm_rating-lookup
        - utm_app-lookup
        - utm_application-categories
        - utm_antivirus_stats
        - virtual-wan_health-check
        - virtual-wan_members
        - webfilter_override
        - webfilter_malicious-urls
        - webfilter_malicious-urls_stat
        - webfilter_category-quota
        - webfilter_fortiguard-categories
        - webfilter_trusted-urls
        - vpn_ipsec
        - vpn_one-click_members
        - vpn_one-click_status
        - vpn_ssl
        - vpn_ssl_stats
        - wanopt_history
        - wanopt_webcache
        - wanopt_peer_stats
        - webproxy_pacfile_download
        - webcache_stats
        - wifi_client
        - wifi_managed_ap
        - wifi_firmware
        - wifi_ap_status
        - wifi_interfering_ap
        - wifi_euclid
        - wifi_rogue_ap
        - wifi_spectrum
        - endpoint-control_summary
        - endpoint-control_ems_status
        - firewall_consolidated-policy
        - firewall_security-policy
        - firewall_uuid-list
        - firewall_uuid-type-lookup
        - fortiguard_redirect-portal
        - firewall_sdn-connector-filters
        - fortiview_sandbox-file-list
        - ips_metadata
        - ips_anomaly
        - license_fortianalyzer-status
        - log_forticloud-report-list
        - log_local-report-list
        - log_local-report_download
        - network_lldp_neighbors
        - network_lldp_ports
        - network_dns_latency
        - network_fortiguard_live-services-latency
        - network_ddns_servers
        - network_ddns_lookup
        - router_lookup-policy
        - system_config-script
        - system_config-sync_status
        - system_vdom-link
        - switch-controller_managed-switch_transceivers
        - system_interface_poe
        - system_trusted-cert-authorities
        - system_sandbox_cloud-regions
        - system_interface_transceivers
        - system_vm-information
        - system_security-rating_supported-reports
        - nsx_service_status
        - nsx_instance
        - system_sdn-connector_nsx-security-tags
        - web-ui_custom-language_download
        - user_collected-email
        - user_info_query
        - user_info_thumbnail
        - utm_blacklisted-certificates
        - utm_blacklisted-certificates_statistics
        - virtual-wan_interface-log
        - virtual-wan_sla-log
        - vpn_ocvpn_members
        - vpn_ocvpn_status
        - vpn_ocvpn_meta
        - wifi_network_list
        - wifi_network_status
        - wifi_region-image
        - azure_application-list
        - endpoint-control_ems_cert-status
        - endpoint-control_ems_status-summary
        - fortiguard_service-communication-stats
        - network_reverse-ip-lookup
        - registration_forticloud_device-status
        - switch-controller_managed-switch_health
        - switch-controller_managed-switch_cable-status
        - switch-controller_mclag-icl_eligible-peer
        - system_interface_speed-test-status
        - user_fortitoken-cloud_status
        - wifi_vlan-probe
        - firewall_ippool_mapping
        - network_arp
        - system_interface-connected-admins-info
        - system_ntp_status
        - system_config-error-log_download
        - system_running-processes
        - user_device_query
        - ips_exceed-scan-range
        - firewall_multicast-policy
        - firewall_multicast-policy6
        - firewall_gtp-statistics
        - firewall_gtp-runtime-statistics
        - router_bgp_neighbors
        - router_bgp_neighbors6
        - router_bgp_paths
        - router_bgp_paths6
        - router_ospf_neighbors
        - system_automation-action_stats
        - switch-controller_matched-devices
        - system_ha-table-checksums
        - system_sandbox_connection
        - system_traffic-history_interface
        - system_traffic-history_top-applications
        - videofilter_fortiguard-categories
        - firewall_central-snat-map
        - firewall_dnat
        - ips_hold-signatures
        - router_bgp_paths-statistics
        - system_lte-modem_status
        - system_global-search
        - switch-controller_managed-switch_status
        - switch-controller_managed-switch_port-stats
        - switch-controller_managed-switch_models
        - system_interface_kernel-interfaces
        - system_config_restore-status
        - wifi_meta
        - wifi_ap_channels
        - wifi_ap-names
        - firewall_internet-service-reputation
        - firewall_shaper_multi-class-shaper
        - log_forticloud_connection
        - system_performance_status
        - system_ipam_list
        - system_ipam_status
        - system_acme-certificate-status
        - system_crash-log_download
        - user_banned_check
        - user_info_thumbnail-file
        - vpn-certificate_cert-name-available
        - wifi_unassociated-devices
        - wifi_matched-devices
        - firewall_proxy_sessions
        - firewall_gtp
        - fortiview_proxy-statistics
        - system_ha-hw-interface
        - user_firewall_count
        - firewall_internet-service-basic
        - firewall_vip-overlap
        - switch-controller_managed-switch_port-health
        - switch-controller_managed-switch_tx-rx
        - firewall_network-service-dynamic
        - system_ipam_utilization
        - system_ha-nonsync-checksums
        - wifi_station-capability
        description:
        - selector of the retrieved fortiOS facts
        required: true
        type: str
      sorters:
        description:
        - 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.
        elements: str
        required: false
        type: list
    type: list

enable_log:
    default: false
    description:
    - Enable/Disable logging for task.
    required: false
    type: bool

formatters:
    description:
    - A list of fields to display for returned results.
    elements: str
    required: false
    type: list

access_token:
    description:
    - Token-based authentication. Generated from GUI of Fortigate.
    required: false
    type: str

Outputs

ansible_facts:
  description: The list of fact subsets collected from the device
  returned: always
  type: dict
build:
  description: Build number of the fortigate image
  returned: always
  sample: '1547'
  type: str
http_method:
  description: Last method used to provision the content into FortiGate
  returned: always
  sample: GET
  type: str
name:
  description: Name of the table used to fulfill the request
  returned: always
  sample: firmware
  type: str
path:
  description: Path of the table used to fulfill the request
  returned: always
  sample: system
  type: str
revision:
  description: Internal revision number
  returned: always
  sample: 17.0.2.10658
  type: str
serial:
  description: Serial number of the unit
  returned: always
  sample: FGVMEVYYQT3AB5352
  type: str
status:
  description: Indication of the operation's result
  returned: always
  sample: success
  type: str
vdom:
  description: Virtual domain used
  returned: always
  sample: root
  type: str
version:
  description: Version of the FortiGate
  returned: always
  sample: v5.6.3
  type: str