From patchwork Wed Aug 7 12:16:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7939 Return-Path: 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) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Wf8LH5KtRz3x2s for ; Wed, 7 Aug 2024 12:16:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Wf8LF5zT3z4Rt; Wed, 7 Aug 2024 12:16:53 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Wf8LF3ctnz33yl; Wed, 7 Aug 2024 12:16:53 +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) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Wf8LB2WHwz30BH for ; Wed, 7 Aug 2024 12:16:50 +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 4Wf8L81lpCz1DR; Wed, 7 Aug 2024 12:16:48 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1723033008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qDWpNFnNcuAV3+8w8pWvk8yyE2burqcLAoQ5LdSgh9c=; b=w26Ddhb4KIzRNEs0M69ye57EJiKlO5/JQfb06c9rJGSGw5Mr0pb5VssWVWPHl7VoVnO28J Xqf4i7V/8ANUehDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1723033008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qDWpNFnNcuAV3+8w8pWvk8yyE2burqcLAoQ5LdSgh9c=; b=OJk0s7umNW2MBevA8/3IfSc6LGmaQPIE9bJRNyLf4Ji8yW3r1GznW2sEoICbIGpRsirzGY dUHLO9PD7q7EZlTIK3nR0sa1Gvr70Pz0Bz8cJaVIMZv/vUBPiNLuB8OsTOSUXaSPwOkrio pNGcz03+aQKeGMGLxjoPIwYx7DmZkf0cRWK6BjxyQOcBy8APhB9BZ9+21ewmtD8DQgUo3S mDh6lu6hQ+yrWGJ3Kbe9PvOVoJF+HcSptd9FLPQ/Y1wfLJeOKmiVT6mbMtgh/BGQQyKaeE g9HHQVCoF2M5aD/ic6L+VbvEpjurTEkzFGCKRcvnG3xgo0VUaaGPhMo5femAjg== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH v2] collectd: Fixes bug-13074, create collectd.d directory Date: Wed, 7 Aug 2024 14:16:45 +0200 Message-ID: <20240807121645.3440532-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: QBBC54A7VBVXYJTEASU423TJ726HRUIY X-Message-ID-Hash: QBBC54A7VBVXYJTEASU423TJ726HRUIY X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - As requested in bug 13074, create a collectd.d directory to enable any addon definitions to be created. - Added include statement in conf file to load everything that is stored in the collectd.d directory. - collectd.precache and collectd.thermal have been left in their original locations - Removed the arm section in the initscript as only aarch64 is now used. - Modified the lfs to create the collectd.d directory - Removal of collectd.custom file as this was the previous way to define custom collectd profiles but would have been overwritten by any update of collectd. - Update of rootfile to take account of new path and removal of collectd.custom - Tested out in vm testbed with Core Update 188 and all existing graphs were still created and updated. From my evaluation the changes have not affected anything. - The creation of the collectd.d directory now allows users to add their own desired profiles but also if it is decided that an addon should be included in the processes graph, or if a new graph for addons is created then profiles for that addon can be placed in the collectd.d directory and will be automatically included by collectd. Fixes: Bug13074 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/collectd/collectd.conf | 2 +- config/collectd/collectd.custom | 1 - config/rootfiles/common/collectd | 2 +- lfs/collectd | 3 ++- src/initscripts/system/collectd | 5 +---- 5 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 config/collectd/collectd.custom diff --git a/config/collectd/collectd.conf b/config/collectd/collectd.conf index 27e1fe984..e51d9108b 100644 --- a/config/collectd/collectd.conf +++ b/config/collectd/collectd.conf @@ -74,5 +74,5 @@ include "/etc/collectd.precache" #include "/etc/collectd.thermal" -include "/etc/collectd.custom" include "/etc/collectd.vpn" +include "/etc/collectd.d/*" diff --git a/config/collectd/collectd.custom b/config/collectd/collectd.custom deleted file mode 100644 index 7443bf3e6..000000000 --- a/config/collectd/collectd.custom +++ /dev/null @@ -1 +0,0 @@ -# Use this file to add custom configs and rules for collectd diff --git a/config/rootfiles/common/collectd b/config/rootfiles/common/collectd index 65408dc7f..c8a3ad607 100644 --- a/config/rootfiles/common/collectd +++ b/config/rootfiles/common/collectd @@ -1,8 +1,8 @@ etc/collectd.conf -etc/collectd.custom etc/collectd.precache etc/collectd.thermal etc/collectd.vpn +etc/collectd.d etc/rc.d/rc0.d/K50collectd etc/rc.d/rc3.d/S29collectd etc/rc.d/rc6.d/K50collectd diff --git a/lfs/collectd b/lfs/collectd index 24f5bc632..6d0f666f6 100644 --- a/lfs/collectd +++ b/lfs/collectd @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2024 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -125,6 +125,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --with-librrd=/usr/share/rrdtool-1.2.30 \ --with-fp-layout=nothing cd $(DIR_APP) && make install #collectd-4 does not support parallel build + mkdir /etc/collectd.d cp -vf $(DIR_SRC)/config/collectd/collectd.* /etc/ mv /etc/collectd.vpn /var/ipfire/ovpn/collectd.vpn chown nobody.nobody /var/ipfire/ovpn/collectd.vpn diff --git a/src/initscripts/system/collectd b/src/initscripts/system/collectd index 56b799d56..263511fc7 100644 --- a/src/initscripts/system/collectd +++ b/src/initscripts/system/collectd @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2022 IPFire Team # +# Copyright (C) 2007-2024 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -68,9 +68,6 @@ case "$1" in # ARM does not support to scan for sensors. In that case, # we create an empty configuration file. machine=$(uname -m) - if [ "${machine:0:3}" = "arm" ]; then - touch /etc/sysconfig/lm_sensors - fi if [ "${machine:0:7}" = "aarch64" ]; then touch /etc/sysconfig/lm_sensors fi