A 'find' script is what I just ended up setting up. hostdata contains copies of client reports, which depending on the client can be quote large... AFAIK there is no way of using them for anything other than manually viewing on the filesystem. I decided to keep 10% of them (the ones ending in 0) just in case...
#!/bin/sh
number of days of logs to retain on disk
RETAINDAYS=30
export bbcmd env 2>/dev/null | grep BBVAR=
HOSTDATA=${BBVAR}/hostdata
find $HOSTDATA -type f \! -name \*0 -mtime +$RETAINDAYS -delete
That's essentially what I'd thought of doing but I just wanted to check if there was a built in way of doing it before I went ahead and wrote a script to run that kind of command.
-----Original Message----- From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Torsten Richter Sent: 28 October 2013 09:43 To: xymon at xymon.com <mailto:xymon at xymon.com> Subject: Re: [Xymon] Housekeeping on /xymon/data/hostdata
Ok, you seem to be right. But what about a 'find -mtime +180 -type f' in that directory and remove the files you'll get this way?
On 28.10.2013 10:31, Neil Simmonds wrote:
I've had a look at that but it looks to me like that is for managing the /xymon/data/histlogs folder not the /xymon/data/hostdata folder.
-----Original Message----- From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Torsten Richter Sent: 28 October 2013 09:16 To: xymon at xymon.com <mailto:xymon at xymon.com> Subject: Re: [Xymon] Housekeeping on /xymon/data/hostdata
Hi Neil,
take a look at the trimhistory command delivered with XYmon. I use it here to delete the history data older than a year. In addition I also have a script similar to the one on XYmonton that deletes the RRD files for hosts or tests that get no longer updated.
HTH Torsten
On 28.10.2013 09:47, Neil Simmonds wrote:
We've been getting some space issues recently on our /xymon filesystem. We don't really want to add more space so I am looking at implementing some housekeeping on the /xymon/data/hostdata folder.
If I run a find command there are nearly 58000 files over 180 days old and I don't really think we need to keep client data from alerts older than that. Is there a built in way to manage this or is it a case of writing a script to manage it?
Name & Registered Office: EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company No. 00718151. Express Gifts Limited is authorised and regulated by the Financial Services Authority
NOTE: This email and any information contained within or attached in a separate file is confidential and intended solely for the Individual to whom it is addressed. The information or data included is solely for the purpose indicated or previously agreed. Any information or data included with this e-mail remains the property of Findel PLC and the recipient will refrain from utilising the information for any purpose other than that indicated and upon request will destroy the information and remove it from their records. Any views or opinions presented are solely those of the author and do not necessarily represent those of Findel PLC. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. No warranties or assurances are made in relation to the safety and content of this e-mail and any attachments. No liability is accepted for any consequences arising from it. Findel Plc reserves the right to monitor all e-mail communications through its internal and external networks. If you have received this email in error please notify our IT helpdesk on +44(0) 1254 303030
Xymon mailing list Xymon at xymon.com <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
Name & Registered Office: EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company No. 00718151. Express Gifts Limited is authorised and regulated by the Financial Services Authority
NOTE: This email and any information contained within or attached in a separate file is confidential and intended solely for the Individual to whom it is addressed. The information or data included is solely for the purpose indicated or previously agreed. Any information or data included with this e-mail remains the property of Findel PLC and the recipient will refrain from utilising the information for any purpose other than that indicated and upon request will destroy the information and remove it from their records. Any views or opinions presented are solely those of the author and do not necessarily represent those of Findel PLC. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. No warranties or assurances are made in relation to the safety and content of this e-mail and any attachments. No liability is accepted for any consequences arising from it. Findel Plc reserves the right to monitor all e-mail communications through its internal and external networks. If you have received this email in error please notify our IT helpdesk on +44(0) 1254 303030
Xymon mailing list Xymon at xymon.com <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
Name & Registered Office: EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company No. 00718151.
Express Gifts Limited is authorised and regulated by the Financial Conduct Authority
NOTE: This email and any information contained within or attached in a separate file is confidential and intended solely for the Individual to whom it is addressed. The information or data included is solely for the purpose indicated or previously agreed. Any information or data included with this e-mail remains the property of Findel PLC and the recipient will refrain from utilising the information for any purpose other than that indicated and upon request will destroy the information and remove it from their records. Any views or opinions presented are solely those of the author and do not necessarily represent those of Findel PLC. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. No warranties or assurances are made in relation to the safety and content of this e-mail and any attachments. No liability is accepted for any consequences arising from it. Findel Plc reserves the right to monitor all e-mail communications through its internal and external networks. If you have received this email in error please notify our IT helpdesk on +44(0) 1254 303030
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- David Baldwin - Senior Systems Administrator (Datacentres + Networks) Information and Communication Technology Services Australian Sports Commission http://ausport.gov.au Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616 david.baldwin at ausport.gov.au Leverrier Street Bruce ACT 2617
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au