Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Understand kube-state-metrics Service

Note:

kube-state-metrics is supported as a beta-only feature.

kube-state-metrics is a third-party metrics monitoring service that generates metrics based on the current state of Kubernetes clusters. You can use kube-state-metrics to monitor the health of Kubernetes cluster and services. kube-state-metrics service is supported as a beta-only feature. kube-state-metrics runs as a cluster service, and is installed automatically when you install Paragon Automation. Once this service is installed, you can enable this service to generate, monitor, and expose metrics of various objects within a Kubernetes cluster.

kube-state-metrics service provides metrics on pods, DaemonSets, deployments, persistent volume, endpoints, ingress, job, lease, and configmap objects that are part of a Kubernetes cluster.

List of Metrics that are Exposed

The following is the list of metrics that are exposed:

  • Pods running in a namespace
  • Pods that are available
  • Information on successful/failed deployments
  • State of persistent volumes
  • Information on currently running, successful, and failed jobs
  • Pods that are in error state
  • Health of deployment and DaemonSets
  • Status and condition of Kubernetes nodes

Enable kube-state-metrics

You can enable kube-state-metrics from the CLI as well as from the Paragon Automation UI.

The following is an overview of steps to enable kube-state-metrics from the UI:

  1. Create an unmanaged device.

    The unmanaged device represents the cluster. The device hostname must be the kube-state-metrics service IP. For example, kube-state-metrics.healthbot.svc.cluster.local.

  2. Add the device to a device group.

  3. Create rules.

  4. Apply playbooks.

Sample Rules and Playbooks

check-daemonset-status.rule

check-deployment-status-condition.rule

check-deployment-status-replicas.rule

check-node-status.rule

check-pod-container-restarts.rule

check-pod-init-container-status.rule

kube-metrics.playbook