Merge "Remove SMART alerts"
diff --git a/linux/meta/prometheus.yml b/linux/meta/prometheus.yml
index a359122..47abd64 100644
--- a/linux/meta/prometheus.yml
+++ b/linux/meta/prometheus.yml
@@ -36,11 +36,14 @@
annotations:
summary: "{%- endraw %}{{ cpu_usage_threshold }}{%- raw %}% CPU usage"
description: "The average CPU usage on the {{ $labels.host }} node is {{ $value }}% for 2 minutes."
- SystemLoadTooHighWarning:
{%- endraw %}
+ {% if not ([
+ salt['pillar.get']('nova:compute:enabled', False)
+ ]|select('equalto', True)|list) %} {# glorified `not any(<iterable>)` condition #}
+ SystemLoadTooHighWarning:
{%- set load_threshold = monitoring.system_load_threshold.warn|float %}
if: >-
- system_load15 / system_n_cpus > {{ load_threshold }}
+ system_load15{host!~".*cmp[0-9]+"} / system_n_cpus > {{ load_threshold }}
{%- raw %}
for: 5m
labels:
@@ -49,11 +52,11 @@
annotations:
summary: "System load is {%- endraw %}{{ load_threshold }}{%- raw %}"
description: "The system load per CPU on the {{ $labels.host }} node is {{ $value }} for 5 minutes."
- SystemLoadTooHighCritical:
{%- endraw %}
+ SystemLoadTooHighCritical:
{%- set load_threshold = monitoring.system_load_threshold.crit|float %}
if: >-
- system_load15 / system_n_cpus > {{ load_threshold }}
+ system_load15{host!~".*cmp[0-9]+"} / system_n_cpus > {{ load_threshold }}
{%- raw %}
for: 5m
labels:
@@ -62,8 +65,9 @@
annotations:
summary: "System load is {%- endraw %}{{ load_threshold }}{%- raw %}"
description: "The system load per CPU on the {{ $labels.host }} node is {{ $value }} for 5 minutes."
- SystemDiskFullWarning:
{%- endraw %}
+ {% endif %}
+ SystemDiskFullWarning:
{%- set disk_threshold = monitoring.disk_usage_percentage.warn|float %}
if: >-
disk_used_percent >= {{ disk_threshold }}
diff --git a/linux/meta/telegraf.yml b/linux/meta/telegraf.yml
index 9a25b69..1aee1d5 100644
--- a/linux/meta/telegraf.yml
+++ b/linux/meta/telegraf.yml
@@ -24,7 +24,12 @@
- overlay
diskio:
kernel:
+{%- set net_ifaces = [] %}
+{%- for iface_name, iface_data in network.interface.items() %}
+ {%- do net_ifaces.append(iface_data.get('name', iface_name)) %}
+{%- endfor %}
net:
+ interfaces: {{ net_ifaces|json }}
mem:
nstat:
fieldpass: