mesaguy / ansible-prometheus

Ansible role for the management of Prometheus software and Prometheus exporters

Home Page:https://galaxy.ansible.com/mesaguy/prometheus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

statsd_exporter: no way to specify global defaults

urusha opened this issue · comments

There is no way to specify global defaults ( https://github.com/prometheus/statsd_exporter#global-defaults ) with prometheus_statsd_exporter_cfg.
We could remove mappings: from https://github.com/mesaguy/ansible-prometheus/blob/master/templates/statsd_exporter.yml.j2 but that would not be backward compatible (although this could be fixed in the template by transforming cfg variable). Or we could add prometheus_statsd_exporter_cfg_defaults to the template.
I'm ready to make a PR if it's needed, please advice what way to choose.

By the way https://github.com/mesaguy/ansible-prometheus/blob/master/docs/statsd_exporter.md doesn't mention that we also need to add extra_opts to use templated config.

prometheus_statsd_exporter_extra_opts:
- "--statsd.mapping-config={{prometheus_etc_dir}}/statsd_exporter.yml"

Instead we see confusing: If no configuration content is defined, a default configuration file is utilized.

Your approach looks good. I have started testing your PRs against the test suite of distros and expect to accept them in the next couple of days. Thanks!

Thanks. Just want to mention that vars/software/* in PRs doesn't contain full info. Is there a script for automating it (that uses github api, I guess)? I've just filled it with the last linux amd64 releases to make it work in my case. But I could make additional PR solving this in automated way (or may be it's easier for you to make these changes). Also PRs doesn't add links to exporters and docs to root README.md - just to avoid conflicts.

Your PRs have been accepted and released in v0.12.0. I have created issue #20 to track improving documentation and processes around adding exporters. I have Python code for creating/updating metadata which I need to clean up and release.