refactor: clean up and add example config and pattern

This commit is contained in:
Patryk Hegenberg 2026-01-18 17:51:23 +01:00
parent 07798189a2
commit 17723de72f
10 changed files with 96 additions and 430 deletions

View file

@ -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()