| {%- from "collectd/map.jinja" import client with context %} |
| {%- from "collectd/map.jinja" import remote_client with context %} |
| local_plugin: |
| collectd_processes: |
| plugin: processes |
| template: collectd/files/collectd_processes.conf |
| process: |
| {%- if pillar.collectd.get('client', {}).get('enabled', False) %} |
| collectd: |
| match: '(collectd.*{{ client.config_file }}|collectd$)' |
| {%- endif %} |
| {%- if pillar.collectd.get('remote_client', {}).get('enabled', False) %} |
| remote_collectd: |
| match: 'collectd.*{{ remote_client.config_file }}' |
| {%- endif %} |
| {%- if pillar.collectd.get('client', {}).get('check', {}).curl is defined %} |
| collectd_curl: |
| plugin: curl |
| execution: local |
| template: collectd/files/collectd_curl.conf |
| data: {{ pillar.collectd.client.check.curl|yaml }} |
| {%- endif %} |
| {%- if pillar.collectd.get('client', {}).get('check', {}).ping is defined %} |
| collectd_ping: |
| plugin: ping |
| execution: local |
| template: collectd/files/collectd_ping.conf |
| data: {{ pillar.collectd.client.check.ping|yaml }} |
| {%- endif %} |
| {%- if pillar.get('external', {}).network_device is defined %} |
| collectd_network_device: |
| plugin: snmp |
| execution: local |
| template: collectd/files/collectd_snmp.conf |
| data: |
| std_traffic: |
| type: if_octets |
| table: true |
| instance: 1.3.6.1.2.1.31.1.1.1.1 |
| values: |
| - 1.3.6.1.2.1.31.1.1.1.6 |
| - 1.3.6.1.2.1.31.1.1.1.10 |
| std_rate: |
| type: if_packets |
| table: true |
| instance: 1.3.6.1.2.1.31.1.1.1.1 |
| values: |
| - 1.3.6.1.2.1.31.1.1.1.7 |
| - 1.3.6.1.2.1.31.1.1.1.11 |
| host: {{ pillar.external.network_device|yaml }} |
| {%- endif %} |
| collectd_check_local_endpoint: |
| plugin: python |
| execution: remote |
| template: collectd/files/collectd_check_local_endpoint.conf |
| endpoint: {} |