Bug#1009216: /etc/default/prometheus-node-exporter should be much shorter

2022-04-10 Thread Daniel Kahn Gillmor
On Sun 2022-04-10 18:03:13 +0200, Guillem Jover wrote:
> Also true in principle, as long as the man page is coming from upstream
> (and gets updated by them or a script :) or gets generated from the
> Debian packaging out of --help output, which I'm not sure is the case
> for all current exporters. But DRY principle and all.

Agreed.  But if the package maintainer has to spend any time at all
keeping some documentation up to date, please spend it ensuring that the
manpage is up-to-date, as that's going to be relevant for many more
people than /etc/default/prometheus-node-exporter.

> I can bring it up on the team's IRC channel, and gather the feeling of
> the team about this.

Thanks!  One other motivating reason to simplify the file is that it's
easy for a busy/rushed admin to scan the file, see the long list of
commented options and think "i'll just uncomment the ones that i want"
(without understanding that they need to be copied to the ARGS="" line).

Less text makes it easier for someone in a rush to focus on the most
important thing, which is where the options go.

Thanks for looking into this, Guillem!

  --dkg


signature.asc
Description: PGP signature


Bug#1009216: /etc/default/prometheus-node-exporter should be much shorter

2022-04-08 Thread Daniel Kahn Gillmor
Package: prometheus-node-exporter
Version: 1.3.1-1

/etc/default/prometheus-node-exporter contains a huge amount of comments
indicating what possible command line options are available for the
daemon.

Those comments either will get out of date as the package is upgraded
(meaning, they'll be wrong), or, for an admin who has set anything in
ARGS, they'll cause dpkg to warn that a config file is being changed
during package upgrade.

Both of these things are pretty tedious for an admin to deal with.

The comments also recapitulate the date in the associated manpage, which
*will* be kept up-to-date across a package upgrade.

It would be better if /etc/default/prometheus-node-exporter shipped as
(in total):


# Set the command-line arguments to pass to the server in ARGS below.
# Due to shell escaping, to pass backslashes for regexes, you need to double
# them (\\d for \d). If running under systemd, you need to double them again
# (d to mean \d), and escape newlines too.
# See prometheus-node-server(1) for acceptable arguments.

ARGS=""


(the stuff about different forms of escaping is also unfortunate, but
that's probably a different issue)

--dkg


signature.asc
Description: PGP signature