Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 679312

Summary: app-metrics/node_exporter-0.17.0-r1 - systemd unit calls wrong path to node_exporter executable with wrong path to runtime configuration file
Product: Gentoo Linux Reporter: Fabian Köster <gentoo>
Component: Current packagesAssignee: William Hubbs <williamh>
Severity: normal CC: jdavid.ibp, manuel, marien.zwart, nia1048596
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: Patch fixing the wrong paths in systemd unit file

Description Fabian Köster 2019-03-03 11:20:31 UTC
The node_exporter now has a systemd unit file but it does not work properly:

1. The path in the service file is wrong, instead of /usr/bin/node_exporter it calls /usr/sbin/node_exporter

2. The systemd unit tries to load the configuration from a file /etc/sysconfig/node_exporter but this path is installed as a directory and the configuration is installed in /etc/sysconfig/node_exporter/sysconfig.node_exporter
Comment 1 Fabian Köster 2019-07-17 08:00:21 UTC
Both problems still persist in version 0.18.1.
Comment 2 Fabian Köster 2019-07-28 12:50:03 UTC
Created attachment 584910 [details, diff]
Patch fixing the wrong paths in systemd unit file

I created a patch that fixes the problem by correcting the paths in the systemd unit file and therefore remains compatible with existing installations not using systemd.

For the ebuild only the following variable must be added:

Comment 3 Manuel Friedli 2019-11-10 22:11:26 UTC
I can confirm the problem with version 0.18.1.
I can also confirm that the provided patch works. Thanks!
Comment 4 Stijn Tintel 2020-04-16 09:39:21 UTC
Actually the whole /etc/sysconfig should be dropped, as this is a RedHat-ism. In RedHat we have /etc/conf.d for this. There is no reason for not using /etc/conf.d/node_exporter for both openrc and systemd.

Ideally though, the whole EnvironmentFile is dropped and the user is encouraged to use systemd overrides (systemctl edit node_exporter.service).
Comment 5 Larry the Git Cow gentoo-dev 2021-04-07 08:59:50 UTC
The bug has been closed via the following commit(s):

commit 13ace9cf0a40ff74547390ee0976ada47bd1c2bf
Author:     Mikle Kolyada <>
AuthorDate: 2021-04-07 08:27:59 +0000
Commit:     Mikle Kolyada <>
CommitDate: 2021-04-07 08:59:47 +0000

    app-metrics/node_exporter: fix broken systemd support
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: Mikle Kolyada <>

 app-metrics/node_exporter/files/node_exporter.service             | 7 +++++--
 .../{node_exporter-1.1.2.ebuild => node_exporter-1.1.2-r1.ebuild} | 8 +++-----
 2 files changed, 8 insertions(+), 7 deletions(-)