History broken after cleaning up old data with trimhistory
list Alessandro Tinivelli
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
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 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> 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
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
▸
--
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.