Summary: | net-analyzer/prometheus-node_exporter Please add a systemd unit | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fabian Köster <gentoo> |
Component: | Current packages | Assignee: | Manuel Rüger (RETIRED) <mrueg> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arthur, slyfox, systemd, whissi, zmedico |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 448882 | ||
Attachments: |
systemd unit file
Patched ebuild systemd unit file |
Created attachment 477208 [details]
Patched ebuild
Created attachment 477210 [details]
systemd unit file
Manuel, can you please consider integrating this patch? It is really simple and won't break any non-systemd installation. We should probably do something like this: ExecStart=/usr/bin/node_exporter $NODE_EXPORTER_OPTS Then users can override NODE_EXPORTER_OPTS with a drop-in file in /etc/systemd/system/prometheus-node_exporter.d/ containing something like this: [Service] Environment=NODE_EXPORTER_OPTS="--collector.systemd --collector.foo" (In reply to Zac Medico from comment #4) > We should probably do something like this: > > ExecStart=/usr/bin/node_exporter $NODE_EXPORTER_OPTS > > Then users can override NODE_EXPORTER_OPTS with a drop-in file in > /etc/systemd/system/prometheus-node_exporter.d/ containing something like > this: > > [Service] > Environment=NODE_EXPORTER_OPTS="--collector.systemd --collector.foo" Why still using Environment? Why shouldn't the user just overwrite the whole unit/Exec line? BTW: The problem isn't unique for node_exporter. Most exporters don't support a config files and require a lot of arguments. This is very hard to reflect in systemd world... and there isn't a sane default and upstream recommends to ship an empty args line. Any progress regarding this issue? There's a unit file in 0.17.0-r1 |
Created attachment 463192 [details] systemd unit file The prometheus-node_exporter currently does not come with a systemd unit. I am successfully using the attached one, can you please add it? Need to add systemd eclass to inherit line and then in src_install run: systemd_dounit "${FILESDIR}/${PN}.service"