Clean up logs
list Manoj Biswakarma
Hi Xymon Team, I have xymon running at my work place for quite a long time and was wondering ways I can cleanup the old logs. 1. Is there some tools or feature in xymon which I can use to remove old logs or do I use command such as find to remove them ? 2. And if suppose I remove the old files from under "histlogs and hostdata" manually using find command, will it impact my xymon afterward ? The area for cleanup which I am referring to is pasted below: 4.0K acks 4.0K data 4.0K disabled 991M hist 56 G histlogs 195 G hostdata 4.0K logs 2.0G rrd $ pwd /home/xymon/data $ ls -l drwxr-xr-x. 2 xymon xymon 2 Sep 24 2014 acks drwxr-xr-x. 2 xymon xymon 2 Sep 24 2014 data drwxr-xr-x. 2 xymon xymon 2 Sep 24 2014 disabled drwxr-xr-x. 2 xymon xymon 8954 Oct 11 22:18 hist drwxr-xr-x. 483 xymon xymon 483 May 31 13:15 histlogs drwxr-xr-x. 264 xymon xymon 264 Apr 20 2017 hostdata drwxr-xr-x. 2 xymon xymon 2 Sep 24 2014 logs drwxr-xr-x. 483 xymon xymon 483 May 31 13:15 rrd Thank you in advance. Regards Manoj Biswakarma (Manoj)
list Dirk Kastens
Hi, I'm running a script from cron.daily that cleans up my data: /bin/su - xymon -c '/usr/libexec/xymon/trimhistory --cutoff=`date +%s --date="today -1 year"` --drop --droplogs --env=/etc/xymon/xymonserver.cfg' /bin/find /var/lib/xymon/hostdata -type f -mtime +7 -delete Regards, Dirk
list Manoj Biswakarma
Can you please share your script weems the path might be different than mine but i can change those and use it> # /bin/su - xymon -c '/usr/libexec/xymon/trimhistory --cutoff=`date +%s --date="today -1 year"` --drop --droplogs --env=/etc/xymon/xymonserver.cfg' -bash: /usr/libexec/xymon/trimhistory: No such file or directory Regards Manoj Biswakarma (Manoj)
▸
On Wednesday, November 15, 2017 02:42:07 AM EST, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi,
I'm running a script from cron.daily that cleans up my data:
/bin/su - xymon -c '/usr/libexec/xymon/trimhistory --cutoff=`date +%s
--date="today -1 year"` --drop --droplogs --env=/etc/xymon/xymonserver.cfg'
/bin/find /var/lib/xymon/hostdata -type f -mtime +7 -delete
Regards,
Dirk
list Paul Root
Trim history is in the xymon server executables directory. Whatever that is in your system. Should be the same place that xymon, xymoncmd, xymonlaunch, etc. On my system it is /usr/lib64/xymon/server/bin. The teribithia port might have it in /usr/sbin.
▸
From: manoj biswakarma [mailto:user-c727207a16e8@xymon.invalid]
Sent: Wednesday, November 15, 2017 8:17 AM
To: xymon at xymon.com; Dirk Kastens
Subject: Re: [Xymon] Clean up logs
Can you please share your script weems the path might be different than mine but i can change those and use it>
# /bin/su - xymon -c '/usr/libexec/xymon/trimhistory --cutoff=`date +%s --date="today -1 year"` --drop --droplogs --env=/etc/xymon/xymonserver.cfg'
-bash: /usr/libexec/xymon/trimhistory: No such file or directory
Regards
Manoj Biswakarma (Manoj)
On Wednesday, November 15, 2017 02:42:07 AM EST, Dirk Kastens <user-e4253f8fc63b@xymon.invalid<mailto:user-e4253f8fc63b@xymon.invalid>> wrote:
Hi,
I'm running a script from cron.daily that cleans up my data:
/bin/su - xymon -c '/usr/libexec/xymon/trimhistory --cutoff=`date +%s
--date="today -1 year"` --drop --droplogs --env=/etc/xymon/xymonserver.cfg'
/bin/find /var/lib/xymon/hostdata -type f -mtime +7 -delete
Regards,
Dirk
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.