fortiswitch_monitor_fact – Retrieve Facts of FortiSwitch Monitor Objects.

New in version 2.11.

Synopsis

  • Collects monitor facts from network devices running the fortiswitch 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.fortiswitch >= 1.0.0.

Parameters

  • enable_log - Enable/Disable logging for task. type: bool required: False default: False
  • filters - A list of expressions to filter the returned results. type: list required: False more...
  • sorters - A list of expressions to sort the returned results. type: list required: False more...
  • formatters - A list of fields to display for returned results. type: list required: False
  • selector - selector of the retrieved fortiSwitch facts type: str choices:
    • hardware_cpu
    • hardware_cpu
    • hardware_memory
    • hardware_memory
    • router_routing-table
    • router_routing-table
    • switch_802.1x-status
    • switch_802.1x-status
    • switch_acl-stats
    • switch_acl-stats
    • switch_acl-stats-egress
    • switch_acl-stats-egress
    • switch_acl-stats-ingress
    • switch_acl-stats-ingress
    • switch_acl-stats-prelookup
    • switch_acl-stats-prelookup
    • switch_acl-usage
    • switch_acl-usage
    • switch_cable-diag
    • switch_cable-diag
    • switch_capabilities
    • switch_capabilities
    • switch_dhcp-snooping-client-db
    • switch_dhcp-snooping-client-db
    • switch_dhcp-snooping-client6-db
    • switch_dhcp-snooping-client6-db
    • switch_dhcp-snooping-db
    • switch_dhcp-snooping-db
    • switch_dhcp-snooping-limit-db-details
    • switch_dhcp-snooping-limit-db-details
    • switch_dhcp-snooping-server-db
    • switch_dhcp-snooping-server-db
    • switch_dhcp-snooping-server6-db
    • switch_dhcp-snooping-server6-db
    • switch_faceplate
    • switch_faceplate
    • switch_flapguard-status
    • switch_flapguard-status
    • switch_igmp-snooping-group
    • switch_igmp-snooping-group
    • switch_lldp-state
    • switch_lldp-state
    • switch_loop-guard-state
    • switch_loop-guard-state
    • switch_mac-address
    • switch_mac-address
    • switch_mac-address-summary
    • switch_mac-address-summary
    • switch_mclag-icl
    • switch_mclag-icl
    • switch_mclag-list
    • switch_mclag-list
    • switch_modules-detail
    • switch_modules-detail
    • switch_modules-limits
    • switch_modules-limits
    • switch_modules-status
    • switch_modules-status
    • switch_modules-summary
    • switch_modules-summary
    • switch_network-monitor-l2db
    • switch_network-monitor-l2db
    • switch_network-monitor-l3db
    • switch_network-monitor-l3db
    • switch_poe-status
    • switch_poe-status
    • switch_poe-summary
    • switch_poe-summary
    • switch_port
    • switch_port
    • switch_port-speed
    • switch_port-speed
    • switch_port-statistics
    • switch_port-statistics
    • switch_qos-stats
    • switch_qos-stats
    • switch_stp-state
    • switch_stp-state
    • switch_trunk-state
    • switch_trunk-state
    • system_dhcp-lease-list
    • system_dhcp-lease-list
    • system_fan-status
    • system_fan-status
    • system_flash-list
    • system_flash-list
    • system_flow-export-flows
    • system_flow-export-flows
    • system_flow-export-statistics
    • system_flow-export-statistics
    • system_hardware-status
    • system_hardware-status
    • system_interface-physical
    • system_interface-physical
    • system_link-monitor-status
    • system_link-monitor-status
    • system_log
    • system_log
    • system_ntp-status
    • system_ntp-status
    • system_pcb-temp
    • system_pcb-temp
    • system_performance-status
    • system_performance-status
    • system_psu-status
    • system_psu-status
    • system_resource
    • system_resource
    • system_sniffer-profile-summary
    • system_sniffer-profile-summary
    • system_status
    • system_status
    • system_upgrade-status
    • system_upgrade-status
  • params - the parameter for each selector, see definition in above list.type: dict

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 FortiSwitch monitor API.

  • The result of API request is stored in results.

  • There are three filtering parameters: filters, sorters and formatters, please see filtering spec for more information.

Examples

- hosts: fortiswitch01
  connection: httpapi
  collections:
  - fortinet.fortiswitch
  vars:
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - fortiswitch_monitor_fact:
       enable_log: true
       formatters:
         - model_name
       filters:
         - model_name==FortiSwitch
       selectors:
         - selector: 'system_status'

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 fortiSwitch image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiSwitch returned: always type: str sample: GET
  • name - Name of the table used to fulfill the request returned: always type: str sample: firmware
  • path - Path of the table used to fulfill the request returned: always type: str sample: system
  • results - Object list retrieved from device. returned: always type: list
  • 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
  • version - Version of the FortiSwitch returned: always type: str sample: v5.6.3
  • ansible_facts - The list of fact subsets collected from the device returned: always type: dict

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 (@fshen01)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.