Browse Source

Support monitoring for bond interfaces via telegraf

Change-Id: I963dbca50f9ce9f7ad4913640e18833039b68992
Partial-Bug: PROD-16264
pull/148/merge
Mateusz Matuszkowiak 6 years ago
parent
commit
7399519b94
2 changed files with 20 additions and 0 deletions
  1. +9
    -0
      linux/files/telegraf.conf
  2. +11
    -0
      linux/meta/telegraf.yml

+ 9
- 0
linux/files/telegraf.conf View File

[[inputs.bond]]
{%- include 'telegraf/files/input/_common.conf' %}
{%- if values.bond_interfaces is defined %}
bond_interfaces = {{ values.bond_interfaces | json }}
{%- endif %}
{%- if values.host_proc is defined %}
host_proc = "{{ values.host_proc | json }}"
{%- endif %}
{%- include 'telegraf/files/input/_filters.conf' %}

+ 11
- 0
linux/meta/telegraf.yml View File

{%- from "linux/map.jinja" import monitoring with context %}
agent: agent:
input: input:
cpu: cpu:
swap: swap:
system: system:
linux_sysctl_fs: linux_sysctl_fs:
{%- if monitoring.bond_status.interfaces is defined and monitoring.bond_status.interfaces %}
bond:
template: linux/files/telegraf.conf
{%- if monitoring.bond_status.interfaces is list %}
bond_interfaces: {{ monitoring.bond_status.interfaces }}
{%- endif %}
{%- if monitoring.bond_status.host_proc is defined %}
host_proc: {{ monitoring.bond_status.host_proc }}
{%- endif %}
{%- endif %}

Loading…
Cancel
Save