Skip to content

Commit

Permalink
fix typo in config variable name: BookmarkPath (#3298)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybrzeski authored Feb 9, 2021
1 parent 82cead2 commit 6c8fdd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 6c8fdd6

Please sign in to comment.