Xymon Mailing List Archive search

Managing Xymon Server Data Disk Usage

3 messages in this thread

list John Aldridge · Tue, 23 Aug 2011 17:02:06 -0400 ·
I've been watching disk usage grow on a Xymon server for about the past
six months, and this growth seems fairly steady and linear.

The big directories are histlogs and hostdata.

After digging into the documentation, I'm wondering what strategies
Xymon admins prefer for managing disk usage.

I've read through man pages for TRIMHISTORY and XYMOND_HISTORY, with its
options.
list Henrik Størner · Tue, 23 Aug 2011 23:33:26 +0200 ·
quoted from John Aldridge
On 23-08-2011 23:02, John Aldridge wrote:
I've been watching disk usage grow on a Xymon server for about the past
six months, and this growth seems fairly steady and linear.

The big directories are histlogs and hostdata.

After digging into the documentation, I'm wondering what strategies
Xymon admins prefer for managing disk usage.
hostdata: Used primarily for troubleshooting incidents. So you probably don't need to save this for very long. I keep it for one month, and simply run a cron-job to delete any files older than 30 days.

histlogs: Holds the detailed statuslogs that are linked to from the "History" and reports-pages. On the 1st of each month, I run a script to archive all of the history logs generated during the past month into a compressed cpio archive. They compress very well, so this is an effective way of archiving them. Then I delete all of the files that are older than 3 months.

With bash + GNU date, this will do it (run it on the 1st of the month):


# Delete histlogs from 4 months ago (so we always have the
# last 3 months online)
FNPATTERN=`date --date="today -4 months" +"???_%b_*_%Y"`
find histlogs -name "$FNPATTERN" | xargs rm

# Archive histlogs generated in the past month
FNPATTERN=`date --date="today -1 month" +"???_%b_*_%Y"`
ARCFN=`date --date="today -1 month" +"histlogs_%Y_%m.cpio.gz"`
find histlogs -name "$FNPATTERN" | \
    cpio -o | gzip >archive/$ARCFN

# Delete hostdata-files older than 30 days
find hostdata -mtime +30 | xargs rm


Regards,
Henrik
list Japheth Cleaver · Tue, 23 Aug 2011 14:40:32 -0700 ·
quoted from Henrik Størner
On 8/23/2011 2:33 PM, Henrik Størner wrote:
On 23-08-2011 23:02, John Aldridge wrote:
I've been watching disk usage grow on a Xymon server for about the past
six months, and this growth seems fairly steady and linear.

The big directories are histlogs and hostdata.

After digging into the documentation, I'm wondering what strategies
Xymon admins prefer for managing disk usage.
hostdata: Used primarily for troubleshooting incidents. So you probably
don't need to save this for very long. I keep it for one month, and
simply run a cron-job to delete any files older than 30 days.

histlogs: Holds the detailed statuslogs that are linked to from the
"History" and reports-pages. On the 1st of each month, I run a script to
archive all of the history logs generated during the past month into a
compressed cpio archive. They compress very well, so this is an
effective way of archiving them. Then I delete all of the files that are
older than 3 months.

With bash + GNU date, this will do it (run it on the 1st of the month):

Perhaps a patch to read <timestamp>.gz files in this dir as well and 
self pipe through gunzip on opening would be a nice feature?

That way you've still got live access and people compressing the files 
can leave them in place.

Eventually, it would be nice for xymon to use a compression library in 
other places too. For some links, it might be worth it to compress .data 
messages before sending them over, for example.

-jc