Skip to content

Latest commit

 

History

History
1353 lines (1312 loc) · 54.5 KB

fortios_report_chart.rst

File metadata and controls

1353 lines (1312 loc) · 54.5 KB
source:fortios_report_chart.py
orphan:

fortios_report_chart -- Report chart widget configuration in Fortinet's FortiOS and FortiGate.

.. versionadded:: 2.0.0

  • 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

The below requirements are needed on the host that executes this module.

  • ansible>=2.15

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

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

  • 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...
    Supported Version Ranges
    report_chart v6.0.0 -> v6.4.4
    • background - Chart background. type: str more...
      Supported Version Ranges
      background v6.0.0 -> v6.4.4
    • category - Category. type: str choices: misc, traffic, event, virus, webfilter, attack, spam, dlp, app-ctrl, vulnerability more...
      Supported Version Ranges
      category v6.0.0 -> v6.4.4
      [misc] v6.0.0 -> v6.4.4
      [traffic] v6.0.0 -> v6.4.4
      [event] v6.0.0 -> v6.4.4
      [virus] v6.0.0 -> v6.4.4
      [webfilter] v6.0.0 -> v6.4.4
      [attack] v6.0.0 -> v6.4.4
      [spam] v6.0.0 -> v6.4.4
      [dlp] v6.0.0 -> v6.4.4
      [app-ctrl] v6.0.0 -> v6.4.4
      [vulnerability] v6.0.0 -> v6.4.4
    • category_series - Category series of pie chart. type: dict more...
      Supported Version Ranges
      category_series v6.0.0 -> v6.4.4
      • databind - Category series value expression. type: str more...
        Supported Version Ranges
        databind v6.0.0 -> v6.4.4
      • font_size - Font size of category-series title. type: int more...
        Supported Version Ranges
        font_size v6.0.0 -> v6.4.4
    • color_palette - Color palette (system will pick color automatically by default). type: str more...
      Supported Version Ranges
      color_palette v6.0.0 -> v6.4.4
    • column - Table column definition. type: list member_path: column:id more...
      Supported Version Ranges
      column v6.0.0 -> v6.4.4
      • detail_unit - Detail unit of column. type: str more...
        Supported Version Ranges
        detail_unit v6.0.0 -> v6.4.4
      • detail_value - Detail value of column. type: str more...
        Supported Version Ranges
        detail_value v6.0.0 -> v6.4.4
      • footer_unit - Footer unit of column. type: str more...
        Supported Version Ranges
        footer_unit v6.0.0 -> v6.4.4
      • footer_value - Footer value of column. type: str more...
        Supported Version Ranges
        footer_value v6.0.0 -> v6.4.4
      • header_value - Display name of table header. type: str more...
        Supported Version Ranges
        header_value v6.0.0 -> v6.4.4
      • id - ID. see Notes. type: int required: true more...
        Supported Version Ranges
        id v6.0.0 -> v6.4.4
      • mapping - Show detail in certain display value for certain condition. type: list member_path: column:id/mapping:id more...
        Supported Version Ranges
        mapping v6.0.0 -> v6.4.4
        • displayname - Display name. type: str more...
          Supported Version Ranges
          displayname v6.0.0 -> v6.4.4
        • id - id see Notes. type: int required: true more...
          Supported Version Ranges
          id v6.0.0 -> v6.4.4
        • op - Comparision operater. type: str choices: none, greater, greater-equal, less, less-equal, equal, between more...
          Supported Version Ranges
          op v6.0.0 -> v6.4.4
          [none] v6.0.0 -> v6.4.4
          [greater] v6.0.0 -> v6.4.4
          [greater-equal] v6.0.0 -> v6.4.4
          [less] v6.0.0 -> v6.4.4
          [less-equal] v6.0.0 -> v6.4.4
          [equal] v6.0.0 -> v6.4.4
          [between] v6.0.0 -> v6.4.4
        • value_type - Value type. type: str choices: integer, string more...
          Supported Version Ranges
          value_type v6.0.0 -> v6.4.4
          [integer] v6.0.0 -> v6.4.4
          [string] v6.0.0 -> v6.4.4
        • value1 - Value 1. type: str more...
          Supported Version Ranges
          value1 v6.0.0 -> v6.4.4
        • value2 - Value 2. type: str more...
          Supported Version Ranges
          value2 v6.0.0 -> v6.4.4
    • comments - Comment. type: str more...
      Supported Version Ranges
      comments v6.0.0 -> v6.4.4
    • dataset - Bind dataset to chart. type: str more...
      Supported Version Ranges
      dataset v6.0.0 -> v6.4.4
    • dimension - Dimension. type: str choices: 2D, 3D more...
      Supported Version Ranges
      dimension v6.0.0 -> v6.4.4
      [2D] v6.0.0 -> v6.4.4
      [3D] v6.0.0 -> v6.4.4
    • drill_down_charts - Drill down charts. type: list member_path: drill_down_charts:id more...
      Supported Version Ranges
      drill_down_charts v6.0.0 -> v6.4.4
      • chart_name - Drill down chart name. type: str more...
        Supported Version Ranges
        chart_name v6.0.0 -> v6.4.4
      • id - Drill down chart ID. see Notes. type: int required: true more...
        Supported Version Ranges
        id v6.0.0 -> v6.4.4
      • status - Enable/disable this drill down chart. type: str choices: enable, disable more...
        Supported Version Ranges
        status v6.0.0 -> v6.4.4
        [enable] v6.0.0 -> v6.4.4
        [disable] v6.0.0 -> v6.4.4
    • favorite - Favorite. type: str choices: no, yes more...
      Supported Version Ranges
      favorite v6.0.0 -> v6.4.4
      [no] v6.0.0 -> v6.4.4
      [yes] v6.0.0 -> v6.4.4
    • graph_type - Graph type. type: str choices: none, bar, pie, line, flow more...
      Supported Version Ranges
      graph_type v6.0.0 -> v6.4.4
      [none] v6.0.0 -> v6.4.4
      [bar] v6.0.0 -> v6.4.4
      [pie] v6.0.0 -> v6.4.4
      [line] v6.0.0 -> v6.4.4
      [flow] v6.0.0 -> v6.4.4
    • legend - Enable/Disable Legend area. type: str choices: enable, disable more...
      Supported Version Ranges
      legend v6.0.0 -> v6.4.4
      [enable] v6.0.0 -> v6.4.4
      [disable] v6.0.0 -> v6.4.4
    • legend_font_size - Font size of legend area. type: int more...
      Supported Version Ranges
      legend_font_size v6.0.0 -> v6.4.4
    • name - Chart Widget Name type: str required: true more...
      Supported Version Ranges
      name v6.0.0 -> v6.4.4
    • period - Time period. type: str choices: last24h, last7d more...
      Supported Version Ranges
      period v6.0.0 -> v6.4.4
      [last24h] v6.0.0 -> v6.4.4
      [last7d] v6.0.0 -> v6.4.4
    • policy - Used by monitor policy. type: int more...
      Supported Version Ranges
      policy v6.0.0 -> v6.4.4
    • style - Style. type: str choices: auto, manual more...
      Supported Version Ranges
      style v6.0.0 -> v6.4.4
      [auto] v6.0.0 -> v6.4.4
      [manual] v6.0.0 -> v6.4.4
    • title - Chart title. type: str more...
      Supported Version Ranges
      title v6.0.0 -> v6.4.4
    • title_font_size - Font size of chart title. type: int more...
      Supported Version Ranges
      title_font_size v6.0.0 -> v6.4.4
    • type - Chart type. type: str choices: graph, table more...
      Supported Version Ranges
      type v6.0.0 -> v6.4.4
      [graph] v6.0.0 -> v6.4.4
      [table] v6.0.0 -> v6.4.4
    • value_series - Value series of pie chart. type: dict more...
      Supported Version Ranges
      value_series v6.0.0 -> v6.4.4
      • databind - Value series value expression. type: str more...
        Supported Version Ranges
        databind v6.0.0 -> v6.4.4
    • x_series - X-series of chart. type: dict more...
      Supported Version Ranges
      x_series v6.0.0 -> v6.4.4
      • caption - X-series caption. type: str more...
        Supported Version Ranges
        caption v6.0.0 -> v6.4.4
      • caption_font_size - X-series caption font size. type: int more...
        Supported Version Ranges
        caption_font_size v6.0.0 -> v6.4.4
      • databind - X-series value expression. type: str more...
        Supported Version Ranges
        databind v6.0.0 -> v6.4.4
      • font_size - X-series label font size. type: int more...
        Supported Version Ranges
        font_size v6.0.0 -> v6.4.4
      • is_category - X-series represent category or not. type: str choices: yes, no more...
        Supported Version Ranges
        is_category v6.0.0 -> v6.4.4
        [yes] v6.0.0 -> v6.4.4
        [no] v6.0.0 -> v6.4.4
      • label_angle - X-series label angle. type: str choices: 45-degree, vertical, horizontal more...
        Supported Version Ranges
        label_angle v6.0.0 -> v6.4.4
        [45-degree] v6.0.0 -> v6.4.4
        [vertical] v6.0.0 -> v6.4.4
        [horizontal] v6.0.0 -> v6.4.4
      • scale_direction - Scale increase or decrease. type: str choices: decrease, increase more...
        Supported Version Ranges
        scale_direction v6.0.0 -> v6.4.4
        [decrease] v6.0.0 -> v6.4.4
        [increase] v6.0.0 -> v6.4.4
      • 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...
        Supported Version Ranges
        scale_format v6.0.0 -> v6.4.4
        [YYYY-MM-DD-HH-MM] v6.0.0 -> v6.4.4
        [YYYY-MM-DD HH] v6.0.0 -> v6.4.4
        [YYYY-MM-DD] v6.0.0 -> v6.4.4
        [YYYY-MM] v6.0.0 -> v6.4.4
        [YYYY] v6.0.0 -> v6.4.4
        [HH-MM] v6.0.0 -> v6.4.4
        [MM-DD] v6.0.0 -> v6.4.4
      • scale_step - Scale step. type: int more...
        Supported Version Ranges
        scale_step v6.0.0 -> v6.4.4
      • scale_unit - Scale unit. type: str choices: minute, hour, day, month, year more...
        Supported Version Ranges
        scale_unit v6.0.0 -> v6.4.4
        [minute] v6.0.0 -> v6.4.4
        [hour] v6.0.0 -> v6.4.4
        [day] v6.0.0 -> v6.4.4
        [month] v6.0.0 -> v6.4.4
        [year] v6.0.0 -> v6.4.4
      • unit - X-series unit. type: str more...
        Supported Version Ranges
        unit v6.0.0 -> v6.4.4
    • y_series - Y-series of chart. type: dict more...
      Supported Version Ranges
      y_series v6.0.0 -> v6.4.4
      • caption - Y-series caption. type: str more...
        Supported Version Ranges
        caption v6.0.0 -> v6.4.4
      • caption_font_size - Y-series caption font size. type: int more...
        Supported Version Ranges
        caption_font_size v6.0.0 -> v6.4.4
      • databind - Y-series value expression. type: str more...
        Supported Version Ranges
        databind v6.0.0 -> v6.4.4
      • extra_databind - Extra Y-series value. type: str more...
        Supported Version Ranges
        extra_databind v6.0.0 -> v6.4.4
      • extra_y - Allow another Y-series value type: str choices: enable, disable more...
        Supported Version Ranges
        extra_y v6.0.0 -> v6.4.4
        [enable] v6.0.0 -> v6.4.4
        [disable] v6.0.0 -> v6.4.4
      • extra_y_legend - Extra Y-series legend type/name. type: str more...
        Supported Version Ranges
        extra_y_legend v6.0.0 -> v6.4.4
      • font_size - Y-series label font size. type: int more...
        Supported Version Ranges
        font_size v6.0.0 -> v6.4.4
      • group - Y-series group option. type: str more...
        Supported Version Ranges
        group v6.0.0 -> v6.4.4
      • label_angle - Y-series label angle. type: str choices: 45-degree, vertical, horizontal more...
        Supported Version Ranges
        label_angle v6.0.0 -> v6.4.4
        [45-degree] v6.0.0 -> v6.4.4
        [vertical] v6.0.0 -> v6.4.4
        [horizontal] v6.0.0 -> v6.4.4
      • unit - Y-series unit. type: str more...
        Supported Version Ranges
        unit v6.0.0 -> v6.4.4
      • y_legend - First Y-series legend type/name. type: str more...
        Supported Version Ranges
        y_legend v6.0.0 -> v6.4.4

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- 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>"

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
  • This module is not guaranteed to have a backwards compatible interface.
  • 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.