fortios_report_chart – Report chart widget configuration in Fortinet’s FortiOS and FortiGate.

New in version 2.8.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify report feature and chart 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.9.0

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: 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
  • state - Indicates whether to create or remove the object. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. type: str required: False choices: present, absent
  • report_chart - Report chart widget configuration. type: dict
    • state - B(Deprecated) type: str required: False choices: present, absent
    • background - Chart background. type: str
    • category - Category. type: str choices: misc, traffic, event, virus, webfilter, attack, spam, dlp, app-ctrl, vulnerability
    • category_series - Category series of pie chart. type: dict
      • databind - Category series value expression. type: str
      • font_size - Font size of category-series title. type: int
    • color_palette - Color palette (system will pick color automatically by default). type: str
    • column - Table column definition. type: list
      • detail_unit - Detail unit of column. type: str
      • detail_value - Detail value of column. type: str
      • footer_unit - Footer unit of column. type: str
      • footer_value - Footer value of column. type: str
      • header_value - Display name of table header. type: str
      • id - ID. type: int required: True
      • mapping - Show detail in certain display value for certain condition. type: list
        • displayname - Display name. type: str
        • id - id type: int required: True
        • op - Comparision operater. type: str choices: none, greater, greater-equal, less, less-equal, equal, between
        • value_type - Value type. type: str choices: integer, string
        • value1 - Value 1. type: str
        • value2 - Value 2. type: str
    • comments - Comment. type: str
    • dataset - Bind dataset to chart. type: str
    • dimension - Dimension. type: str choices: 2D, 3D
    • drill_down_charts - Drill down charts. type: list
      • chart_name - Drill down chart name. type: str
      • id - Drill down chart ID. type: int required: True
      • status - Enable/disable this drill down chart. type: str choices: enable, disable
    • favorite - Favorite. type: str choices: False, True
    • graph_type - Graph type. type: str choices: none, bar, pie, line, flow
    • legend - Enable/Disable Legend area. type: str choices: enable, disable
    • legend_font_size - Font size of legend area. type: int
    • name - Chart Widget Name type: str required: True
    • period - Time period. type: str choices: last24h, last7d
    • policy - Used by monitor policy. type: int
    • style - Style. type: str choices: auto, manual
    • title - Chart title. type: str
    • title_font_size - Font size of chart title. type: int
    • type - Chart type. type: str choices: graph, table
    • value_series - Value series of pie chart. type: dict
      • databind - Value series value expression. type: str
    • x_series - X-series of chart. type: dict
      • caption - X-series caption. type: str
      • caption_font_size - X-series caption font size. type: int
      • databind - X-series value expression. type: str
      • font_size - X-series label font size. type: int
      • is_category - X-series represent category or not. type: str choices: True, False
      • label_angle - X-series label angle. type: str choices: 45-degree, vertical, horizontal
      • scale_direction - Scale increase or decrease. type: str choices: decrease, increase
      • scale_format - Date/time format. type: str choices: YYYY-MM-DD-HH-MM, YYYY-MM-DD HH, YYYY-MM-DD, YYYY-MM, YYYY, HH-MM, MM-DD
      • scale_step - Scale step. type: int
      • scale_unit - Scale unit. type: str choices: minute, hour, day, month, year
      • unit - X-series unit. type: str
    • y_series - Y-series of chart. type: dict
      • caption - Y-series caption. type: str
      • caption_font_size - Y-series caption font size. type: int
      • databind - Y-series value expression. type: str
      • extra_databind - Extra Y-series value. type: str
      • extra_y - Allow another Y-series value type: str choices: enable, disable
      • extra_y_legend - Extra Y-series legend type/name. type: str
      • font_size - Y-series label font size. type: int
      • group - Y-series group option. type: str
      • label_angle - Y-series label angle. type: str choices: 45-degree, vertical, horizontal
      • unit - Y-series unit. type: str
      • y_legend - First Y-series legend type/name. type: str

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Report chart widget configuration.
    fortios_report_chart:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      report_chart:
        background: "<your_own_value>"
        category: "misc"
        category_series:
            databind: "<your_own_value>"
            font_size: "7"
        color_palette: "<your_own_value>"
        column:
         -
            detail_unit: "<your_own_value>"
            detail_value: "<your_own_value>"
            footer_unit: "<your_own_value>"
            footer_value: "<your_own_value>"
            header_value: "<your_own_value>"
            id:  "15"
            mapping:
             -
                displayname: "<your_own_value>"
                id:  "18"
                op: "none"
                value_type: "integer"
                value1: "<your_own_value>"
                value2: "<your_own_value>"
        comments: "<your_own_value>"
        dataset: "<your_own_value>"
        dimension: "2D"
        drill_down_charts:
         -
            chart_name: "<your_own_value>"
            id:  "28"
            status: "enable"
        favorite: "no"
        graph_type: "none"
        legend: "enable"
        legend_font_size: "33"
        name: "default_name_34"
        period: "last24h"
        policy: "36"
        style: "auto"
        title: "<your_own_value>"
        title_font_size: "39"
        type: "graph"
        value_series:
            databind: "<your_own_value>"
        x_series:
            caption: "<your_own_value>"
            caption_font_size: "45"
            databind: "<your_own_value>"
            font_size: "47"
            is_category: "yes"
            label_angle: "45-degree"
            scale_direction: "decrease"
            scale_format: "YYYY-MM-DD-HH-MM"
            scale_step: "52"
            scale_unit: "minute"
            unit: "<your_own_value>"
        y_series:
            caption: "<your_own_value>"
            caption_font_size: "57"
            databind: "<your_own_value>"
            extra_databind: "<your_own_value>"
            extra_y: "enable"
            extra_y_legend: "<your_own_value>"
            font_size: "62"
            group: "<your_own_value>"
            label_angle: "45-degree"
            unit: "<your_own_value>"
            y_legend: "<your_own_value>"

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.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

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