refactor: clean up and add example config and pattern
This commit is contained in:
parent
07798189a2
commit
17723de72f
10 changed files with 96 additions and 430 deletions
|
|
@ -70,7 +70,7 @@ func (esc *ElasticsearchClient) SendBatch(baseIndex string, entries []models.Log
|
|||
|
||||
var body strings.Builder
|
||||
for _, entry := range entries {
|
||||
indexName := "tixel"
|
||||
indexName := "watch"
|
||||
|
||||
indexLine := fmt.Sprintf(`{"index":{"_index":"%s"}}`, indexName)
|
||||
body.WriteString(indexLine)
|
||||
|
|
@ -117,7 +117,7 @@ func (esc *ElasticsearchClient) SendSystemMetrics(baseIndex string, metrics mode
|
|||
return fmt.Errorf("JSON marshalling error: %w", err)
|
||||
}
|
||||
|
||||
systemIndex := "tixel"
|
||||
systemIndex := "watch"
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue