From: Michael Tremer <michael.tremer@ipfire.org>
To: Adolf Belka <adolf.belka@ipfire.org>
Cc: "IPFire: Development-List" <development@lists.ipfire.org>
Subject: Re: collectd openvpn errors if openvpn not used
Date: Sat, 15 Mar 2025 14:13:03 +0000 [thread overview]
Message-ID: <BA00E3F2-90D8-48DE-BC11-0D2AFDD12708@ipfire.org> (raw)
In-Reply-To: <e5dfd47f-746a-458d-9cef-38d0a15cfeb7@ipfire.org>
Hello Adolf,
I think we should comment out the OpenVPN module in collectd.conf. We are doing this for some other modules already:
https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/initscripts/system/collectd;h=263511fc7c1fd5bf5450f11558ac6bce0e167828;hb=HEAD
This just means that we also want to restart collectd after OpenVPN was enabled/disabled so that it is always in sync.
-Michael
> On 15 Mar 2025, at 13:49, Adolf Belka <adolf.belka@ipfire.org> wrote:
>
> Hi Michael and all,
>
> Error messages from collectd have been reported in the forum with Core Update 192 (so the 15.12.0 update).
>
> The messages were:-
>
> 07:19:24 collectd[17386]: read-function of plugin `openvpn/ovpnserver.log' failed. Will suspend it for 30720.000 seconds.
> 07:19:24 collectd[17386]: openvpn plugin: failed to get data from: /var/run/ovpnserver.log
> 03:03:24 collectd[17386]: read-function of plugin `openvpn/ovpnserver.log' failed. Will suspend it for 15360.000 seconds.
> 03:03:24 collectd[17386]: openvpn plugin: failed to get data from: /var/run/ovpnserver.log
> 00:55:24 collectd[17386]: read-function of plugin `openvpn/ovpnserver.log' failed. Will suspend it for 7680.000 seconds.
> 00:55:24 collectd[17386]: openvpn plugin: failed to get data from: /var/run/ovpnserver.log
>
> It appears that the users that are not using openvpn are the ones seeing these messages. They apparently do have the /var/run/ovpnserver.log file but it is empty.
>
> Looking back through the IPFIre git repo I saw that some of the 22 odd patches that had been applied to collectd-4.10.9 were related to openvpn and some of them to silencing openvpn errors.
>
> I identified 7 patches related to openvpn, all patching the /src/openvpn.c file in the collectd source tarball.
>
> I compared all these patches with the collectd-5.12.0 source tarball.
>
> One of the files had its contents now included in the source tarball. This was the one related to changing the openvpn plugin from a COUNTER to a DERIVE approach.
>
> The other 6 patches I could not find virtually any match as the openvpn.c code is significantly different enough that finding the section of code where the changes should be applied was impossible. In many cases the variables being changes are no longer present, or if present are used in very different commands now.
>
> Any thoughts on how to fix this. Do we need to basically completely re-write the old patches to be able to work in the new code or is there some way to be able to detect that openvpn is not running and therefore comment out the include openvpn plugin command in the collectd.conf file in the same way as we do with the thermal plugin.
>
> The issue I see with this is that the thermal line is commented out via the collectd initscript, presumably because if this is not capable at boot it won't change while the system is running.
>
> However with openvpn the user could enable openvpn to start and then we would need to make the collectd daemon restart so that the initscript could uncomment the include openvpn plugin line.
>
> Editing the openvpn.c code is beyond my capabilities but the second option to uncomment the openvpn plugin line if openvpn is started might be in my capabilities.
>
> Any thoughts or other suggestions on this issue.
>
> Regards,
> Adolf.
>
>
>
> --
> Sent from my laptop
prev parent reply other threads:[~2025-03-15 14:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-15 13:49 Adolf Belka
2025-03-15 14:13 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BA00E3F2-90D8-48DE-BC11-0D2AFDD12708@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=adolf.belka@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox