Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

unki
Copy link

@unki unki commented Feb 20, 2020

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 unki force-pushed the adapt-debian-defaults-to-use-debian-packages branch from e3c0bc6 to 265f2a0 Compare February 28, 2020 17:58
@unki unki force-pushed the adapt-debian-defaults-to-use-debian-packages branch from 265f2a0 to 35db014 Compare February 28, 2020 18:02
@unki unki changed the title data/Debian.yaml, add package- and service-names for Debian-based prometheus-packages WIP: data/Debian.yaml, add package- and service-names for Debian-based prometheus-packages Feb 29, 2020
@bastelfreak
Copy link
Member

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

@unki
Copy link
Author

unki commented Mar 2, 2020

@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?

@anarcat
Copy link

anarcat commented Mar 31, 2021

... 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.

@bastelfreak
Copy link
Member

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.

@vox-pupuli-tasks
Copy link

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

@TheMeier
Copy link
Contributor

TheMeier commented May 4, 2024

@unki is still relevant?

@TheMeier
Copy link
Contributor

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

@TheMeier TheMeier closed this May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants