From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZFMzj2pDKz377w for ; Sat, 15 Mar 2025 13:49:37 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZFMzd5FfRz377q for ; Sat, 15 Mar 2025 13:49:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZFMzc3XS5z1dy for ; Sat, 15 Mar 2025 13:49:32 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1742046572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=IjM1d77XWVRJxPSTpCspB4HoEGjmIBKa63nLC0HTtNk=; b=hNQfMsnPHcAhrFpfJplH9X2GzbqGCR92oj9S2FD8D2S4tR8+hSBCIHnwLfFYRCpiPT04ih 08z4gmmJYsFa7XAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1742046572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=IjM1d77XWVRJxPSTpCspB4HoEGjmIBKa63nLC0HTtNk=; b=Zq613TM2u2T7NseoGKMeQBUwF2dhqOGAYqFIiV6CevIqunQimOJH5G3iAmqh+/9WNenIaT +cLxhTsPpf1Sl2k9rIWL8AUkUYLypFbCAp+xkSrwn+8Bx5e75nx4LuqvXiyceef429B1GM lOIsppsm12/aBM8jBtIzjX2N+n2PfdZKwojp6Wtw9dxhtcHjVMLMOmbEQqvJjgAxueji3U zNNFcv1P2rHJ521+4ROUgOlipIgSk98CBkoeMxaLlUTxu1G9/EZ2i9JcQJU+IGpYevrCEH JxDvVjx22xHKtvZGsoVeeBIzu3szTJVAOXstHKmgFnFUDHp37NjD/tIk0afuLQ== Content-Type: multipart/alternative; boundary="------------Inz77DcUyGZc3EEZMtW1uE0Q" Message-ID: Date: Sat, 15 Mar 2025 14:49:28 +0100 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Language: en-GB To: "IPFire: Development-List" From: Adolf Belka Subject: collectd openvpn errors if openvpn not used This is a multi-part message in MIME format. --------------Inz77DcUyGZc3EEZMtW1uE0Q Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------Inz77DcUyGZc3EEZMtW1uE0Q Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit 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
--------------Inz77DcUyGZc3EEZMtW1uE0Q--