[RFC] Prometheus exporters naming and configuration

Mikel Olasagasti <[email protected]>
Newsgroups gmane.linux.redhat.fedora.devel
Message-ID <CAM4=qPJEvBqHw+_uG0ukiRB7GVXpeHn0iF2zc1rZmrXSY-m9yA@mail.gmail.com>
Hi list,

Prometheus exporters are small agents that collect metrics from systems or
services and expose them on an HTTP endpoint to be consumed by Prometheus.

Currently, we have 3 exporters in Fedora:
- node-exporter (previously golang-github-prometheus-node-exporter)
- prometheus-podman-exporter
- rust-monitord-exporter

We also have package review requests for 4 more:
- snmp-exporter: https://bugzilla.redhat.com/show_bug.cgi?id=2490148
- blackbox-exporter: https://bugzilla.redhat.com/show_bug.cgi?id=2500076
- redis-exporter: https://bugzilla.redhat.com/show_bug.cgi?id=2500075
- python-coredump_exporter: https://bugzilla.redhat.com/show_bug.cgi?id=2431666

In addition to these, I plan to package at least 3 more (mysql, postgresql,
and ssl).

To avoid creating inconsistent precedents, we would like to discuss
some standard
practices openly. We started a discussion on a Bugzilla ticket [1] about
correct naming and config paths, and we would love to collect feedback on
the following points:


1. Naming (Underscores vs. Hyphens)
-----------------------------------
Most upstream exporters use underscores in their names like node_exporter or
snmp_exporter. However, Fedora Naming Guidelines [2] prefer hyphens and
define only a few exceptions.

* Should Prometheus exporters be added to these exceptions?
* Currently, node-exporter uses "Provides: node_exporter" as a workaround, but
  doesn't help on searches. Is this the preferred approach?
* For packages like rust-monitord-exporter, Rust packaging guidelines might
  conflict with a general decision here. What is the best way to handle this?
* Should configuration files and systemd service names follow the Fedora
  package name (downstream), or is it better to stick to the upstream name?


2. The "prometheus-" Prefix
---------------------------
To make these packages easy to identify:

* Should all exporter packages have a "prometheus-" prefix?
* Should the installed binaries have a "prometheus-" prefix?
* Should the systemd service files and configuration files have a
  "prometheus-" prefix?


3. Configuration Files
----------------------
Some exporters like blackbox and snmp require configuration files.

* Should these config files reside in:
  %{_sysconfdir}/prometheus/<exporter_name>/
  ...or directly in:
  %{_sysconfdir}/<exporter_name>/


4. Documentation
----------------
Should we document these best practices in the Fedora Packaging Guidelines
under "Other Domain-specific Guidelines"?


Thank you for your feedback!

Best regards,
Mikel

References:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2490148#c7
[2] https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/#_separators
-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.