fix typo in config variable name: BookmarkPath (#3298)

pull/3321/head
Gregory Brzeski 4 years ago committed by GitHub
parent 82cead2af7
commit 6c8fdd68aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      pkg/promtail/scrapeconfig/scrapeconfig.go
  2. 4
      pkg/promtail/targets/windows/target.go
  3. 4
      pkg/promtail/targets/windows/target_test.go

@ -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"`

@ -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{

@ -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">
@ -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">

Loading…
Cancel
Save