Merge "IPMI SNMP plugin enablement against telegraf"
diff --git a/telegraf/files/input/ipmi_sensor.conf b/telegraf/files/input/ipmi_sensor.conf
new file mode 100644
index 0000000..22a8f70
--- /dev/null
+++ b/telegraf/files/input/ipmi_sensor.conf
@@ -0,0 +1,20 @@
+[[inputs.ipmi_sensor]]
+{%- include 'telegraf/files/input/_common.conf' %}
+
+{%- if values.path is defined %}
+path = "{{ values.path }}"
+{%- endif %}
+{%- if values.privilege is defined %}
+privilege = "{{ values.privilege }}"
+{%- endif %}
+{%- if values.servers is defined %}
+servers = {{ values.servers }}
+{%- endif %}
+{%- if values.timeout is defined %}
+timeout = "{{ values.timeout }}"
+{%- endif %}
+{%- if values.metric_version is defined %}
+metric_version = {{ values.metric_version }}
+{%- endif %}
+
+{%- include 'telegraf/files/input/_filters.conf' %}
diff --git a/telegraf/files/input/snmp.conf b/telegraf/files/input/snmp.conf
new file mode 100644
index 0000000..5b11e7a
--- /dev/null
+++ b/telegraf/files/input/snmp.conf
@@ -0,0 +1,99 @@
+[[inputs.snmp]]
+{%- include 'telegraf/files/input/_common.conf' %}
+
+agents = {{ values.agents }}
+{%- if values.version is defined %}
+version = {{ values.version }}
+{%- endif %}
+{%- if values.name is defined %}
+name = "{{ values.name }}"
+{%- endif %}
+{%- if values.community is defined %}
+community = "{{ values.community }}"
+{%- endif %}
+{%- if values.max_repetitions is defined %}
+max_repetitions = {{ values.max_repetitions }}
+{%- endif %}
+{%- if values.sec_name is defined %}
+sec_name = "{{ values.sec_name }}"
+{%- endif %}
+{%- if values.auth_protocol is defined %}
+auth_protocol = "{{ values.auth_protocol }}"
+{%- endif %}
+{%- if values.auth_password is defined %}
+auth_password = "{{ values.auth_password }}"
+{%- endif %}
+{%- if values.sec_level is defined %}
+sec_level = "{{ values.sec_level }}"
+{%- endif %}
+{%- if values.context_name is defined %}
+context_name = "{{ values.context_name }}"
+{%- endif %}
+{%- if values.priv_protocol is defined %}
+priv_protocol = "{{ values.priv_protocol }}"
+{%- endif %}
+{%- if values.priv_password is defined %}
+priv_password = "{{ values.priv_password }}"
+{%- endif %}
+
+{%- include 'telegraf/files/input/_filters.conf' %}
+
+{%- if values.fields is defined %}
+  {%- for field in values.fields %}
+  [[inputs.snmp.field]]
+  oid = "{{ field.oid }}"
+    {%- if field.name is defined %}
+  name = "{{ field.name }}"
+    {%- endif %}
+    {%- if field.oid_index_suffix is defined %}
+  oid_index_suffix = "{{ field.oid_index_suffix }}"
+    {%- endif %}
+    {%- if field.oid_index_length is defined %}
+  oid_index_length = {{ field.oid_index_length }}
+    {%- endif %}
+    {%- if field.is_tag is defined %}
+  is_tag = {{ field.is_tag }}
+    {%- endif %}
+    {%- if field.conversion is defined %}
+  conversion = "{{ field.conversion }}"
+    {%- endif %}
+  {%- endfor %}
+{%- endif %}
+
+{%- if values.tables is defined %}
+  {%- for table in values.tables %}
+  [[inputs.snmp.table]]
+    {%- if table.name is defined %}
+  name = "{{ table.name }}"
+    {%- endif %}
+    {%- if table.oid is defined %}
+  oid = "{{ table.oid }}"
+    {%- endif %}
+    {%- if table.inherit_tags is defined %}
+  inherit_tags = "{{ table.inherit_tags }}"
+    {%- endif %}
+    {%- if table.index_as_tag is defined %}
+  index_as_tag = {{ table.index_as_tag }}
+    {%- endif %}
+    {%- for field in table.fields %}
+    [[inputs.snmp.table.field]]
+    oid = "{{ field.oid }}"
+      {%- if field.name is defined %}
+    name = "{{ field.name }}"
+      {%- endif %}
+      {%- if field.oid_index_suffix is defined %}
+    oid_index_suffix = "{{ field.oid_index_suffix }}"
+      {%- endif %}
+      {%- if field.oid_index_length is defined %}
+    oid_index_length = {{ field.oid_index_length }}
+      {%- endif %}
+      {%- if field.is_tag is defined %}
+    is_tag = {{ field.is_tag }}
+      {%- endif %}
+      {%- if field.conversion is defined %}
+    conversion = "{{ field.conversion }}"
+      {%- endif %}
+    {%- endfor %}
+  {%- endfor %}
+{%- endif %}
+