Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configurable Categories of Metrics Collection and Reporting (Tech Preview)

SUMMARY In Cloud-Native Contrail® Networking™ Release 22.2, you can enable and disable selected metrics for exporting.

Overview: Configurable Categories of Metrics Collection and Reporting

To provide more flexibility in the telemetry export component, Cloud-Native Contrail Networking Release 22.2 introduces a new Kubernetes custom resource: MetricGroup. MetricGroup allows you to enable or disable selected metrics for exporting.

  • MetricGroup contains and manages a set of metrics for exporting​.
  • Metrics are grouped by their category. You can choose to enable or disable the metric export function at the group level.
  • MetricGroup is implemented through a Kubernetes custom resource.

MetricGroup provides fine-grained control on what metrics the system collects and reports. You can turn on and off subset of metrics reporting. Sometimes administrators want to collect only a subset of metrics for efficiency and the lightest weight possible deployment.

Note:

This feature is classified as a Juniper CN2 Technology Preview feature. These features are "as is" and are for voluntary use. Juniper Support will attempt to resolve any issues that customers experience when using these features and create bug reports on behalf of support cases. However, Juniper may not provide comprehensive support services to Tech Preview features.

For additional information, see Juniper CN2 Technology Previews (Tech Previews) or contact Juniper Support.

Figure 1: Metrics Collection and Reporting Architecture Metrics Collection and Reporting Architecture

Telemetry Operator, see Figure 1, monitors any change of metric groups. Based on the enabled metric groups, a list of enabled metrics is created and sent in the form of ConfigMap to metric export agents.​ Metric export agents collect and export these enabled metrics, instead of all metrics on the system.

  • The MetricGroup reconciler builds a ConfigMap for each type of metric (vrouter or controller) from the enabled MetricGroup(s) and applies the ConfigMap to all clusters.
  • The KubeManager reconciler does the same for a new cluster.

Telemetry Exporter combines metric specifications with this ConfigMap to create enabled metric specifications. The metric export function only exports metrics from the enabled metric specifications, instead of all metrics.

Following items list YAML values for ConfigMap and MetricGroup.

ConfigMap: vrouter-export-enabled-metrics

  • Revision number.
  • Array of enabled metric names.

Custom Resource: MetricGroup

  • Type: vrouter or controller
  • Name: String
  • Export: Boolean
  • Metrics: Array of strings (metric name)

Install and Upgrade

MetricGroup is included in the analytics component in the CN2 Release 22.2. The predefined metric groups are automatically installed during the CN2 analytics deployment. See Install Contrail Analytics for Upstream Kubernetes or Install Contrail Analytics for OpenShift Container Platform.

Example: Predefined Metric Group

Example predefined MetricGroup: vrouter-cpu YAML file:

Manage MetricGroup with Kubectl Commands

You (the administrator) can manage MetricGroup with kubectl commands. Examples follow.

To delete MetricGroup:

To apply MetricGroup:

To view MetricGroup resource:

To verify the existence following ConfigMap(s). Each cluster has its own copy of these two ConfigMap(s).

Manage Metric Groups with UI

With this Tech Preview, you can manage MetricGroups using the CN2 Manager UI.

To manage Metric Groups in the UI:

  1. Access the CN2 Manager UI from your browser:
    https://<cluster-ip-address>/
  2. Log in to CN2 Manager by either:
    • Browse and select a kubeconfig file to upload.
    • Log in using a token.
  3. From the left-navigation menu, select Configure > Metric Groups.
    The Metric Groups window displays.
  4. To add a Metric Group, click the "+" icon in the upper right.
    Add the Name, select Type, and metrics to apply. Click Save.
    Figure 2: Add a Metric Group Add a Metric Group
  5. Click the detail icon to display the Metric Group you added.
    Figure 3: Display Metric Group Detail Display Metric Group Detail