Browse Source

Add bond member status monitoring.

Pillar values:
linux.monitoring.bond_status.interfaces = [ 'bond0', 'all', 'etc' ]

Leave bond_status.interfaces undefined to disable (default).

Depends-On: Ia07d4c473bf64d98170f51599caaedb46645ede3

Change-Id: I62a7d59251d37cb6c7fc7b761f63a5599930f1dc
pull/122/head
Jaymes Mosher 7 years ago
parent
commit
a2c295dc68
3 changed files with 36 additions and 0 deletions
  1. +7
    -0
      linux/files/collectd_bond_status.conf
  2. +10
    -0
      linux/meta/collectd.yml
  3. +19
    -0
      linux/meta/heka.yml

+ 7
- 0
linux/files/collectd_bond_status.conf View File

Import "bond_status"

<Module "bond_status">
{%- for interface in plugin.get('interfaces', []) %}
Bond "{{ interface }}"
{%- endfor %}
</Module>

+ 10
- 0
linux/meta/collectd.yml View File

{%- from "linux/map.jinja" import monitoring with context %}
local_plugin: local_plugin:
linux_network_netlink: linux_network_netlink:
plugin: netlink plugin: netlink
plugin: swap plugin: swap
template: linux/files/collectd_swap.conf template: linux/files/collectd_swap.conf
report_bytes: True report_bytes: True
{%- if monitoring.bond_status.interfaces is defined and monitoring.bond_status.interfaces is list %}
linux_bond_status:
plugin: python
template: linux/files/collectd_bond_status.conf
interfaces:
{%- for interface in monitoring.bond_status.interfaces %}
- {{ interface }}
{%- endfor %}
{%- endif %}

+ 19
- 0
linux/meta/heka.yml View File

{%- from "linux/map.jinja" import monitoring with context %}
metric_collector: metric_collector:
trigger: trigger:
linux_system_cpu_critical: linux_system_cpu_critical:
window: 60 window: 60
periods: 0 periods: 0
function: max function: max
{%- if monitoring.bond_status.interfaces is defined and monitoring.bond_status.interfaces is list %}
linux_bond_status_critical:
description: Bond members are down.
rules:
- function: last
metric: bond_status_links_down
periods: 0
relational_operator: '>'
threshold: 0
window: 120
severity: critical
{%- endif %}
alarm: alarm:
linux_system_cpu: linux_system_cpu:
alerting: enabled alerting: enabled
alerting: enabled_with_notification alerting: enabled_with_notification
triggers: triggers:
- linux_system_hdd_errors_critical - linux_system_hdd_errors_critical
{%- if monitoring.bond_status.interfaces is defined and monitoring.bond_status.interfaces is list %}
linux_bond_status:
alerting: enabled
triggers:
- linux_bond_status_critical
{%- endif %}

Loading…
Cancel
Save