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
|
# Infrastructure Alerting
|
||||||
$lma_infra_alerting = hiera('lma_infrastructure_alerting', {})
|
$lma_infra_alerting = hiera('lma_infrastructure_alerting', {})
|
||||||
$infra_alerting_nodes = get_nodes_hash_by_roles($network_metadata, ['infrastructure_alerting', 'primary-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'
|
$infra_vip_name = 'infrastructure_alerting_mgmt_vip'
|
||||||
if $network_metadata['vips'][$infra_vip_name] {
|
if $network_metadata['vips'][$infra_vip_name] {
|
||||||
$nagios_server = $network_metadata['vips'][$infra_vip_name]['ipaddr']
|
$nagios_server = $network_metadata['vips'][$infra_vip_name]['ipaddr']
|
||||||
|
$nagios_password = $lma_infra_alerting['nagios_password']
|
||||||
} else {
|
} else {
|
||||||
$nagios_server = undef
|
$nagios_server = undef
|
||||||
}
|
}
|
||||||
$nagios_password = $lma_infra_alerting['nagios_password']
|
if $infra_alerting_nodes_count > 0 and $nagios_server {
|
||||||
if $infra_alerting_nodes_count > 0 or $nagios_server {
|
|
||||||
$nagios_is_deployed = true
|
$nagios_is_deployed = true
|
||||||
} else {
|
} else {
|
||||||
$nagios_is_deployed = false
|
$nagios_is_deployed = false
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$nagios_is_deployed = false
|
|
||||||
}
|
|
||||||
|
|
||||||
$hiera_file = '/etc/hiera/plugins/lma_collector.yaml'
|
$hiera_file = '/etc/hiera/plugins/lma_collector.yaml'
|
||||||
|
|
||||||
|
@ -87,9 +87,3 @@ attributes:
|
|||||||
type: "password"
|
type: "password"
|
||||||
regex: *not_empty_parameter
|
regex: *not_empty_parameter
|
||||||
restrictions: *disable_influxdb_parameters
|
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