All,

The issue is explained and resolved.  Found out that the node_exporter 
service was getting stopped by a puppet agent with a policy for removing 
node_exporter.  So the issue is not caused by systemd or node_exporter but 
is caused by puppet.  I have disabled puppet and the node_exporter service 
now keeps running.

Rudy
Op maandag 22 november 2021 om 14:07:58 UTC+1 schreef Rudy Gardelein:

> Brian and all,
>
> I'm affraid the issue is still not resolved, despite many attempts with 
> multiple configurations, including your suggestion to remove the 
> RemainAfterExit.  The current systemd configuration looks like this:
>
> -----
> *[Unit]*
> *Description=Node Exporter*
> *Documentation=https://github.com/prometheus/node_exporter 
> <https://github.com/prometheus/node_exporter>*
> *After=network-online.target*
>
> *[Service]*
> *User=prometheus*
> *Group=prometheus*
> *EnvironmentFile=/var/opt/EAI/prometheus/node_exporter/node_exporter.cfg*
> *ExecStart=/var/opt/EAI/prometheus/node_exporter/node_exporter $OPTIONS*
> *Restart=on-failure*
> *RestartSec=5*
>
> *[Install]*
> *WantedBy=multi-user.target*
> -----
>
> The node_exporter.cfg contains the following:
>
> -----
> *OPTIONS='--collector.systemd --collector.ntp'*
> -----
>
> Any help to get this issue resolved would be highly appreciated.
> Best regards,
>
>
> Rudy
>
>
>
> Op woensdag 10 november 2021 om 10:52:15 UTC+1 schreef Brian Candler:
>
>> No errors, it all works perfectly.  I only posted my systemd config as an 
>> example of a working one you can copy.
>>
>> I think your problem is that you have put "RemainAfterExit=true" - you 
>> should remove this.  node_exporter does not daemonize, it stays running in 
>> the foreground, and this is normal for systemd to manage.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4892bca0-4f26-4b76-8c59-d004397e9910n%40googlegroups.com.

Reply via email to