Hi,
good idea.
Why not put these 'addon' definitions into a file /etc/collectd.addons ?
Ha! That was my first experiment!
jon@deb11HPZ:~/dev/ipfire-2.x$ cat config/collectd/collectd.addon
# Use this file to add add-on processes collectd
<Plugin processes>
Process "smbd"
Process "nmbd"
Process "squidguard"
Process "qemu"
Process "mpd"
</Plugin>
jon@deb11HPZ:~/dev/ipfire-2.x$
I was worried it might cause confusion by adding one more include file.
One problem rermains. services.cgi displays all existent collectd RRDs. Therefore these should be deleted in case of uninstallation of a addon.
I did see the delete issue but I am not sure how to clean-up the old RRDs.
There is a cron to clean-up year old RRDs:
[root@ipfire ~] # fcrontab -l | grep -i rrd
2023-01-17 11:58:14 INFO listing root's fcrontab
# Cleanup the collectd RRD (graphs)
%weekly * * /bin/find /var/log/rrd -mtime +365 -type f -name '*.rrd' -delete -o -type d -empty -delete
[root@ipfire ~] #
I can easily create
/bin/find /var/log/rrd/collectd/localhost/processes* -mtime 1 -type f -name '*.rrd'
But this type of clean-up seems too hacked...