[Xymon] Bug? Dropping host doesn't remove hostdata
cleaver at terabithia.org
cleaver at terabithia.org
Sat Jul 20 21:10:03 CEST 2013
> On Wed, 2013-07-17 at 00:38 +0000, cleaver at terabithia.org wrote:
>>
>> > Hello,
>> >
>> > Using Xymon 4.3.10 I wanted to remove a host completely, so used the
>> > following command on the Xymon server:
>> >
>> > xymon xxx.xxx.xxx.xxx "drop lib-srvr10"
>> >
>> > This removed all of the host data except for the 'lib-srvr10'
>> > subdirectory in the 'data/hostdata' directory. The subdirectory still
>> > contained all of the data files for the host.
>> >
>> > I had already removed the host from the hosts.cfg file, and restarted
>> > Xymon. No errors were seen in any of the log files.
>> >
>>
>> Hmm. Just ran this myself on the occasion of having a host to drop and
>> it
>> seemed to be working okay. Worked both for a host I was dropping "live"
>> and one that had already been deleted a restart or two ago ; in both
>> cases
>> the directory under hostdata/* was removed properly.
>>
>> Is this still occurring for you? Had it happened before?
>>
> I can probably test this with some test servers. However, where does the
> deletion of 'hostdata' directories occur? I'll add some
> logging/debugging to see if I can see what is going on.
>
The deletion is handled by xymond_hostdata.c when it gets a @@drophost
message (which gets sent to all channels by xymond and bypasses
xymond_channel filters). It's around 263 in the .c code in my copy.
== snip ==
else if ((metacount > 3) && (strncmp(metadata[0],
"@@drophost", 10) == 0)) {
/* @@drophost|timestamp|sender|hostname */
char hostdir[PATH_MAX];
sprintf(hostdir, "%s/%s", clientlogdir, metadata[3]);
dropdirectory(hostdir, 1);
}
== snip ==
At the risk of stating the obvious :) , did you double-check owner and
permissions on the dir?
-jc
More information about the Xymon
mailing list