Xymon Mailing List Archive search

History broken after cleaning up old data with trimhistory

4 messages in this thread

list Alessandro Tinivelli · Tue, 5 Feb 2019 22:05:03 +0000 ·
good day all,

my xymon 4.3.28-1.el7.terabithia running on Centos7 has encountered a problem since i made a cleanup using trimhistory command.

If a test (i.e. conn or anyelse) has been failing for a few hours, clicking the History Button shows all green bars, no red bars for the KO period.

The bars show red lines for previous failures only until the time i used the trimhistory.
What is the possible cause and solution?

I issued this command:

/usr/libexec/xymon/trimhistory --drop --droplogs --dropsvcs --cutoff=`date +%s --date="1 Oct 2018"` --env=/etc/xymon/xymonserver.cfg

Thanks in advance!
list Galen Johnson · Tue, 5 Feb 2019 18:14:54 -0500 ·
Check your permissions/ownership on the files/folders...I seem to recall
something similar happening to me and (for some reason) the ownerships of
the files had changed and they could not be updated any longer.

=G=

On Tue, Feb 5, 2019 at 5:05 PM Alessandro Tinivelli <
quoted from Alessandro Tinivelli
user-fdda70e8b835@xymon.invalid> wrote:
good day all,

my xymon 4.3.28-1.el7.terabithia running on Centos7 has encountered a
problem since i made a cleanup using trimhistory command.

If a test (i.e. conn or anyelse) has been failing for a few hours,
clicking the History Button shows all green bars, no red bars for the KO
period.

The bars show red lines for previous failures only until the time i used
the trimhistory.
What is the possible cause and solution?

I issued this command:

/usr/libexec/xymon/trimhistory --drop --droplogs --dropsvcs --cutoff=`date
+%s --date="1 Oct 2018"` --env=/etc/xymon/xymonserver.cfg

Thanks in advance!

list Ralph Mitchell · Tue, 5 Feb 2019 19:48:01 -0500 ·
I've had that too.  For me, it came down to running trimhistory as root
rather than as the xymon user.

Trimhistory creates a new file, reads through the old file and copies the
records you want to keep, then throws away the old file.  The new file is
owned by the user running the command, in my case, root.

Ralph Mitchell
quoted from Galen Johnson


On Tue, Feb 5, 2019 at 6:15 PM Galen Johnson <user-fc632e705d24@xymon.invalid> wrote:
Check your permissions/ownership on the files/folders...I seem to recall
something similar happening to me and (for some reason) the ownerships of
the files had changed and they could not be updated any longer.

=G=

On Tue, Feb 5, 2019 at 5:05 PM Alessandro Tinivelli <
user-fdda70e8b835@xymon.invalid> wrote:
good day all,

my xymon 4.3.28-1.el7.terabithia running on Centos7 has encountered a
problem since i made a cleanup using trimhistory command.

If a test (i.e. conn or anyelse) has been failing for a few hours,
clicking the History Button shows all green bars, no red bars for the KO
period.

The bars show red lines for previous failures only until the time i used
the trimhistory.
What is the possible cause and solution?

I issued this command:

/usr/libexec/xymon/trimhistory --drop --droplogs --dropsvcs
--cutoff=`date +%s --date="1 Oct 2018"` --env=/etc/xymon/xymonserver.cfg

Thanks in advance!

list Alessandro Tinivelli · Thu, 7 Feb 2019 08:35:33 +0000 ·
Thank you very much Galen and Ralph: i let trimhistory run again with sudo –u xymon…..
It seems to have solved the problem.

You saved me a lot of troubles ;-)
Alessandro
quoted from Ralph Mitchell

--
I've had that too.  For me, it came down to running trimhistory as root rather than as the xymon user.

Trimhistory creates a new file, reads through the old file and copies the records you want to keep, then throws away the old file.  The new file is owned by the user running the command, in my case, root.

Ralph Mitchell


On Tue, Feb 5, 2019 at 6:15 PM Galen Johnson <user-fc632e705d24@xymon.invalid<mailto:user-fc632e705d24@xymon.invalid>> wrote:
Check your permissions/ownership on the files/folders...I seem to recall something similar happening to me and (for some reason) the ownerships of the files had changed and they could not be updated any longer.