From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernhard Bitsch To: development@lists.ipfire.org Subject: Re: Change to collectd.conf and collect.custom Date: Thu, 26 Jan 2023 16:25:35 +0100 Message-ID: <87ae90ad-96e0-2605-8e97-ed260b436faf@ipfire.org> In-Reply-To: <71323DDC-AC2D-4590-8468-7C4A6EA17733@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4184176744084848292==" List-Id: --===============4184176744084848292== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, Am 26.01.2023 um 15:34 schrieb Michael Tremer: > Hello Jon, >=20 > Hmm, but do you think they are essential for troubleshooting? >=20 > Cannot =E2=80=9Chtop=E2=80=9D tell you exactly the same? >=20 I don't think "htop" measures the same. "htop" gives the actual values,=20 the "collectd" RRDs contain the history. Regards, Bernhard > Best, > -Michael >=20 >> On 21 Jan 2023, at 17:26, jon wrote: >> >> Hello! >> >> >>> On Jan 20, 2023, at 10:19 AM, Michael Tremer wrote: >>> >>> Hello, >>> >>> Can I jump in and ask what you think the purpose of this graph is? >> >> For me it is mostly to troubleshoot. When I was experimenting with pmacct= I would watch the Graphs. >> >> FYI - My Graphs are different since I was experiment with the RRD colors. >> >> >> >>> >>> I have no idea what they should tell me. Can we not get rid of them entir= ely? >> >> I=E2=80=99d like to keep them but it honestly does not matter=E2=80=A6 >> >>> >>> 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 lik= e =E2=80=9Chey, this does not look right=E2=80=9D=E2=80=A6 >>> >>> -Michael >>> >>>> On 17 Jan 2023, at 18:34, jon wrote: >>>> >>>> Hello! >>>> >>>>> On Jan 17, 2023, at 7:50 AM, Bernhard Bitsch wro= te: >>>>> >>>>> Hi, >>>>> >>>>> good idea. >>>>> Why not put these 'addon' definitions into a file /etc/collectd.addons ? >>>> >>>> Ha! That was my first experiment! >>>> >>>> jon(a)deb11HPZ:~/dev/ipfire-2.x$ cat config/collectd/collectd.addon >>>> # Use this file to add add-on processes collectd >>>> >>>> >>>> Process "smbd" >>>> Process "nmbd" >>>> Process "squidguard" >>>> Process "qemu" >>>> Process "mpd" >>>> >>>> jon(a)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 RRD= s. >>>> >>>> There is a cron to clean-up year old RRDs: >>>> >>>> [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' -de= lete -o -type d -empty -delete >>>> [root(a)ipfire ~] # >>>> >>>> I can easily create >>>> /bin/find /var/log/rrd/collectd/localhost/processes* -mtime 1 -type f -n= ame '*.rrd' >>>> >>>> But this type of clean-up seems too hacked... >>>> >>>> >>>>> >>>>> Regards, >>>>> Bernhard >>>>> >>>>> 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 remov= e a few monitored processes. The items appear in the sect= ion 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 = not 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` fi= le: >>>>>> ``` >>>>>> >>>>>> 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" >>>>>> Process =E2=80=9Copenvpn" >>>>>> 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/collect= d.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/co= llectd` AND not overwrite the admin=E2=80=99s `/etc/collectd.custom` file? >>>> >>> >> >=20 --===============4184176744084848292==--