From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 3/3] Added new node_exporter 1.2.0 package. Date: Tue, 27 Jul 2021 10:00:27 +0100 Message-ID: <27934AAC-DC9D-49CB-BE22-BDA4EB8641AD@ipfire.org> In-Reply-To: <8923a9f9-802d-1d97-dcbd-10b6776a76ec@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7976845184444980462==" List-Id: --===============7976845184444980462== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Holger, Yeah, I did remember and I think we should have a generic solution to avoid a= dding many scripts of this style. I just sent a patch for testing. Could you please check if this works for you? https://patchwork.ipfire.org/project/ipfire/patch/20210727085900.2253-1-mic= hael.tremer(a)ipfire.org/ Best, -Michael > On 26 Jul 2021, at 20:27, Holger Sunke wrote: >=20 >=20 >>> +++ b/src/initscripts/packages/node_exporter >>> @@ -0,0 +1,39 @@ >>> +#!/bin/sh >>> +######################################################################## >>> +# Begin $rc_base/init.d/ >>> +# > 99>> +++ b/src/scripts/node_exporter_starter.sh >>> @@ -0,0 +1,7 @@ >>> +#/bin/bash >>> + >>> +# read configurable OPTIONS >>> +. /etc/node_exporter_options >>> + >>> +/usr/bin/node_exporter $OPTIONS >> /var/log/node_exporter.log 2>&1 & >>> + >>> --=20 >>> 2.30.2 >>>=20 >> What is this for again? >> -Michael >=20 >=20 > The script above is a workaround for the issue that node_exporter does not = have a fork functionality - we wrote about this earlier: >=20 >=20 > > Hello, >=20 > >> On 9 Jun 2021, at 07:14, Holger Sunke wrote: > >> > >> Hello Michael, > >> > >> the node exporter does not have a daemon mode. > >> I could alternatively pip the output into a log file: > >> > >> loadproc /usr/bin/node_exporter $OPTIONS >> /var/log/node_exporter.log 2= >&1 & >=20 > > Hmm, so there are two problems here: >=20 > >* loadproc shows [ OK ] or [ ERROR ] so that the user knows if the > progr= am was started successfully. That is now being thrown away. >=20 > > * Anything useful that node_exporter would print is also being thrown away >=20 > > This seems to become a common thing that they remove the fork mode, maybe= we need a special version of loadproc() that can handle that. >=20 > > Should I add a third patch to do my fixes or adjust patch 1 & 2 each? >=20 > > Let=E2=80=99s work on Go first and get that merged and then come back to = this one. >=20 > > We need to have a solution first and then implement it. >=20 > > -Michael >=20 --===============7976845184444980462==--