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

New in version 2.0.0.

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.14

Tips

Using member operation to add an element to an existing object.

FortiOS Version Compatibility


Supported Version Ranges
fortios_report_chart v6.0.0 -> v6.4.4

Parameters

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

Notes

Note

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

Examples

- name: Report chart widget configuration.
  fortinet.fortios.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: "10"
          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: "2147483647"
          name: "default_name_34"
          period: "last24h"
          policy: "2147483647"
          style: "auto"
          title: "<your_own_value>"
          title_font_size: "2147483647"
          type: "graph"
          value_series:
              databind: "<your_own_value>"
          x_series:
              caption: "<your_own_value>"
              caption_font_size: "10"
              databind: "<your_own_value>"
              font_size: "10"
              is_category: "yes"
              label_angle: "45-degree"
              scale_direction: "decrease"
              scale_format: "YYYY-MM-DD-HH-MM"
              scale_step: "32767"
              scale_unit: "minute"
              unit: "<your_own_value>"
          y_series:
              caption: "<your_own_value>"
              caption_font_size: "10"
              databind: "<your_own_value>"
              extra_databind: "<your_own_value>"
              extra_y: "enable"
              extra_y_legend: "<your_own_value>"
              font_size: "10"
              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.