Skip to content

Commit

Permalink
only query Elastic-Agent logs datastream
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Nov 23, 2023
1 parent 23b0817 commit 4603baf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/testing/tools/estools/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func FindMatchingLogLinesWithContext(ctx context.Context, client elastictranspor
return Documents{}, fmt.Errorf("error creating ES query: %w", err)
}

return performQueryForRawQuery(ctx, queryRaw, "*ds-logs*", client)
return performQueryForRawQuery(ctx, queryRaw, "logs-elastic_agent*", client)

}

Expand Down Expand Up @@ -434,7 +434,7 @@ func CheckForErrorsInLogsWithContext(ctx context.Context, client elastictranspor
return Documents{}, fmt.Errorf("error creating ES query: %w", err)
}

return performQueryForRawQuery(ctx, queryRaw, "*ds-logs*", client)
return performQueryForRawQuery(ctx, queryRaw, "logs-elastic_agent*", client)

}

Expand All @@ -461,7 +461,7 @@ func GetLogsForAgentID(client elastictransport.Interface, id string) (Documents,

es := esapi.New(client)
res, err := es.Search(
es.Search.WithIndex("*.ds-logs*"),
es.Search.WithIndex("logs-elastic_agent*"),
es.Search.WithExpandWildcards("all"),
es.Search.WithBody(&buf),
es.Search.WithTrackTotalHits(true),
Expand Down

0 comments on commit 4603baf

Please sign in to comment.