Extend OpenContrail salt-formula by disable_stats_collection option
Add support of disable_stats_collection configuration option for
vrouter agent to control statistics gathering (info about VMIs and VNs)
and reporting it to Analytics
Related-PROD: PROD-35795
Change-Id: I27051056911dd1215c2b46b6ee3ac320a3d80fa7
diff --git a/README.rst b/README.rst
index 02c4da6..128e69f 100644
--- a/README.rst
+++ b/README.rst
@@ -1636,6 +1636,23 @@
flow_cache_timeout: 180
....
+Disable stats collection
+---------------------------------------------
+
+This option controlls gathering and sending statistics, related to VMIs
+and VNs, by vrouter agent to Analytics. If statistics should be gathered
+and sent - set this option to False. If statistics gathering should be
+disabled - set it to True.
+
+.. code-block:: yaml
+
+ opencontrail:
+ ....
+ compute
+ ....
+ disable_stats_collection: True
+ ....
+
Usage
=====
diff --git a/metadata/service/compute/cluster.yml b/metadata/service/compute/cluster.yml
index a3729e8..0557b26 100644
--- a/metadata/service/compute/cluster.yml
+++ b/metadata/service/compute/cluster.yml
@@ -8,6 +8,7 @@
enabled: True
version: ${_param:opencontrail_version}
disable_flow_collection: False
+ disable_stats_collection: True
bind:
address: ${_param:single_address}
interface:
diff --git a/metadata/service/compute/single.yml b/metadata/service/compute/single.yml
index 115ef4c..5b8ee77 100644
--- a/metadata/service/compute/single.yml
+++ b/metadata/service/compute/single.yml
@@ -7,6 +7,7 @@
compute:
enabled: true
version: ${_param:opencontrail_version}
+ disable_stats_collection: True
interface:
address: ${_param:opencontrail_compute_address}
dev: ${_param:opencontrail_compute_iface}
diff --git a/opencontrail/files/4.0/contrail-vrouter-agent.conf b/opencontrail/files/4.0/contrail-vrouter-agent.conf
index 8b376f1..ae55540 100644
--- a/opencontrail/files/4.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/4.0/contrail-vrouter-agent.conf
@@ -120,6 +120,9 @@
gateway_mode={{ compute.gateway_mode }}
{%- endif %}
+# Enable/Disable stats collection by vrouter agent
+disable_stats_collection={{ compute.get('disable_stats_collection', 'true')|lower }}
+
[SANDESH]
# sandesh_ssl_enable=false
# introspect_ssl_enable=false