fuel-plugin-lma-collector/environment_config.yaml

211 lines
5.6 KiB
YAML

attributes:
metadata:
restrictions:
- condition: "cluster:net_provider != 'neutron'"
action: "hide"
environment_label:
value: ''
label: 'Environment label'
description: 'Optional string to tag the data.'
weight: 10
type: "text"
elasticsearch_mode:
type: "radio"
weight: 20
value: "local"
label: "Events analytics (logs and notifications)"
values:
- data: "disabled"
label: "Disabled"
- data: "local"
label: "Local node"
- data: "remote"
label: "Remote server"
restrictions: &all_disabled_msg
- condition: "settings:lma_collector.elasticsearch_mode.value == 'disabled' and settings:lma_collector.influxdb_mode.value == 'disabled'"
action: "none"
message: "Please enable Events or Metrics analytics or both"
elasticsearch_address:
value: ''
label: 'Elasticsearch address'
description: 'IP address or fully qualified domain name of the Elasticsearch server.'
weight: 40
type: "text"
restrictions:
- condition: "settings:lma_collector.elasticsearch_mode.value != 'remote'"
action: "disable"
regex: &node_address_regex
source: '^[a-zA-Z\d][a-zA-Z\d_\-.]+$'
error: "Invalid address or name"
influxdb_mode:
type: "radio"
weight: 60
value: "local"
label: "Metrics analytics"
values:
- data: "disabled"
label: "Disabled"
- data: "local"
label: "Local node"
- data: "remote"
label: "Remote server"
restrictions: *all_disabled_msg
influxdb_address:
value: ''
label: 'InfluxDB address'
description: 'IP address or fully qualified domain name of the InfluxDB server.'
weight: 70
type: "text"
regex: *node_address_regex
restrictions:
- condition: "settings:lma_collector.influxdb_mode.value != 'remote'"
action: "disable"
influxdb_database:
value: 'lma'
label: 'InfluxDB database name'
description: ''
weight: 75
type: "text"
regex: &not_empty_parameter
source: '\S'
error: "Invalid value"
restrictions: &disable_influxdb_parameters
- condition: "settings:lma_collector.influxdb_mode.value != 'remote'"
action: "disable"
influxdb_user:
value: 'lma'
label: 'InfluxDB user'
description: ''
weight: 80
type: "text"
regex: *not_empty_parameter
restrictions: *disable_influxdb_parameters
influxdb_password:
value: 'lmapass'
label: 'InfluxDB password'
description: ''
weight: 85
type: "password"
regex: *not_empty_parameter
restrictions: *disable_influxdb_parameters
alerting_mode:
type: "radio"
weight: 90
value: "disabled"
label: "Alerting"
values:
- data: "disabled"
label: "Disabled"
- data: "standalone"
label: "Alerts sent by email (requires a SMTP server)"
- data: "local"
label: "Alerts sent to a local node running the LMA Infrastructure Alerting plugin"
- data: "remote"
label: "Alerts sent to a remote Nagios server"
restrictions: *all_disabled_msg
alerting_send_to:
value: ''
label: 'The recipient email address'
description: ''
weight: 91
type: "text"
restrictions: &not_standalone
- condition: "settings:lma_collector.alerting_mode.value != 'standalone'"
action: "disable"
regex: &email
source: '[a-z0-9!#$%&*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.?)?[a-z0-9]?(?:[a-z0-9-]*[a-z0-9])?'
error: "Invalid email address"
alerting_send_from:
value: ''
label: 'The sender email address'
description: ''
weight: 92
type: "text"
restrictions: *not_standalone
regex: *email
alerting_smtp_host:
value: ''
label: 'SMTP server address'
description: 'IP address (or fully qualified domain name) and port of the SMTP server'
weight: 93
type: "text"
restrictions: *not_standalone
regex:
source: '^[a-zA-Z\d][a-zA-Z\d_\-.]+(:[0-9]+)?$'
error: 'Invalid address or name'
alerting_smtp_auth:
type: "radio"
weight: 93
value: "none"
label: "SMTP authentication method"
restrictions: *not_standalone
values:
- data: "none"
label: "None"
- data: "Plain"
label: "Plain"
- data: "CRAMMD5"
label: "CRAMMD5"
alerting_smtp_user:
value: ''
label: 'SMTP user'
description: ''
weight: 96
type: "text"
restrictions: &not_standalone_and_no_auth
- condition: "settings:lma_collector.alerting_mode.value != 'standalone' or settings:lma_collector.alerting_smtp_auth.value == 'none'"
action: "disable"
alerting_smtp_password:
value: ''
label: 'SMTP password'
description: ''
weight: 97
type: "password"
restrictions: *not_standalone_and_no_auth
nagios_url:
value: ''
label: 'Nagios URL'
description: 'ie: http://<server>/nagios3/cgi-bin/cmd.cgi'
weight: 100
type: "text"
regex: &node_url_regex
source: '^(http(s?):\/\/)?([a-zA-Z\d]+[a-zA-Z\d_\-.]*)(:[0-9]+)?(\/[a-zA-Z0-9_\-\s.\/\?%#&=]*)?$'
error: "Invalid URL"
restrictions: &not_remote
- condition: "settings:lma_collector.alerting_mode.value != 'remote'"
action: "disable"
nagios_user:
value: 'nagiosadmin'
label: 'Nagios user'
description: ''
weight: 105
type: "text"
regex: *not_empty_parameter
restrictions: *not_remote
nagios_password:
value: ''
label: 'Nagios password'
description: ''
weight: 110
type: "password"
regex: *not_empty_parameter
restrictions: *not_remote