K8s cAdvisor

Metrics, Dashboards, Alerts and more for K8s cAdvisor Integration in Sysdig Monitor.
K8s cAdvisor

This integration is enabled by default.

This integration is out-of-the-box, so it doesn’t require any exporter.

This integration has 5 metrics.

Timeseries generated: The expected cardinality of the Kubernetes cAdvisor metrics is 5 timeseries per container and pod (one timeseries for each of the five metrics).

List of Metrics

Metric name
container_cpu_cfs_periods_total
container_cpu_cfs_throttled_periods_total
container_cpu_cfs_throttled_seconds_total
container_cpu_usage_seconds_total
container_spec_cpu_period

Prerequisites

None.

Installation

Installing an exporter is not required for this integration.

Agent Configuration

The default agent job for this integration is as follows:

- job_name: k8s-cadvisor-default
  scrape_interval: 60s
  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  scheme: https
  tls_config:
    ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    insecure_skip_verify: true
  metrics_path: '/metrics/cadvisor'
  kubernetes_sd_configs:
  - role: node
  relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_node_address_InternalIP]
    regex: __HOSTIPS__
  - action: labelmap
    regex: __meta_kubernetes_node_label_(.+)
    replacement: kube_node_label_$1
  - replacement: localhost:10250
    target_label: __address__
  - action: replace
    source_labels: [__meta_kubernetes_node_name]
    target_label: kube_node_name
  - action: replace
    source_labels: [__meta_kubernetes_namespace]
    target_label: kube_namespace_name
  metric_relabel_configs:
  - source_labels: [__name__]
    regex: "container_cpu_cfs_throttled_periods_total|container_cpu_cfs_periods_total|container_cpu_cfs_throttled_seconds_total|container_cpu_usage_seconds_total|container_spec_cpu_period"
    action: keep