puppet-prometheus icon indicating copy to clipboard operation
puppet-prometheus copied to clipboard

WIP: data/Debian.yaml, add package- and service-names for Debian-based prometheus-packages

Open unki opened this issue 5 years ago • 6 comments

Together with #430 this PR adapts the Debian-defaults regarding package- and service-names like they are actually present in Debian. e.g. all exporters are prefixed with prometheus-.

https://packages.debian.org/search?keywords=prometheus&searchon=names&suite=stable&section=all

user@host:~$ for A in $(apt-cache search ^prometheus- | awk '{ print $1 }' | xargs); do apt-file show $A 2>&1 | grep -E '(systemd/system)'; done
prometheus-alertmanager: /lib/systemd/system/prometheus-alertmanager.service
prometheus-apache-exporter: /lib/systemd/system/prometheus-apache-exporter.service
prometheus-bind-exporter: /lib/systemd/system/prometheus-bind-exporter.service
prometheus-bird-exporter: /lib/systemd/system/prometheus-bird-exporter.service
prometheus-blackbox-exporter: /lib/systemd/system/prometheus-blackbox-exporter.service
prometheus-haproxy-exporter: /lib/systemd/system/prometheus-haproxy-exporter.service
prometheus-mongodb-exporter: /lib/systemd/system/prometheus-mongodb-exporter.service
prometheus-mysqld-exporter: /lib/systemd/system/prometheus-mysqld-exporter.service
prometheus-nginx-exporter: /lib/systemd/system/prometheus-nginx-exporter.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-apt.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-apt.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-ipmitool-sensor.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-ipmitool-sensor.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-mellanox-hca-temp.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-mellanox-hca-temp.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-smartmon.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-smartmon.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter.service
prometheus-pgbouncer-exporter: /lib/systemd/system/prometheus-pgbouncer-exporter.service
prometheus-postgres-exporter: /lib/systemd/system/prometheus-postgres-exporter.service
prometheus-process-exporter: /lib/systemd/system/prometheus-process-exporter.service
prometheus-pushgateway: /lib/systemd/system/prometheus-pushgateway.service
prometheus-snmp-exporter: /lib/systemd/system/prometheus-snmp-exporter.service
prometheus-sql-exporter: /lib/systemd/system/prometheus-sql-exporter.service
prometheus-squid-exporter: /lib/systemd/system/prometheus-squid-exporter.service
prometheus-varnish-exporter: /lib/systemd/system/prometheus-varnish-exporter.service
prometheus-xmpp-alerts: /lib/systemd/system/prometheus-xmpp-alerts.service

unki avatar Feb 20 '20 22:02 unki

@unki can you take a look at the failing tests?

bastelfreak avatar Mar 02 '20 16:03 bastelfreak

@unki can you take a look at the failing tests?

Need your advice here.

The situation is - even before my #430 - that a lot of exporters are using $service_name for things like naming the installation-directory. e.g. see redis_exporter.pp:L107.

When the $service_names for Debian are now referring their actual service-names on Debian - a init.d or systemd.service, like e.g. prometheus-redis-exporter - all the tests here are failing because they have the ordinary exporter-names like redis_exporter hardcoded.

Shall I...

  • ... change the exporters to use $package_name instead of $service_name and pin the tests to the upstream exporter-names (redis_exporter)?
  • ... change the tests to test a package-based installation on Debian instead of the download-url variant?

unki avatar Mar 02 '20 19:03 unki

... change the tests to test a package-based installation on Debian instead of the download-url variant?

i think that would be the way to go. if i remember correctly, that's how Arch does it.

and thanks for tackling this! i've got profiles here to work around this problem, would be great to get rid of them.

anarcat avatar Mar 31 '21 18:03 anarcat

In general I think we should always rely on packages if some are available. Arch Linux packages a few exporters and I implemented that in this module as well.

bastelfreak avatar Apr 03 '21 15:04 bastelfreak

Dear @unki, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

vox-pupuli-tasks[bot] avatar Jun 21 '22 19:06 vox-pupuli-tasks[bot]

@unki is still relevant?

TheMeier avatar May 04 '24 07:05 TheMeier

I will close this due to inactivity, please feel free to re-open if you still want to work on this

TheMeier avatar May 25 '24 15:05 TheMeier