On this page
fortinet.fortios.fortios_report_chart – Report chart widget configuration in Fortinet’s FortiOS and FortiGate.
Note
This plugin is part of the fortinet.fortios collection (version 2.1.2).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install fortinet.fortios
.
To use it in a playbook, specify: fortinet.fortios.fortios_report_chart
.
New in version 2.10: of fortinet.fortios
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
Parameter | Choices/Defaults | Comments | |||
---|---|---|---|---|---|
access_token
string
|
Token-based authentication. Generated from GUI of Fortigate.
|
||||
enable_log
boolean
|
|
Enable/Disable logging for task.
|
|||
report_chart
dictionary
|
Report chart widget configuration.
|
||||
background
string
|
Chart background.
|
||||
category
string
|
|
Category.
|
|||
category_series
dictionary
|
Category series of pie chart.
|
||||
databind
string
|
Category series value expression.
|
||||
font_size
integer
|
Font size of category-series title.
|
||||
color_palette
string
|
Color palette (system will pick color automatically by default).
|
||||
column
list / elements=string
|
Table column definition.
|
||||
detail_unit
string
|
Detail unit of column.
|
||||
detail_value
string
|
Detail value of column.
|
||||
footer_unit
string
|
Footer unit of column.
|
||||
footer_value
string
|
Footer value of column.
|
||||
header_value
string
|
Display name of table header.
|
||||
id
integer / required
|
ID.
|
||||
mapping
list / elements=string
|
Show detail in certain display value for certain condition.
|
||||
displayname
string
|
Display name.
|
||||
id
integer / required
|
id
|
||||
op
string
|
|
Comparision operater.
|
|||
value1
string
|
Value 1.
|
||||
value2
string
|
Value 2.
|
||||
value_type
string
|
|
Value type.
|
|||
comments
string
|
Comment.
|
||||
dataset
string
|
Bind dataset to chart.
|
||||
dimension
string
|
|
Dimension.
|
|||
drill_down_charts
list / elements=string
|
Drill down charts.
|
||||
chart_name
string
|
Drill down chart name.
|
||||
id
integer / required
|
Drill down chart ID.
|
||||
status
string
|
|
Enable/disable this drill down chart.
|
|||
favorite
string
|
|
Favorite.
|
|||
graph_type
string
|
|
Graph type.
|
|||
legend
string
|
|
Enable/Disable Legend area.
|
|||
legend_font_size
integer
|
Font size of legend area.
|
||||
name
string / required
|
Chart Widget Name
|
||||
period
string
|
|
Time period.
|
|||
policy
integer
|
Used by monitor policy.
|
||||
style
string
|
|
Style.
|
|||
title
string
|
Chart title.
|
||||
title_font_size
integer
|
Font size of chart title.
|
||||
type
string
|
|
Chart type.
|
|||
value_series
dictionary
|
Value series of pie chart.
|
||||
databind
string
|
Value series value expression.
|
||||
x_series
dictionary
|
X-series of chart.
|
||||
caption
string
|
X-series caption.
|
||||
caption_font_size
integer
|
X-series caption font size.
|
||||
databind
string
|
X-series value expression.
|
||||
font_size
integer
|
X-series label font size.
|
||||
is_category
string
|
|
X-series represent category or not.
|
|||
label_angle
string
|
|
X-series label angle.
|
|||
scale_direction
string
|
|
Scale increase or decrease.
|
|||
scale_format
string
|
|
Date/time format.
|
|||
scale_step
integer
|
Scale step.
|
||||
scale_unit
string
|
|
Scale unit.
|
|||
unit
string
|
X-series unit.
|
||||
y_series
dictionary
|
Y-series of chart.
|
||||
caption
string
|
Y-series caption.
|
||||
caption_font_size
integer
|
Y-series caption font size.
|
||||
databind
string
|
Y-series value expression.
|
||||
extra_databind
string
|
Extra Y-series value.
|
||||
extra_y
string
|
|
Allow another Y-series value
|
|||
extra_y_legend
string
|
Extra Y-series legend type/name.
|
||||
font_size
integer
|
Y-series label font size.
|
||||
group
string
|
Y-series group option.
|
||||
label_angle
string
|
|
Y-series label angle.
|
|||
unit
string
|
Y-series unit.
|
||||
y_legend
string
|
First Y-series legend type/name.
|
||||
state
string / required
|
|
Indicates whether to create or remove the object.
|
|||
vdom
string
|
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
- 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 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
|
Authors
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Hongbin Lu (@fgtdev-hblu)
- Frank Shen (@frankshen01)
- Miguel Angel Munoz (@mamunozgonzalez)
- Nicolas Thomas (@thomnico)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/fortios_report_chart_module.html