Add bookmarking support to win_eventlog#8281
Closed
simnv wants to merge 1 commit intoinfluxdata:masterfrom
simnv:win_eventlog_bookmarks
Closed
Add bookmarking support to win_eventlog#8281simnv wants to merge 1 commit intoinfluxdata:masterfrom simnv:win_eventlog_bookmarks
simnv wants to merge 1 commit intoinfluxdata:masterfrom
simnv:win_eventlog_bookmarks
Conversation
win_eventlog plugin tracks processed events and automatically saves bookmarks in Windows Registry. So even if Windows is rebooted or plugin was in stopped state for some time, no events will be missed. Current event bookmark is saved under `Software\InfluxData\Telegraf` key in the `EventBookmark` string value. By default plugin tries to use `HKEY_LOCAL_MACHINE` hive, assuming it has Administrator privileges, but if it can't open key in this hive for writing, it tries to use `HKEY_CURRENT_USER` hive instead. If even `HKEY_CURRENT_USER` couldn't be opened (telegraf is started with no priviliges at all) or there was no previous bookmark saved, plugin subscribes to events starting from the current time.
Contributor
|
Hey @simnv - thanks for your PR! We think this is a tremendous feature that we actually want to implement across Telegraf and other plugins, not just I'm going to close this now as we're going to take this on as a bigger project for Telegraf. Please comment on the #8352 if you have any feedback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
win_eventlog plugin tracks processed events and automatically saves bookmarks in Windows Registry. So even if Windows is rebooted or plugin was in stopped state for some time, no events will be missed.
Current event bookmark is saved under
Software\InfluxData\Telegrafkey in theEventBookmarkstring value. By default plugin tries to useHKEY_LOCAL_MACHINEhive, assuming it has Administrator privileges, but if it can't open key in this hive for writing, it tries to useHKEY_CURRENT_USERhive instead.If even
HKEY_CURRENT_USERcouldn't be opened (telegraf is started with no priviliges at all) or there was no previous bookmark saved, plugin subscribes to events starting from the current time.Required for all PRs: