Fix for uniformization of metric names

Change-Id: I2b1e542096a0e952d75465a16677a34038639864
diff --git a/opencontrail/files/collectd_cassandra_jmx.conf b/opencontrail/files/collectd_cassandra_jmx.conf
index b176754..a074afd 100644
--- a/opencontrail/files/collectd_cassandra_jmx.conf
+++ b/opencontrail/files/collectd_cassandra_jmx.conf
@@ -172,7 +172,7 @@
       </Value>
       <Value>
         Type "memory"
-        InstancePrefix "memory-heap_usage_max"
+        InstancePrefix "heap_usage_max"
         Table false
         Attribute "HeapMemoryUsage.max"
       </Value>
diff --git a/opencontrail/files/grafana_dashboards/cassandra_influxdb.json b/opencontrail/files/grafana_dashboards/cassandra_influxdb.json
index 3549817..8585379 100644
--- a/opencontrail/files/grafana_dashboards/cassandra_influxdb.json
+++ b/opencontrail/files/grafana_dashboards/cassandra_influxdb.json
@@ -1642,9 +1642,9 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "GenericJMX_cassandra_memory_memory-heap_usage_max",
+              "measurement": "GenericJMX_cassandra_memory_heap_usage_max",
               "policy": "default",
-              "query": "SELECT mean(\"value\") FROM \"memory-heap_usage_max\" WHERE $timeFilter GROUP BY time($interval), \"hostname\" fill(null)",
+              "query": "SELECT mean(\"value\") FROM \"heap_usage_max\" WHERE $timeFilter GROUP BY time($interval), \"hostname\" fill(null)",
               "rawQuery": false,
               "refId": "A",
               "resultFormat": "time_series",
@@ -1963,5 +1963,5 @@
   },
   "timezone": "browser",
   "title": "Cassandra",
-  "version": 13
+  "version": 14
 }
\ No newline at end of file
diff --git a/opencontrail/files/grafana_dashboards/contrail_influxdb.json b/opencontrail/files/grafana_dashboards/contrail_influxdb.json
index 4499063..8f5be5e 100644
--- a/opencontrail/files/grafana_dashboards/contrail_influxdb.json
+++ b/opencontrail/files/grafana_dashboards/contrail_influxdb.json
@@ -4496,10 +4496,10 @@
       "panels": [
         {
           "aliasColors": {
-            "bgp-session-number-down.last {hostname: node-11}": "#508642",
-            "bgp-session-number-down.last {hostname: node-8}": "#D683CE",
-            "bgp-session-number-up.last {hostname: node-11}": "#F29191",
-            "bgp-session-number-up.last {hostname: node-8}": "#5195CE"
+            "bgp_session_number_down.last {hostname: node-11}": "#508642",
+            "bgp_session_number_down.last {hostname: node-8}": "#D683CE",
+            "bgp_session_number_up.last {hostname: node-11}": "#F29191",
+            "bgp_session_number_up.last {hostname: node-8}": "#5195CE"
           },
           "bars": false,
           "datasource": null,
@@ -4563,7 +4563,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_bgp-session-up-count",
+              "measurement": "contrail_bgp_session_up_count",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -4612,7 +4612,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_bgp-session-down-count",
+              "measurement": "contrail_bgp_session_down_count",
               "policy": "default",
               "refId": "B",
               "resultFormat": "time_series",
@@ -4742,7 +4742,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-dns-xmpp",
+              "measurement": "contrail_vrouter_dns_xmpp",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -4791,7 +4791,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-xmpp",
+              "measurement": "contrail_vrouter_xmpp",
               "policy": "default",
               "refId": "B",
               "resultFormat": "time_series",
@@ -4913,7 +4913,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-lls",
+              "measurement": "contrail_vrouter_lls",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5036,7 +5036,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_xmpp-session-up-count",
+              "measurement": "contrail_xmpp_session_up_count",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5085,7 +5085,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_xmpp-session-down-count",
+              "measurement": "contrail_xmpp_session_down_count",
               "policy": "default",
               "refId": "B",
               "resultFormat": "time_series",
@@ -5154,7 +5154,7 @@
       "panels": [
         {
           "aliasColors": {
-            "vrouter-flows-active.mean {hostname: node-6}": "#447EBC"
+            "vrouter_flows_active.mean {hostname: node-6}": "#447EBC"
           },
           "bars": false,
           "datasource": null,
@@ -5215,7 +5215,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-active",
+              "measurement": "contrail_vrouter_flows_active",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5276,7 +5276,7 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-aged.mean {hostname: node-6}": "#705DA0"
+            "vrouter_flows_aged.mean {hostname: node-6}": "#705DA0"
           },
           "bars": false,
           "datasource": null,
@@ -5337,7 +5337,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-aged",
+              "measurement": "contrail_vrouter_flows_aged",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5398,7 +5398,7 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C"
           },
           "bars": false,
           "datasource": null,
@@ -5459,7 +5459,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-composite-invalid-interface",
+              "measurement": "contrail_vrouter_flows_composite_invalid_interface",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5520,8 +5520,8 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300"
           },
           "bars": false,
           "datasource": null,
@@ -5582,7 +5582,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-created",
+              "measurement": "contrail_vrouter_flows_created",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5643,9 +5643,9 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7"
           },
           "bars": false,
           "datasource": null,
@@ -5706,7 +5706,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-discard",
+              "measurement": "contrail_vrouter_flows_discard",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5767,10 +5767,10 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7",
-            "vrouter-flows-drop.mean {hostname: node-6}": "#EA6460"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7",
+            "vrouter_flows_drop.mean {hostname: node-6}": "#EA6460"
           },
           "bars": false,
           "datasource": null,
@@ -5831,7 +5831,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-flow-action-drop",
+              "measurement": "contrail_vrouter_flows_flow_action_drop",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -5892,11 +5892,11 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7",
-            "vrouter-flows-drop.mean {hostname: node-6}": "#EA6460",
-            "vrouter-flows-flow-queue-limit-exceeded.mean {hostname: node-6}": "#967302"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7",
+            "vrouter_flows_drop.mean {hostname: node-6}": "#EA6460",
+            "vrouter_flows_flow_queue_limit_exceeded.mean {hostname: node-6}": "#967302"
           },
           "bars": false,
           "datasource": null,
@@ -5956,7 +5956,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-flow-queue-limit-exceeded",
+              "measurement": "contrail_vrouter_flows_flow_queue_limit_exceeded",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -6017,11 +6017,11 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7",
-            "vrouter-flows-drop.mean {hostname: node-6}": "#EA6460",
-            "vrouter-flows-flow-table-full.mean {hostname: node-6}": "#D683CE"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7",
+            "vrouter_flows_drop.mean {hostname: node-6}": "#EA6460",
+            "vrouter_flows_flow_table_full.mean {hostname: node-6}": "#D683CE"
           },
           "bars": false,
           "datasource": null,
@@ -6081,7 +6081,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-flow-table-full",
+              "measurement": "contrail_vrouter_flows_flow_table_full",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -6142,12 +6142,12 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7",
-            "vrouter-flows-drop.mean {hostname: node-6}": "#EA6460",
-            "vrouter-flows-flow-table-full.mean {hostname: node-6}": "#D683CE",
-            "vrouter-flows-frag-err.mean {hostname: node-6}": "#614D93"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7",
+            "vrouter_flows_drop.mean {hostname: node-6}": "#EA6460",
+            "vrouter_flows_flow_table_full.mean {hostname: node-6}": "#D683CE",
+            "vrouter_flows_frag_err.mean {hostname: node-6}": "#614D93"
           },
           "bars": false,
           "datasource": null,
@@ -6207,7 +6207,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-frag-err",
+              "measurement": "contrail_vrouter_flows_frag_err",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -6268,13 +6268,13 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7",
-            "vrouter-flows-drop.mean {hostname: node-6}": "#EA6460",
-            "vrouter-flows-flow-table-full.mean {hostname: node-6}": "#D683CE",
-            "vrouter-flows-frag-err.mean {hostname: node-6}": "#614D93",
-            "vrouter-flows-invalid-label.mean {hostname: node-6}": "#F9BA8F"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7",
+            "vrouter_flows_drop.mean {hostname: node-6}": "#EA6460",
+            "vrouter_flows_flow_table_full.mean {hostname: node-6}": "#D683CE",
+            "vrouter_flows_frag_err.mean {hostname: node-6}": "#614D93",
+            "vrouter_flows_invalid_label.mean {hostname: node-6}": "#F9BA8F"
           },
           "bars": false,
           "datasource": null,
@@ -6334,7 +6334,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-invalid-label",
+              "measurement": "contrail_vrouter_flows_invalid_label",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -6395,14 +6395,14 @@
         },
         {
           "aliasColors": {
-            "vrouter-flows-composite-invalid-interface.mean {hostname: node-6}": "#0A437C",
-            "vrouter-flows-created.mean {hostname: node-6}": "#CCA300",
-            "vrouter-flows-discard.mean {hostname: node-6}": "#806EB7",
-            "vrouter-flows-drop.mean {hostname: node-6}": "#EA6460",
-            "vrouter-flows-flow-table-full.mean {hostname: node-6}": "#D683CE",
-            "vrouter-flows-frag-err.mean {hostname: node-6}": "#614D93",
-            "vrouter-flows-invalid-label.mean {hostname: node-6}": "#F9BA8F",
-            "vrouter-flows-invalid-nh.mean {hostname: node-6}": "#962D82"
+            "vrouter_flows_composite_invalid_interface.mean {hostname: node-6}": "#0A437C",
+            "vrouter_flows_created.mean {hostname: node-6}": "#CCA300",
+            "vrouter_flows_discard.mean {hostname: node-6}": "#806EB7",
+            "vrouter_flows_drop.mean {hostname: node-6}": "#EA6460",
+            "vrouter_flows_flow_table_full.mean {hostname: node-6}": "#D683CE",
+            "vrouter_flows_frag_err.mean {hostname: node-6}": "#614D93",
+            "vrouter_flows_invalid_label.mean {hostname: node-6}": "#F9BA8F",
+            "vrouter_flows_invalid_nh.mean {hostname: node-6}": "#962D82"
           },
           "bars": false,
           "datasource": null,
@@ -6462,7 +6462,7 @@
                   "type": "fill"
                 }
               ],
-              "measurement": "contrail_vrouter-flows-invalid-nh",
+              "measurement": "contrail_vrouter_flows_invalid_nh",
               "policy": "default",
               "refId": "A",
               "resultFormat": "time_series",
@@ -6580,5 +6580,5 @@
   },
   "timezone": "browser",
   "title": "OpenContrail",
-  "version": 17
-}
+  "version": 18
+}
\ No newline at end of file
diff --git a/opencontrail/meta/collectd.yml b/opencontrail/meta/collectd.yml
index 1faf907..846450c 100644
--- a/opencontrail/meta/collectd.yml
+++ b/opencontrail/meta/collectd.yml
@@ -13,27 +13,27 @@
     plugin: python
     template: opencontrail/files/collectd_contrail_apis.conf
     api_checks:
-      bgp-session-count:
+      bgp_session_count:
         url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=bgp"
         xml_element: "ShowNeighborStatisticsResp"
         result_type: "count"
-      bgp-session-up-count:
+      bgp_session_up_count:
         url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=bgp&up_or_down=up"
         xml_element: "ShowNeighborStatisticsResp"
         result_type: "count"
-      bgp-session-down-count:
+      bgp_session_down_count:
         url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=bgp&up_or_down=down"
         xml_element: "ShowNeighborStatisticsResp"
         result_type: "count"
-      xmpp-session-count:
+      xmpp_session_count:
         url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=xmpp"
         xml_element: "ShowNeighborStatisticsResp"
         result_type: "count"
-      xmpp-session-up-count:
+      xmpp_session_up_count:
         url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=xmpp&up_or_down=up"
         xml_element: "ShowNeighborStatisticsResp"
         result_type: "count"
-      xmpp-session-down-count:
+      xmpp_session_down_count:
         url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=xmpp&up_or_down=down"
         xml_element: "ShowNeighborStatisticsResp"
         result_type: "count"
@@ -130,58 +130,58 @@
     plugin: python
     template: opencontrail/files/collectd_contrail_apis.conf
     api_checks:
-      vrouter-flows-active:
+      vrouter_flows_active:
         url: "http://{{ bind_addr }}:8085/Snh_AgentStatsReq"
         xml_element: "FlowStatsResp"
         result_type: "flow_active"
-      vrouter-flows-aged:
+      vrouter_flows_aged:
         url: "http://{{ bind_addr }}:8085/Snh_AgentStatsReq"
         xml_element: "FlowStatsResp"
         result_type: "flow_aged"
-      vrouter-flows-created:
+      vrouter_flows_created:
         url: "http://{{ bind_addr }}:8085/Snh_AgentStatsReq"
         xml_element: "FlowStatsResp"
         result_type: "flow_created"
-      vrouter-flows-composite-invalid-interface:
+      vrouter_flows_composite_invalid_interface:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_invalid_if"
-      vrouter-flows-discard:
+      vrouter_flows_discard:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_discard"
-      vrouter-flows-flow-action-drop:
+      vrouter_flows_flow_action_drop:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_flow_action_drop"
-      vrouter-flows-flow-queue-limit-exceeded:
+      vrouter_flows_flow_queue_limit_exceeded:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_flow_queue_limit_exceeded"
-      vrouter-flows-flow-table-full:
+      vrouter_flows_flow_table_full:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_flow_table_full"
-      vrouter-flows-frag-err:
+      vrouter_flows_frag_err:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_frag_err"
-      vrouter-flows-invalid-label:
+      vrouter_flows_invalid_label:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_invalid_label"
-      vrouter-flows-invalid-nh:
+      vrouter_flows_invalid_nh:
         url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq"
         xml_element: "KDropStatsResp"
         result_type: "ds_invalid_nh"
-      vrouter-dns-xmpp:
+      vrouter_dns_xmpp:
         url: "http://{{ bind_addr }}:8085/Snh_AgentDnsXmppConnectionStatusReq"
         xml_element: "AgentXmppDnsData"
         state: "Established"
-      vrouter-lls:
+      vrouter_lls:
         url: "http://{{ bind_addr }}:8085/Snh_LinkLocalServiceInfo"
         xml_element: "LinkLocalServiceData"
-      vrouter-xmpp:
+      vrouter_xmpp:
         url: "http://{{ bind_addr }}:8085/Snh_AgentXmppConnectionStatusReq"
         xml_element: "AgentXmppData"
         state: "Established"
diff --git a/opencontrail/meta/heka.yml b/opencontrail/meta/heka.yml
index 0b04c0a..c92af60 100644
--- a/opencontrail/meta/heka.yml
+++ b/opencontrail/meta/heka.yml
@@ -217,131 +217,11 @@
         periods: 0
         function: last
     {%- endfor %}
-    xmpp_number_of_sessions_lo:
-      description: "There are no xmpp-number-of-sessions"
-      severity: warning
-      rules:
-      - metric: xmpp-number-of-sessions
-        relational_operator: '=='
-        threshold: 0
-        window: 100
-        periods: 0
-        function: min
-    xmpp_number_of_sessions_hi:
-      description: "There are too many xmpp-number-of-sessions"
-      severity: warning
-      rules:
-      - metric: xmpp-number-of-sessions
-        relational_operator: '=='
-        threshold: 500
-        window: 100
-        periods: 0
-        function: min
-    xmpp_number_of_sessions_diff:
-      description: "Number of xmpp-number-of-sessions changed between checks is too high"
-      severity: warning
-      rules:
-      - metric: xmpp-number-of-sessions
-        relational_operator: '>='
-        threshold: 100
-        window: 100
-        periods: 0
-        function: diff
-    vrouter_xmpp_of_sessions_lo:
-      description: "There are no vrouter-xmpp sessions"
-      severity: warning
-      rules:
-      - metric: vrouter-xmpp
-        relational_operator: '=='
-        threshold: 0
-        window: 100
-        periods: 0
-        function: min
-    vrouter_xmpp_of_sessions_hi:
-      description: "There are too many vrouter-xmpp sessions"
-      severity: warning
-      rules:
-      - metric: vrouter-xmpps
-        relational_operator: '=='
-        threshold: 10
-        window: 100
-        periods: 0
-        function: min
-    vrouter_xmpp_of_sessions_diff:
-      description: "Number of vrouter-xmpp changed between checks is too high"
-      severity: warning
-      rules:
-      - metric: vrouter-xmpp
-        relational_operator: '>='
-        threshold: 5
-        window: 100
-        periods: 0
-        function: diff
-    vrouter_xmpp_dns_of_sessions_lo:
-      description: "There are no vrouter-dns-xmpp sessions"
-      severity: warning
-      rules:
-      - metric: vrouter-dns-xmpp
-        relational_operator: '=='
-        threshold: 0
-        window: 100
-        periods: 0
-        function: min
-    vrouter_xmpp_dns_of_sessions_hi:
-      description: "There are too many vrouter-dns-xmpp sessions"
-      severity: warning
-      rules:
-      - metric: vrouter-dns-xmpps
-        relational_operator: '=='
-        threshold: 10
-        window: 100
-        periods: 0
-        function: min
-    vrouter_xmpp_dns_of_sessions_diff:
-      description: "Number of vrouter-dns-xmpp changed between checks is too high"
-      severity: warning
-      rules:
-      - metric: vrouter-dns-xmpp
-        relational_operator: '>='
-        threshold: 5
-        window: 100
-        periods: 0
-        function: diff
-    vrouter_lls_sessions_lo:
-      description: "There are no vrouter-vrouter-lls sessions"
-      severity: warning
-      rules:
-      - metric: vrouter-lls
-        relational_operator: '=='
-        threshold: 0
-        window: 100
-        periods: 0
-        function: min
-    vrouter_lls_sessions_hi:
-      description: "There are too many vrouter-vrouter-lls sessions"
-      severity: warning
-      rules:
-      - metric: vrouter-lls
-        relational_operator: '=='
-        threshold: 10
-        window: 100
-        periods: 0
-        function: min
-    vrouter_lls_of_sessions_diff:
-      description: "Number of vrouter-vrouter-lls changed between checks is too high"
-      severity: warning
-      rules:
-      - metric: vrouter-lls
-        relational_operator: '>='
-        threshold: 5
-        window: 100
-        periods: 0
-        function: diff
     xmpp_number_of_sessions_up:
       description: "There are no active XMPP sessions "
       severity: warning
       rules:
-      - metric: xmpp-number-of-sessions-up
+      - metric: contrail_xmpp_session_up_count
         relational_operator: '=='
         threshold: 0
         window: 100
@@ -351,67 +231,177 @@
       description: "There are inactive XMPP sessions"
       severity: warning
       rules:
-      - metric: xmpp-number-of-sessions-down
+      - metric: contrail_xmpp_session_down_count
         relational_operator: '>='
         threshold: 1
         window: 100
         periods: 0
         function: min
-    bgp_session_number:
+    xmpp_number_of_sessions_lo:
+      description: "There are no XMPP sessions"
+      severity: warning
+      rules:
+      - metric: contrail_xmpp_session_count
+        relational_operator: '=='
+        threshold: 0
+        window: 100
+        periods: 0
+        function: min
+    xmpp_number_of_sessions_hi:
+      description: "There are too many XMPP sessions"
+      severity: warning
+      rules:
+      - metric: contrail_xmpp_session_count
+        relational_operator: '=='
+        threshold: 500
+        window: 100
+        periods: 0
+        function: min
+    xmpp_number_of_sessions_diff:
+      description: "Number of XMPP sessions changed between checks is too high"
+      severity: warning
+      rules:
+      - metric: contrail_xmpp_session_count
+        relational_operator: '>='
+        threshold: 100
+        window: 100
+        periods: 0
+        function: diff
+    vrouter_xmpp_of_sessions_lo:
+      description: "There are no vrouter XMPP sessions"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_xmpp
+        relational_operator: '=='
+        threshold: 0
+        window: 100
+        periods: 0
+        function: min
+    vrouter_xmpp_of_sessions_hi:
+      description: "There are too many vrouter XMPP sessions"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_xmpp
+        relational_operator: '=='
+        threshold: 10
+        window: 100
+        periods: 0
+        function: min
+    vrouter_xmpp_of_sessions_diff:
+      description: "Number of vrouter XMPP sessions changed between checks is too high"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_xmpp
+        relational_operator: '>='
+        threshold: 5
+        window: 100
+        periods: 0
+        function: diff
+    vrouter_xmpp_dns_of_sessions_lo:
+      description: "There are no vrouter DNS-XMPP sessions"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_dns_xmpp
+        relational_operator: '=='
+        threshold: 0
+        window: 100
+        periods: 0
+        function: min
+    vrouter_xmpp_dns_of_sessions_hi:
+      description: "There are too many vrouter DNS-XMPP sessions"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_dns_xmpp
+        relational_operator: '=='
+        threshold: 10
+        window: 100
+        periods: 0
+        function: min
+    vrouter_xmpp_dns_of_sessions_diff:
+      description: "Number of vrouter DNS-XMPP sessions changed between checks is too high"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_dns_xmpp
+        relational_operator: '>='
+        threshold: 5
+        window: 100
+        periods: 0
+        function: diff
+    vrouter_lls_sessions_lo:
+      description: "There are no vrouter LLS sessions"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_lls
+        relational_operator: '=='
+        threshold: 0
+        window: 100
+        periods: 0
+        function: min
+    vrouter_lls_sessions_hi:
+      description: "There are too many vrouter LLS sessions"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_lls
+        relational_operator: '=='
+        threshold: 10
+        window: 100
+        periods: 0
+        function: min
+    vrouter_lls_of_sessions_diff:
+      description: "Number of vrouter LLS sessions changed between checks is too high"
+      severity: warning
+      rules:
+      - metric: contrail_vrouter_lls
+        relational_operator: '>='
+        threshold: 5
+        window: 100
+        periods: 0
+        function: diff
+    bgp_number_of_session_lo:
       description: "There are no BGP sessions"
       severity: warning
       rules:
-      - metric: bgp-session-number
+      - metric: contrail_bgp_session_count
         relational_operator: '=='
         threshold: 0
         window: 100
         periods: 0
         function: min
-    bgp_session_number_up:
+    bgp_number_of_sessions__up:
       description: "There are no active BGP sessions "
       severity: warning
       rules:
-      - metric: bgp-session-number-up
+      - metric: contrail_bgp_session_up_count
         relational_operator: '=='
         threshold: 0
         window: 100
         periods: 0
         function: min
-    bgp_session_number_down:
+    bgp_number_of_sessions_down:
       description: "There are inactive BGP sessions"
       severity: warning
       rules:
-      - metric: bgp-session-number-down
+      - metric: contrail_bgp_session_down_count
         relational_operator: '>='
         threshold: 1
         window: 100
         periods: 0
         function: min
-    vrouter_openedsockets:
-      description: "There are too many sockets opened for vRouter"
-      severity: warning
-      rules:
-      - metric: vrouter-openedsockets
-        relational_operator: '>='
-        threshold: 0
-        window: 120
-        periods: 0
-        function: min
     vrouter_flows_active:
-      description: "There are too many vrouter flows"
+      description: "There are too many active vrouter flows"
       severity: warning
       rules:
-      - metric: vrouter-flows-active
+      - metric: contrail_vrouter_flows_active
         relational_operator: '>='
         threshold: 1200
         window: 120
         periods: 0
         function: min
     vrouter_flows_zero_active:
-      description: "There are no active flows"
+      description: "There are no active vrouter flows"
       severity: warning
       rules:
-      - metric: vrouter-flows-active
+      - metric: contrail_vrouter_flows_active
         relational_operator: '=='
         threshold: 0
         window: 120
@@ -421,87 +411,87 @@
       description: "There are too many vrouter flows created"
       severity: warning
       rules:
-      - metric: vrouter-flows-created
+      - metric: contrail_vrouter_flows_created
         relational_operator: '>='
         threshold: 1000
         window: 120
         periods: 0
         function: min
     vrouter_flows_discard:
-      description: "There are too many vrouter flows: discards"
+      description: "There are too many vrouter flows discarded"
       severity: warning
       rules:
-      - metric: vrouter-flows-discard
+      - metric: contrail_vrouter_flows_discard
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
     vrouter_flows_drop:
-      description: "There are too many vrouter flows: drops"
+      description: "There are too many vrouter flows dropped"
       severity: warning
       rules:
-      - metric: vrouter-flows-drop
+      - metric: contrail_vrouter_flows_flow_action_drop
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
     vrouter_flows_frag_err:
-      description: "There are too many vrouter flows: fragment errors"
+      description: "There are too many vrouter flows with fragment errors"
       severity: warning
       rules:
-      - metric: vrouter-flows-frag-err
+      - metric: contrail_vrouter_flows_frag_err
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
     vrouter_flows_invalid_nh:
-      description: "There are too many vrouter flows: invalid_nh"
+      description: "There are too many vrouter flows with invalid_nh"
       severity: warning
       rules:
-      - metric: vrouter-flows-invalid-nh
+      - metric: contrail_vrouter_flows_invalid_nh
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
     vrouter_flows_composite_invalid_interface:
-      description: "There are too many vrouter flows: composite_invalid_interface"
+      description: "There are too many vrouter flows with composite_invalid_interface"
       severity: warning
       rules:
-      - metric: vrouter-flows-composite-invalid-interface
+      - metric: contrail_vrouter_flows_composite_invalid_interface
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
     vrouter_flows_invalid_label:
-      description: "There are too many vrouter flows: invalid_label"
+      description: "There are too many vrouter flows with invalid_label"
       severity: warning
       rules:
-      - metric: vrouter-flows-invalid-label
+      - metric: contrail_vrouter_flows_invalid_label
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
     vrouter_flows_flow_queue_limit_exceeded:
-      description: "There are too many vrouter flows: flow_queue_limit_exceeded"
+      description: "There are too many vrouter flows with queue_limit_exceeded"
       severity: warning
       rules:
-      - metric: vrouter-flows-flow-queue-limit-exceeded
+      - metric: contrail_vrouter_flows_flow_queue_limit_exceeded
         relational_operator: '>='
         threshold: 100
         window: 120
         periods: 0
         function: min
-    vrouter_flow_full:
-      description: "There are too many vrouter flows: flow_table_full"
+    vrouter_flows_flow_table_full:
+      description: "There are too many vrouter flows with table_full"
       severity: warning
       rules:
-      - metric: vrouter-flows-flow-table-full
+      - metric: contrail_vrouter_flows_flow_table_full
         relational_operator: '>='
         threshold: 100
         window: 120