Browse Source

Merge "Support monitoring for bond interfaces via telegraf"

atp-proxy
mcp-jenkins 6 years ago
parent
commit
043442d9ee
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