Skip to content
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

Promtail: fix typo in config variable name - BookmarkPath #3298

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/promtail/scrapeconfig/scrapeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ type WindowsEventsTargetConfig struct {
// timestamp if it's set.
UseIncomingTimestamp bool `yaml:"use_incoming_timestamp"`

// BoorkmarkPath sets the bookmark location on the filesystem.
// BookmarkPath sets the bookmark location on the filesystem.
// The bookmark contains the current position of the target in XML.
// When restarting or rollingout promtail, the target will continue to scrape events where it left off based on the bookmark position.
// The position is updated after each entry processed.
BoorkmarkPath string `yaml:"bookmark_path"`
BookmarkPath string `yaml:"bookmark_path"`

// PollInterval is the interval at which we're looking if new events are available. By default the target will check every 3seconds.
PollInterval time.Duration `yaml:"poll_interval"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/promtail/targets/windows/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func New(
}
defer windows.CloseHandle(sigEvent)

bm, err := newBookMark(cfg.BoorkmarkPath)
bm, err := newBookMark(cfg.BookmarkPath)
if err != nil {
return nil, fmt.Errorf("failed to create bookmark using path=%s: %w", cfg.BoorkmarkPath, err)
return nil, fmt.Errorf("failed to create bookmark using path=%s: %w", cfg.BookmarkPath, err)
}

t := &Target{
Expand Down
4 changes: 2 additions & 2 deletions pkg/promtail/targets/windows/target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func Test_GetCreateBookrmark(t *testing.T) {
client := fake.New(func() {})
defer client.Stop()
ta, err := New(util_log.Logger, client, nil, &scrapeconfig.WindowsEventsTargetConfig{
BoorkmarkPath: "c:foo.xml",
BookmarkPath: "c:foo.xml",
PollInterval: time.Microsecond,
Query: `<QueryList>
<Query Id="0" Path="Application">
Expand Down Expand Up @@ -92,7 +92,7 @@ func Test_GetCreateBookrmark(t *testing.T) {
client = fake.New(func() {})
defer client.Stop()
ta, err = New(util_log.Logger, client, nil, &scrapeconfig.WindowsEventsTargetConfig{
BoorkmarkPath: "c:foo.xml",
BookmarkPath: "c:foo.xml",
PollInterval: time.Microsecond,
Query: `<QueryList>
<Query Id="0" Path="Application">
Expand Down