enhancement: adding env/container labels options
Add following
- cadvisor_env_metadata_whitelist
- cadvisor_whitelisted_container_labels
- cadvisor_store_container_labels
Tested with this simple playbook:
---
- name: Install cAdvisor
hosts: localhost
become: yes
tasks:
- name: Import cAdvisor role
import_role:
name: cadvisor
vars:
cadvisor_docker_only: true
cadvisor_enable_metrics: [ "cpu", "memory", "network", "oom_event" ]
cadvisor_whitelisted_container_labels: [ "com.docker.compose.oneoff" ]
cadvisor_env_metadata_whitelist: [ "JEKYLL_ENV", "PATH" ]
cadvisor_store_container_labels: false
Also tested dropping the options, which is why I decided to explicitly set store_container_labels: true (which is the cadvisor default).
Closes: #403
Docs Build 📝
Thank you for contribution!✨
This PR has been merged and the docs are now incorporated into main:
https://prometheus-community.github.io/ansible/branch/main
The failures seem unrelated to the PR - failing to pull image.
@gardar are you the right person to review? Thanks!
Thanks! Just wanted to double check if any other action is needed before merging.
Thanks! Just wanted to double check if any other action is needed before merging.
No sorry, I just needed to fix up the CI config a bit for the tests to pass successfully.