From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: Change to collectd.conf and collect.custom Date: Thu, 26 Jan 2023 14:34:31 +0000 Message-ID: <71323DDC-AC2D-4590-8468-7C4A6EA17733@ipfire.org> In-Reply-To: <23C86CDC-6C30-4940-B263-37E2EC06007E@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4169604603126803526==" List-Id: --===============4169604603126803526== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Jon, Hmm, but do you think they are essential for troubleshooting? Cannot =E2=80=9Chtop=E2=80=9D tell you exactly the same? Best, -Michael > On 21 Jan 2023, at 17:26, jon wrote: >=20 > Hello! >=20 >=20 >> On Jan 20, 2023, at 10:19 AM, Michael Tremer = wrote: >>=20 >> Hello, >>=20 >> Can I jump in and ask what you think the purpose of this graph is? >=20 > For me it is mostly to troubleshoot. When I was experimenting with pmacct = I would watch the Graphs. >=20 > FYI - My Graphs are different since I was experiment with the RRD colors. >=20 > >=20 >>=20 >> I have no idea what they should tell me. Can we not get rid of them entire= ly? >=20 > I=E2=80=99d like to keep them but it honestly does not matter=E2=80=A6 >=20 >>=20 >> I believe the sole reason why those graphs exist is because collectd *can*= collect this kind of data. But I have never looked at them and realised like= =E2=80=9Chey, this does not look right=E2=80=9D=E2=80=A6 >>=20 >> -Michael >>=20 >>> On 17 Jan 2023, at 18:34, jon wrote: >>>=20 >>> Hello! >>>=20 >>>> On Jan 17, 2023, at 7:50 AM, Bernhard Bitsch wrot= e: >>>>=20 >>>> Hi, >>>>=20 >>>> good idea. >>>> Why not put these 'addon' definitions into a file /etc/collectd.addons ? >>>=20 >>> Ha! That was my first experiment! >>>=20 >>> jon(a)deb11HPZ:~/dev/ipfire-2.x$ cat config/collectd/collectd.addon >>> # Use this file to add add-on processes collectd >>>=20 >>> >>> Process "smbd" >>> Process "nmbd" >>> Process "squidguard" >>> Process "qemu" >>> Process "mpd" >>> >>> jon(a)deb11HPZ:~/dev/ipfire-2.x$=20 >>>=20 >>> I was worried it might cause confusion by adding one more include file. >>>=20 >>>> One problem rermains. services.cgi displays all existent collectd RRDs. = Therefore these should be deleted in case of uninstallation of a addon. >>>=20 >>> I did see the delete issue but I am not sure how to clean-up the old RRDs. >>>=20 >>> There is a cron to clean-up year old RRDs: >>>=20 >>> [root(a)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' -del= ete -o -type d -empty -delete >>> [root(a)ipfire ~] #=20 >>>=20 >>> I can easily create=20 >>> /bin/find /var/log/rrd/collectd/localhost/processes* -mtime 1 -type f -na= me '*.rrd' >>>=20 >>> But this type of clean-up seems too hacked... >>>=20 >>>=20 >>>>=20 >>>> Regards, >>>> Bernhard >>>>=20 >>>> Am 17.01.2023 um 05:10 schrieb jon: >>>>> All, >>>>> I=E2=80=99d like to make a change to the `/etc/collectd.conf` to remove= a few monitored processes. The items appear in the secti= on of the config file. And the processes appear at the bottom of the https:/= /ipfire.localdomain:444/cgi-bin/services.cgi WebGUI page. >>>>> Why you ask? Mostly because smbd, nmbd, squidguard, qemu, or mpd are n= ot used (at least by me!). And so the users of those items are not left out,= I=E2=80=99d like to move those items to a `collect.custom`. >>>>> So overall idea is the core processes would be in `collectd.conf` file.= And the add-on processes will be in `collect.custom`. >>>>> This is a snip of the plugin process section of the `collectd.conf` fil= e: >>>>> ``` >>>>> >>>>> Process =E2=80=9Csshd" to Process "sshd" >>>>> Process =E2=80=9Csmbd" this Process "squid" >>>>> Process =E2=80=9Cnmbd=E2=80=9D ---> Process "charon" >>>>> Process "squid" Process "openvpn" >>>>> Process =E2=80=9Csquidguard" >>>>> Process =E2=80=9Ccharon"=20 >>>>> Process =E2=80=9Copenvpn"=20 >>>>> Process "qemu" >>>>> Process "mpd" >>>>> >>>>> ``` >>>>> The items removed from the `collectd.conf` file would move to `collect.= custom`. >>>>> >>>>> Process "smbd" >>>>> Process "nmbd" >>>>> Process "squidguard" >>>>> Process "qemu" >>>>> Process "mpd" >>>>> >>>>> But the problem is I don=E2=80=99t want to overwrite the `/etc/collectd= .custom` file incase an admin has modified it for their own use. >>>>> The big question >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> So how do I change the `collectd.custom` file in `ipfire-2.x/config/col= lectd` AND not overwrite the admin=E2=80=99s `/etc/collectd.custom` file? >>>=20 >>=20 >=20 --===============4169604603126803526==--