]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
collectd: Fixes bug-13074, create collectd.d directory
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 7 Aug 2024 12:16:45 +0000 (14:16 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Sep 2024 14:18:12 +0000 (14:18 +0000)
- 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 <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/collectd/collectd.conf
config/collectd/collectd.custom [deleted file]
config/rootfiles/common/collectd
lfs/collectd
src/initscripts/system/collectd

index 27e1fe984ad9f71c0e86b8b57db5f525ead1d8f0..e51d9108bf85490c3fe48902e5f4f0cfcfde0d42 100644 (file)
@@ -74,5 +74,5 @@ include "/etc/collectd.precache"
 </Plugin>
 
 #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 (file)
index 7443bf3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# Use this file to add custom configs and rules for collectd
index 65408dc7fd3c240383bda8607b9ca7a5ea7dedbc..c8a3ad607a333324d2b6b70c03f72cbe10eb91a8 100644 (file)
@@ -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
index d1d4ea721386803c31599315de956373417c2dcf..2438d2eaf685633dfeb991c9d84395baa7a8a23a 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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        #
@@ -129,6 +129,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
index 56b799d56d21409bd95e467d6241d482bcc119cf..263511fc7c1fd5bf5450f11558ac6bce0e167828 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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