teslamotors / ansible_puller

Ansible daemon for massively-scaleable Ansible
MIT License
129 stars 35 forks source link

Fix mis-reported prometheus metrics #22

Closed scottcrossen closed 2 years ago

scottcrossen commented 2 years ago

The issue manifests as the prometheus counter ansible_puller_play_summary containing all zeros even with successful runs. This is due to two problems: 1) It is assumed in the counter logic that the hostname was the host alias used during the ansible playbook. This is not always correct. 2) During failures (and when "debug" is on), the ansible runner is exiting before parsing the metric result

This was manually tested in a "scratch" environment