Configure telegraf services depending on node type

Related-PROD: PROD-21204

Change-Id: I96fc50efdd11f826817b72b0e9dfea8c9d29ef71
diff --git a/opencontrail/meta/telegraf.yml b/opencontrail/meta/telegraf.yml
index 904d72c..69a01ac 100644
--- a/opencontrail/meta/telegraf.yml
+++ b/opencontrail/meta/telegraf.yml
@@ -129,6 +129,15 @@
   {%- if database is defined and database.get('enabled', False) %}
     zookeeper:
       address: "{{ database.bind.host|replace('0.0.0.0', '127.0.0.1') }}"
+      {%- if version < 4.0 %}
+      port: 2181
+      {%- else %}
+      {%- if database.get('type') == 'control' or database.get('type') == 'cluster' %}
+      port: 2181
+      {%- elif database.get('type') == 'analytics' %}
+      port: 2182
+      {%- endif %}
+      {%- endif %}
   {%- endif %}
   {%- if control.get('enabled', False) or compute.get('enabled', False) %}
     contrail: