fuel-plugin-influxdb-grafana/environment_config.yaml

343 lines
10 KiB
YAML

attributes:
retention_period:
value: '30'
label: 'Retention period'
description: 'The number of days after which data is automatically deleted in InfluxDB (0 to never delete data).'
weight: 5
type: "text"
regex: &number_validation
source: '^\d+$'
error: "You must provide a number"
influxdb_rootpass:
value:
generator: 'password'
label: 'Root password'
description: 'The password of the InfluxDB root user'
weight: 30
type: "password"
regex:
source: '^[\S]{4,}$'
error: "You must provide a password with at least 4 characters"
influxdb_dbname:
value: 'lma'
label: 'Database name'
description: 'The name of the database used to store the metrics'
weight: 40
type: "text"
regex:
source: '\S'
error: "You must provide a name"
influxdb_username:
value: 'lma'
label: 'User name'
description: 'The name of the InfluxDB user'
weight: 50
type: "text"
regex:
source: '^((?!root$)\S)'
error: "You must provide a valid username"
influxdb_userpass:
value:
generator: 'password'
label: 'User password'
description: 'The password of the InfluxDB user'
weight: 60
type: "password"
regex:
source: '^[\S]{4,}$'
error: "You must provide a password with at least 4 characters"
influxdb_in_memory_wal:
value: false
label: 'Store WAL files in memory'
description: 'Store the Write-Ahead-Log (WAL) files in memory instead of disk. This will improve the write performances but data may be lost in case of server crash.'
weight: 61
type: "checkbox"
grafana_username:
value: 'lma'
label: 'User name'
description: 'The name of the Grafana admin'
weight: 70
type: "text"
regex:
source: '\S'
error: "You must provide a username"
grafana_userpass:
value:
generator: 'password'
label: 'User password'
description: 'The password of the Grafana admin'
weight: 80
type: "password"
regex:
source: '^[\S]{4,}$'
error: "You must provide a password with at least 4 characters"
mysql_mode:
type: "radio"
value: 'local'
weight: 90
label: 'MySQL settings'
values:
- data: "local"
label: "Local MySQL"
- data: "remote"
label: "Remote server"
mysql_host:
value: ''
label: 'MySQL address and port'
description: 'IP address or fully qualified domain name of the MySQL server and port. E.g. example.com:3307. Specifying the port is optional, the default value is 3306.'
weight: 100
type: "text"
restrictions:
- condition: "settings:influxdb_grafana.mysql_mode.value != 'remote'"
action: "disable"
regex:
source: '^[a-zA-Z\d][a-zA-Z\d_\-.]+(:[0-9]+)?$'
error: "You must provide a hostname or IP"
mysql_dbname:
value: 'grafana'
label: 'MySQL database'
description: "The name of the database. The database must be created beforehand when 'remote' mode is selected."
weight: 110
type: 'text'
regex:
source: '^[a-zA-Z0-9$_]{1,64}$'
error: "You must provide the name of the database (maximum length: 64 characters)"
mysql_username:
value: 'grafana'
label: 'MySQL username'
description: "The user must be provisioned beforehand when the 'remote' mode is selected."
weight: 120
type: 'text'
regex:
source: '^[a-zA-Z0-9$_-]{1,16}$'
error: "You must provide a username (maximum length: 16 characters)"
mysql_password:
value:
generator: 'password'
label: 'MySQL password'
description: ''
weight: 130
type: 'password'
regex:
source: '^[\S]{4,}$'
error: "You must provide a password with at least 4 characters"
# TLS Settings: BEGIN
tls_enabled:
value: false
label: 'Enable TLS for Grafana'
description: ''
weight: 140
type: "checkbox"
grafana_hostname:
value: 'grafana.fuel.local'
label: 'DNS hostname for Grafana'
description: 'Your DNS entries should point to this name.'
weight: 150
type: "text"
restrictions:
- condition: "settings:influxdb_grafana.tls_enabled.value == false"
action: "hide"
grafana_ssl_cert:
value: ''
label: 'Certificate for Grafana'
description: 'Certificate and private key concatenated into a single PEM file.'
weight: 160
type: "file"
restrictions:
- condition: "settings:influxdb_grafana.tls_enabled.value == false"
action: "hide"
# TLS Settings: END
# LDAP Settings: BEGIN
ldap_enabled:
value: false
label: 'Use LDAP for Grafana authentication'
description: ''
weight: 170
type: "checkbox"
ldap_protocol_for_grafana:
type: "radio"
value: 'ldap'
weight: 180
label: 'LDAP protocol'
values:
- data: "ldap"
label: "LDAP"
- data: "ldaps"
label: "LDAPS"
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
ldap_servers:
value: ''
label: 'LDAP servers'
description: 'Specify one or several LDAP servers separated by space.'
weight: 190
type: "text"
regex:
source: '^\w[\w\-\s.]+$'
error: "You must provide a hostname or IP"
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
ldap_server_port:
value: ''
label: 'Port'
description: 'If empty, the default value is 389 for LDAP and 636 for LDAPS.'
weight: 200
type: "text"
regex:
source: '^\d{0,5}$'
error: "You must provide a valid port number"
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
ldap_bind_dn:
value: ''
label: 'Bind DN'
description: 'DN used to bind to the server when searching for entries.'
weight: 210
type: "text"
regex: &not_empty_parameter
source: '\S'
error: "Invalid value"
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
ldap_bind_password:
value: ''
label: 'Bind password'
description: 'Password to use in conjunction with the bind DN.'
weight: 220
type: "password"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
ldap_user_search_base_dns:
value: ''
label: 'User search base DN'
description: 'The base DN to search for users.'
weight: 230
type: "text"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
ldap_user_search_filter:
value: '(uid=%s)'
label: 'User search filter'
description: 'A valid LDAP search filter.'
weight: 240
type: "text"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
ldap_authorization_enabled:
value: false
label: 'Enable group-based authorization'
description: "It allows to associate users with the 'admin' or 'viewer' role. Otherwise all users are assigned to the admin role."
weight: 250
type: "checkbox"
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
ldap_group_search_base_dns:
value: ''
label: 'Group search base DN'
description: 'The base DN to search for groups.'
weight: 260
type: "text"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
- condition: "settings:influxdb_grafana.ldap_authorization_enabled.value == false"
action: disable
ldap_group_search_filter:
value: '(&(objectClass=posixGroup)(memberUid=%s))'
label: 'Group search filter'
description: 'A valid LDAP search filter.'
weight: 270
type: "text"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
- condition: "settings:influxdb_grafana.ldap_authorization_enabled.value == false"
action: disable
ldap_admin_group_dn:
value: ''
label: 'LDAP group CN'
description: "The group CN for the 'admin' role"
weight: 280
type: "text"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
- condition: "settings:influxdb_grafana.ldap_authorization_enabled.value == false"
action: disable
ldap_viewer_group_dn:
value: ''
label: 'LDAP group CN'
description: "The group CN for the 'viewer' role"
weight: 290
type: "text"
regex: *not_empty_parameter
restrictions:
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: hide
- condition: "settings:influxdb_grafana.ldap_enabled.value == false"
action: disable
- condition: "settings:influxdb_grafana.ldap_authorization_enabled.value == false"
action: disable
# LDAP Settings: END