-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate data #6
Comments
I suspect either the daylight saving time switch confused some part, but all my software usually just runs in UTC. Or otherwise the |
Hi, |
There was not yet a new log rotate. I will come back to you once there is one again. |
I actually encountered today that the exporter is no longer updating it's data. There are clearly some authentications happening in the |
Could be related to hpcloud/tail#189. This package is no longer supported tough and seems to be full of nasty bugs. There is a drop in replacement https://github.com/nxadm/tail. |
A few thoughts on the original question.
In the default settings logrotate for auth.log rotation (for example, in Ubuntu), the Accordingly, when the file is recreated, it is re-read again. I may assume that due to the time switching, the file could be read 2 times, which led to duplication.
Yes, the metric is a counter and, when the explorer is restarted, it is reset.
That makes sense, thank you! |
I do not see anything there, this is the whole log output since I restarted it:
Totally makes sense, sorry that I did not think about that. |
At the same time, there is no rotation of the auth.log since the restart. Right? Records of type
should appear in the exporter's logs at the time of rotation auth.log, if the parameter |
Correct
Exactly what was in the logs when the rotate happened (see a few comments above). |
I tested the situation with log rotation. The standard settings for logrotate on ubuntu were used. At the time of auth.log rotation, logrotate recreated the auth.log file. 2022/11/06 00:00:22 Re-opening moved/deleted file /var/log/auth.log ...
2022/11/06 00:00:22 Successfully reopened /var/log/auth.log At the same time, there was no doubling of metrics. So, perhaps, the initial problem is connected with the transition to daylight saving time. With standard rotation, the exporter processes the file re-creation correctly. Anyway, I updated dependencies for use revamped library |
Thanks for investigating this further. Today there was another log rotate on one of my machines and the behavior was exactly the same, graphs doubled and no new events registered since then. This is the complete log output of the container since it got started:
I am running a quite fresh install of ubuntu 22.04.
Actually I am already running the newest version. |
I encountered a strange behavior this night. At midnight UTC, which is also 2 am local time (at 3 am local time switched back to 2 am due to daylight saving, can not say which of the bove 2 am's it was) all the authlog metrics doubled their counters. At the same time the
auth.log
file rotated and was emptied.I double checked the
auth.log
file and there are no authentications around that time.Additional
Container logs:
Prometheus:
![image](https://user-images.githubusercontent.com/24812442/198870743-b7d7fd24-6fe7-46f8-b417-e5a1467d07c0.png)
The text was updated successfully, but these errors were encountered: