Kubernetes etcd Monitoring

Last updated on 28 August, 2023

etdc is a lightweight, highly available key-value store where Kubernetes stores the information about a cluster’s state. For more information, see Operating etcd clusters for Kubernetes from Kubernetes documentation.

LogicMonitor can only monitor etcd clusters that are deployed within a Kubernetes Cluster, and not those that are deployed outside of the cluster.

Important: We do not support Kubernetes etcd monitoring for managed Kubernetes services like OpenShift, Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), and Azure Kubernetes Service (AKS) because they do not expose the Kubernetes Control Plane components.

Requirements for Monitoring etcd

Ensure you have enabled the Kubernetes_etcd DataSource.

Note: This is a multi-instance datasource, with each instance indicating an etcd node. This DataSource is available for download from LM Exchange.

Setting up Kubernetes etcd Monitoring

Installation

You do not need any separate installation on your server to use the Kubernetes etcd.

Depending on your preference, you can install LM Container with the following two options:

  1. Installing through the user interface. For more information, see  Installing the LM Container Helm Chart.
  2. Installing through the command line interface. For more information, see Installing LM Container Chart using CLI.

Configuration

The Kubernetes etcd cluster is pre-configured for monitoring. No additional configurations are required. If you do not see any data for the Kubernetes etcd resource, do the following:

  1. In your system, enter /etc/kubernetes/manifests in the terminal.
  2. Open the etcd.yaml file for updating.
  3. In etcd Pod under kube-system namespace, change the value of –listen-metrics-urls at .spec.containers.command from http://127.0.0.1:2381 to http://0.0.0.0:2381.
    Note: Changing the value of –listen-metrics-urls allows the collector pod to scrape the metrics URL of the etcd pod within the cluster only.
  4. Save the etcd.yaml file.

Note: Ensure you disable the SSL certificate verification. To do this, use http instead of https for the –listen-metrics-urls value.

For monitoring custom etcd deployment, follow the instructions below:

  1. In LogicMonitor, navigate to Settings > DataSources > select Kubernetes etcd DataSource
  2. In the Kubernetes etcd DataSource page, expand Active Discovery.
  3. In the Parameters section, select the Embedded Groovy Script option. 
  4. In the Groovy Script field, enter the required component name for the etcd_label array.
    etcd Active Directory
  5. Expand Collector Attributes, and in the Groovy Script field, enter the required component name for the etcd_label array.
    etcd Collector Attribute
  6. Select Save to save the Kubernetes etcd DataSource. 

Viewing Kubernetes etcd Details

Once you have installed and configured the Kubernetes etcd on your server, you can view the etcd cluster properties and metrics on the Resources page.

  1. In LogicMonitor, navigate to Resources > select the required etcd DataSource resource.
    etcd resource page
  2. Select the Info tab to view the different properties of the Kubernetes etcd.
    etcd Info tab
  3. Select the Alerts tab to view the alerts generated while checking the status of the Kubernetes etcd resource.
    etcd Alerts tab
  4. Select the Graphs tab to view the status or the details of the Kubernetes etcd in the graphical format.
    etcd Graphs tab
  5. Select the Alert Tuning tab to view the datapoints on which the alerts are generated.
    etcd Alert Tuning tab
  6. Select the Raw Data tab to view all the data returned for the defined instances.
    etcd Raw Data tab
In This Article