| {%- from "linux/map.jinja" import network with context %} |
| agent: |
| input: |
| {%- if grains.get('virtual', None) == 'physical' %} |
| smart: |
| template: linux/files/smart_telegraf.conf |
| path: "/usr/sbin/smartctl" |
| {%- endif %} |
| cpu: |
| percpu: false |
| totalcpu: true |
| disk: |
| ignore_fs: |
| - aufs |
| - rootfs |
| - sysfs |
| - proc |
| - devtmpfs |
| - devpts |
| - tmpfs |
| - fusectl |
| - cgroup |
| - overlay |
| diskio: |
| kernel: |
| net: |
| mem: |
| nstat: |
| fieldpass: |
| - packet_drop |
| - time_squeeze |
| processes: |
| swap: |
| system: |
| procstat: |
| process: |
| sshd: |
| exe: sshd |
| cron: |
| exe: cron |
| {%- if network.bridge == 'openvswitch' %} |
| ovs-vswitchd: |
| exe: ovs-vswitchd |
| {%- endif %} |
| linux_sysctl_fs: |
| {%- set bond_interfaces = [] %} |
| {%- for interface_name, interface in network.interface.items() %} |
| {%- if interface.type == 'bond' and interface.enabled == True %} |
| {%- do bond_interfaces.append(interface_name) %} |
| {%- endif %} |
| {%- endfor %} |
| {%- if bond_interfaces|length > 0 %} |
| bond: |
| template: linux/files/telegraf.conf |
| {%- endif %} |