Browse Source

Merge "Support monitoring for bond interfaces via telegraf"

pull/148/merge
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

@@ -0,0 +1,9 @@
[[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

@@ -1,3 +1,4 @@
{%- from "linux/map.jinja" import monitoring with context %}
agent:
input:
cpu:
@@ -23,3 +24,13 @@ agent:
swap:
system:
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