Implicitly configure Nagios outputs if available
Change-Id: Ibf5b4c2239004a4fa8e99bcaaf2949a5155543ed
This commit is contained in:
parent
b7c7e7bdc2
commit
3bd7d7d76a
@ -143,7 +143,6 @@ if ($plugin_data) {
|
||||
}
|
||||
}
|
||||
|
||||
if $plugin_data['alerting_mode'] {
|
||||
# Infrastructure Alerting
|
||||
$lma_infra_alerting = hiera('lma_infrastructure_alerting', {})
|
||||
$infra_alerting_nodes = get_nodes_hash_by_roles($network_metadata, ['infrastructure_alerting', 'primary-infrastructure_alerting'])
|
||||
@ -151,18 +150,15 @@ if ($plugin_data) {
|
||||
$infra_vip_name = 'infrastructure_alerting_mgmt_vip'
|
||||
if $network_metadata['vips'][$infra_vip_name] {
|
||||
$nagios_server = $network_metadata['vips'][$infra_vip_name]['ipaddr']
|
||||
$nagios_password = $lma_infra_alerting['nagios_password']
|
||||
} else {
|
||||
$nagios_server = undef
|
||||
}
|
||||
$nagios_password = $lma_infra_alerting['nagios_password']
|
||||
if $infra_alerting_nodes_count > 0 or $nagios_server {
|
||||
if $infra_alerting_nodes_count > 0 and $nagios_server {
|
||||
$nagios_is_deployed = true
|
||||
} else {
|
||||
$nagios_is_deployed = false
|
||||
}
|
||||
} else {
|
||||
$nagios_is_deployed = false
|
||||
}
|
||||
|
||||
$hiera_file = '/etc/hiera/plugins/lma_collector.yaml'
|
||||
|
||||
|
@ -87,9 +87,3 @@ attributes:
|
||||
type: "password"
|
||||
regex: *not_empty_parameter
|
||||
restrictions: *disable_influxdb_parameters
|
||||
|
||||
alerting_mode:
|
||||
type: "checkbox"
|
||||
weight: 90
|
||||
value: true
|
||||
label: "Alerts sent to the StackLight Infrastructure Alerting plugin (Nagios) if deployed."
|
||||
|
Loading…
Reference in New Issue
Block a user