Skip to main content

Add a Prometheus Metrics Collector

Free_administrator.png
Free_Read-only.png

The Prometheus metrics collector is open source software that is required to collect Kubernetes data from your cloud service provider (CSP). Right-sizing metrics are collected for containers and Fargate pods, but not for clusters.

About This Task

You must deploy a single Prometheus instance per Virtana account. If you have linked accounts in Virtana Platform, each parent and child account must have a Prometheus instance associated with it.

If you have existing Prometheus instances, you can integrate those with Virtana Platform.

To integrate with Virtana Platform, it doesn't matter if the Prometheus collector is using federated or nonfederated services, or is configured within or outside of a cluster.

Prerequisites

Cloud provider accounts that include Kubernetes resources must have Prometheus collectors installed on them. See Prometheus documentation for download and configuration instructions.

Prometheus version 2.14.0 or later is required.

The Prometheus server you are adding to Virtana Platform externalizes container metrics and must have a public URL with a routable port. The default port is 9090.

If you want to configure Prometheus with basic authentication, you must provide the Prometheus username and password. The credentials should be available from your infrastructure admin.

Tip

Basic authentication is the only authentication method provided with Virtana Platform. If your environment requires an alternative authentication method, submit a feature request using the Resource Center in Virtana Platform.

Steps

  1. Under Settings, navigate to Integrations > Metrics Collectors and click Add Integration.

  2. Enter the Data Source from which the metrics will be collected.

    screenshot of prometheus integration setup page
  3. Enter the Prometheus Domain.

    You can use HTTP, or HTTPS with a valid certificate.

    (If you would like support for self-signed certificates, vote for the feature in the Virtana Platform Resource Center.)

    Example: https://sample.prometheus.com

    You can also use an IP address or URL to the service. The domain, IP address, or URL must be a public endpoint.

    The URL to a Kubernetes service is in the format:  service-name.namespace.svc.cluster.local:service-port, where cluster.local is the Kubernetes cluster name.

    Tip

    The domain can be a DNS URL, an IP address, or a URL like the one used for a load balancer. The load balancer URL can be located by selecting the CSP Kubernetes cluster, navigating to Services, and then selecting the Prometheus server. Alternatively, you can get the external address using the command:

    kubectl get svc --all-namespaces

  4. Optional: Select Enable Basic Authentication and enter the Prometheus Username and Password.

    Tip

    Prometheus credentials can be provided by an administrator with access to the Prometheus configuration file.

  5. Click Test Connection.

    A message indicates if the test is successful.

  6. Click Save.

    The Prometheus collector displays in the table on the Metrics Collectors page.

    vp-settings-integ-metrics-collectors.png

Related Topics

Kubernetes with Virtana Platform

Prometheus documentation: What Is Prometheus?