prometheus.prometheus.cadvisor role – cAdvisor

Note

This role is part of the prometheus.prometheus collection (version 0.23.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install prometheus.prometheus.

To use it in a playbook, specify: prometheus.prometheus.cadvisor.

Entry point main – cAdvisor

Synopsis

Parameters

Parameter

Comments

cadvisor_binary_install_dir

string

Advanced

Directory to install binaries

Default: "/usr/local/bin"

cadvisor_binary_url

string

URL of the cadvisor binary file

Default: "https://github.com/{{ _cadvisor_repo }}/releases/download/v{{ cadvisor_version }}/cadvisor-v{{ cadvisor_version }}-{{ ansible_system | lower }}-{{ _cadvisor_go_ansible_arch }}"

cadvisor_disable_metrics

list / elements=string

comma-separated list of metrics to be disabled

(default advtcp,cpu_topology,cpuset,hugetlb,memory_numa,process,referenced_memory,resctrl,sched,tcp,udp)

Choices:

  • "advtcp"

  • "app"

  • "cpu"

  • "cpuLoad"

  • "cpu_topology"

  • "cpuset"

  • "disk"

  • "diskIO"

  • "hugetlb"

  • "memory"

  • "memory_numa"

  • "network"

  • "oom_event"

  • "percpu"

  • "perf_event"

  • "process"

  • "referenced_memory"

  • "resctrl"

  • "sched"

  • "tcp"

Default: []

cadvisor_docker_only

boolean

do not report raw cgroup metrics, except the root cgroup

Choices:

  • false ← (default)

  • true

cadvisor_enable_metrics

list / elements=string

comma-separated list of metrics to be enabled. If set, overrides ‘cadvisor_disable_metrics’

Choices:

  • "advtcp"

  • "app"

  • "cpu"

  • "cpuLoad"

  • "cpu_topology"

  • "cpuset"

  • "disk"

  • "diskIO"

  • "hugetlb"

  • "memory"

  • "memory_numa"

  • "network"

  • "oom_event"

  • "percpu"

  • "perf_event"

  • "process"

  • "referenced_memory"

  • "resctrl"

  • "sched"

  • "tcp"

Default: []

cadvisor_env_metadata_whitelist

list / elements=string

comma-separated list of env variables to be used as labels on prometheus metrics

Default: []

cadvisor_listen_ip

string

Address on which cadvisor will listen

Default: "0.0.0.0"

cadvisor_local_cache_path

string

Local path to stash the archive and its extraction

Default: "/tmp/cadvisor-{{ ansible_system | lower }}-{{ _cadvisor_go_ansible_arch }}/{{ cadvisor_version }}"

cadvisor_port

string

Port on which cadvisor will listen

Default: "8080"

cadvisor_prometheus_endpoint

string

Path under which to expose metrics

Default: "/metrics"

cadvisor_store_container_labels

boolean

store all container labels

Choices:

  • false

  • true ← (default)

cadvisor_system_group

string

Advanced

System group for cadvisor

Default: "root"

cadvisor_system_user

string

Advanced

cAdvisor user

Default: "root"

cadvisor_version

string

cAdvisor package version. Also accepts latest as parameter.

Default: "0.49.1"

cadvisor_whitelisted_container_labels

list / elements=string

comma-separated list of container labels to be used as labels on prometheus metrics

Default: []

Authors

  • Prometheus Community