lix_fortinet.fortios.fortios_report_chart (102.2.120) — module

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

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

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

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

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

Usage examples

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

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.
    type: str

state:
    choices:
    - present
    - absent
    description:
    - Indicates whether to create or remove the object.
    required: true
    type: str

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

member_path:
    description:
    - Member attribute path to operate on.
    - Delimited by a slash character if there are more than one attribute.
    - Parameter marked with member_path is legitimate for doing member operation.
    type: str

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

member_state:
    choices:
    - present
    - absent
    description:
    - Add or delete a member under specified attribute path.
    - When member_state is specified, the state option is ignored.
    type: str

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

Outputs

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: PUT
  type: str
http_status:
  description: Last result given by FortiGate on last operation applied
  returned: always
  sample: '200'
  type: str
mkey:
  description: Master key (id) used in the last call to FortiGate
  returned: success
  sample: id
  type: str
name:
  description: Name of the table used to fulfill the request
  returned: always
  sample: urlfilter
  type: str
path:
  description: Path of the table used to fulfill the request
  returned: always
  sample: webfilter
  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