Merge "Disable collection of IF-MAP metric"
diff --git a/opencontrail/files/telegraf.conf b/opencontrail/files/telegraf.conf
new file mode 100644
index 0000000..a1faefa
--- /dev/null
+++ b/opencontrail/files/telegraf.conf
@@ -0,0 +1,19 @@
+[[inputs.contrail]]
+{%- if values.interval is defined %}
+ interval = "{{ values.interval }}"
+{%- endif %}
+ ifmap_count = {{ values.ifmap_count|default("false")|lower }}
+{%- for tag_name, tag_value in values.get('checks', {}).iteritems() %}
+ {%- if tag_value.url is defined and tag_value.xml_element is defined %}
+ [[inputs.contrail.checks]]
+ url = "{{ tag_value.url }}"
+ xml_element = "{{ tag_value.xml_element }}"
+ name = "{{ tag_name }}"
+ {%- if tag_value.result_type is defined %}
+ result_type = "{{ tag_value.result_type }}"
+ {%- endif %}
+ {%- if tag_value.state is defined %}
+ state = "{{ tag_value.state }}"
+ {%- endif %}
+ {%- endif %}
+{%- endfor %}
diff --git a/opencontrail/meta/telegraf.yml b/opencontrail/meta/telegraf.yml
index e43dc93..51f7a40 100644
--- a/opencontrail/meta/telegraf.yml
+++ b/opencontrail/meta/telegraf.yml
@@ -111,8 +111,11 @@
{%- endif %}
{%- if control.get('enabled', False) or compute.get('enabled', False) %}
contrail:
+ template: opencontrail/files/telegraf.conf
{%- if control.get('enabled', False) %}
- ifmap_count: "true"
+ # ifmap_count is always disabled because it puts too much load on the IF-MAP server
+ # and the metric is pretty much useless.
+ ifmap_count: "false"
{%- endif %}
checks:
{%- if control.get('enabled', False) %}