blob: dc349b53d5aa4f5df657a79fd99f16ba5b7b5c4c [file] [log] [blame]
Aleš Komárek01d9f272016-11-25 17:20:12 +01001{%- from "collectd/map.jinja" import client with context %}
2{%- from "collectd/map.jinja" import remote_client with context %}
3local_plugin:
Ales Komarekfc309cd2015-12-03 22:05:30 +01004 collectd_processes:
5 plugin: processes
Ales Komarekfc309cd2015-12-03 22:05:30 +01006 template: collectd/files/collectd_processes.conf
7 process:
Aleš Komárek01d9f272016-11-25 17:20:12 +01008 {%- if pillar.collectd.get('client', {}).get('enabled', False) %}
9 collectd:
10 match: '(collectd.*{{ client.config_file }}|collectd$)'
11 {%- endif %}
12 {%- if pillar.collectd.get('remote_client', {}).get('enabled', False) %}
13 remote_collectd:
14 match: 'collectd.*{{ remote_client.config_file }}'
15 {%- endif %}
16 {%- if pillar.collectd.get('client', {}).get('check', {}).curl is defined %}
Ales Komarek4550e8c2016-09-28 22:20:28 +020017 collectd_curl:
18 plugin: curl
Ales Komarek2675e842016-10-05 00:10:44 +020019 execution: local
Ales Komarek4550e8c2016-09-28 22:20:28 +020020 template: collectd/files/collectd_curl.conf
21 data: {{ pillar.collectd.client.check.curl|yaml }}
Aleš Komárek01d9f272016-11-25 17:20:12 +010022 {%- endif %}
23 {%- if pillar.collectd.get('client', {}).get('check', {}).ping is defined %}
Ales Komarek4550e8c2016-09-28 22:20:28 +020024 collectd_ping:
25 plugin: ping
Ales Komarek2675e842016-10-05 00:10:44 +020026 execution: local
Ales Komarek4550e8c2016-09-28 22:20:28 +020027 template: collectd/files/collectd_ping.conf
28 data: {{ pillar.collectd.client.check.ping|yaml }}
Aleš Komárek01d9f272016-11-25 17:20:12 +010029 {%- endif %}
30 {%- if pillar.get('external', {}).network_device is defined %}
Ales Komarek87824a72015-12-02 13:41:45 +010031 collectd_network_device:
32 plugin: snmp
Ales Komarek2675e842016-10-05 00:10:44 +020033 execution: local
Ales Komarekfc309cd2015-12-03 22:05:30 +010034 template: collectd/files/collectd_snmp.conf
Ales Komarek87824a72015-12-02 13:41:45 +010035 data:
36 std_traffic:
37 type: if_octets
38 table: true
39 instance: 1.3.6.1.2.1.31.1.1.1.1
40 values:
41 - 1.3.6.1.2.1.31.1.1.1.6
42 - 1.3.6.1.2.1.31.1.1.1.10
43 std_rate:
44 type: if_packets
45 table: true
46 instance: 1.3.6.1.2.1.31.1.1.1.1
47 values:
48 - 1.3.6.1.2.1.31.1.1.1.7
49 - 1.3.6.1.2.1.31.1.1.1.11
Ales Komarek2675e842016-10-05 00:10:44 +020050 host: {{ pillar.external.network_device|yaml }}
Aleš Komárek01d9f272016-11-25 17:20:12 +010051 {%- endif %}
52 collectd_check_local_endpoint:
53 plugin: python
54 execution: remote
55 template: collectd/files/collectd_check_local_endpoint.conf
56 endpoint: {}