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

From Get docs
Ansible/docs/2.8/modules/fortios report chart module


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

Requirements

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

  • fortiosapi>=0.9.8

Parameters

Parameter Choices/Defaults Comments

host

- / required

FortiOS or FortiGate ip address.

https

boolean

  • no
  • yes

Indicates if the requests towards FortiGate must use HTTPS protocol

password

-

Default:

""

FortiOS or FortiGate password.

report_chart

-

Default:

null

Report chart widget configuration.

background

-

Chart background.

category

-

  • misc
  • traffic
  • event
  • virus
  • webfilter
  • attack
  • spam
  • dlp
  • app-ctrl
  • vulnerability

Category.

category-series

-

Category series of pie chart.

databind

-

Category series value expression.

font-size

-

Font size of category-series title.

color-palette

-

Color palette (system will pick color automatically by default).

column

-

Table column definition.

detail-unit

-

Detail unit of column.

detail-value

-

Detail value of column.

footer-unit

-

Footer unit of column.

footer-value

-

Footer value of column.

header-value

-

Display name of table header.

id

- / required

ID.

mapping

-

Show detail in certain display value for certain condition.

displayname

-

Display name.

id

- / required

id

op

-

  • none
  • greater
  • greater-equal
  • less
  • less-equal
  • equal
  • between

Comparison operater.

value-type

-

  • integer
  • string

Value type.

value1

-

Value 1.

value2

-

Value 2.

comments

-

Comment.

dataset

-

Bind dataset to chart.

dimension

-

  • 2D
  • 3D

Dimension.

drill-down-charts

-

Drill down charts.

chart-name

-

Drill down chart name.

id

- / required

Drill down chart ID.

status

-

  • enable
  • disable

Enable/disable this drill down chart.

favorite

-

  • no
  • yes

Favorite.

graph-type

-

  • none
  • bar
  • pie
  • line
  • flow

Graph type.

legend

-

  • enable
  • disable

Enable/Disable Legend area.

legend-font-size

-

Font size of legend area.

name

- / required

Chart Widget Name

period

-

  • last24h
  • last7d

Time period.

policy

-

Used by monitor policy.

state

-

  • present
  • absent

Indicates whether to create or remove the object

style

-

  • auto
  • manual

Style.

title

-

Chart title.

title-font-size

-

Font size of chart title.

type

-

  • graph
  • table

Chart type.

value-series

-

Value series of pie chart.

databind

-

Value series value expression.

x-series

-

X-series of chart.

caption

-

X-series caption.

caption-font-size

-

X-series caption font size.

databind

-

X-series value expression.

font-size

-

X-series label font size.

is-category

-

  • yes
  • no

X-series represent category or not.

label-angle

-

  • 45-degree
  • vertical
  • horizontal

X-series label angle.

scale-direction

-

  • decrease
  • increase

Scale increase or decrease.

scale-format

-

  • YYYY-MM-DD-HH-MM
  • YYYY-MM-DD HH
  • YYYY-MM-DD
  • YYYY-MM
  • YYYY
  • HH-MM
  • MM-DD

Date/time format.

scale-step

-

Scale step.

scale-unit

-

  • minute
  • hour
  • day
  • month
  • year

Scale unit.

unit

-

X-series unit.

y-series

-

Y-series of chart.

caption

-

Y-series caption.

caption-font-size

-

Y-series caption font size.

databind

-

Y-series value expression.

extra-databind

-

Extra Y-series value.

extra-y

-

  • enable
  • disable

Allow another Y-series value

extra-y-legend

-

Extra Y-series legend type/name.

font-size

-

Y-series label font size.

group

-

Y-series group option.

label-angle

-

  • 45-degree
  • vertical
  • horizontal

Y-series label angle.

unit

-

Y-series unit.

y-legend

-

First Y-series legend type/name.

username

- / required

FortiOS or FortiGate username.

vdom

-

Default:

"root"

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.



Notes

Note

  • Requires fortiosapi library developed by Fortinet
  • Run as a local_action in your playbook


Examples

- hosts: localhost
  vars:
   host: "192.168.122.40"
   username: "admin"
   password: ""
   vdom: "root"
  tasks:
  - name: Report chart widget configuration.
    fortios_report_chart:
      host:  "{{ host }}"
      username: "{{ username }}"
      password: "{{ password }}"
      vdom:  "{{ vdom }}"
      https: "False"
      report_chart:
        state: "present"
        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 here, the following are the fields unique to this module:

Key Returned Description

build

string

always

Build number of the fortigate image


Sample:

1547

http_method

string

always

Last method used to provision the content into FortiGate


Sample:

PUT

http_status

string

always

Last result given by FortiGate on last operation applied


Sample:

200

mkey

string

success

Master key (id) used in the last call to FortiGate


Sample:

id

name

string

always

Name of the table used to fulfill the request


Sample:

urlfilter

path

string

always

Path of the table used to fulfill the request


Sample:

webfilter

revision

string

always

Internal revision number


Sample:

17.0.2.10658

serial

string

always

Serial number of the unit


Sample:

FGVMEVYYQT3AB5352

status

string

always

Indication of the operation's result


Sample:

success

vdom

string

always

Virtual domain used


Sample:

root

version

string

always

Version of the FortiGate


Sample:

v5.6.3




Status

Authors

  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation you can edit this document to improve it.


© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/fortios_report_chart_module.html