feat: implement drain3 based generic log-parser
This commit is contained in:
parent
1d1568e3ee
commit
5af49f926a
17 changed files with 612 additions and 220 deletions
|
|
@ -70,7 +70,6 @@ func (esc *ElasticsearchClient) SendBatch(baseIndex string, entries []models.Log
|
|||
|
||||
var body strings.Builder
|
||||
for _, entry := range entries {
|
||||
// indexName := determineIndexName(baseIndex, entry)
|
||||
indexName := "tixel"
|
||||
|
||||
indexLine := fmt.Sprintf(`{"index":{"_index":"%s"}}`, indexName)
|
||||
|
|
@ -146,14 +145,3 @@ func (esc *ElasticsearchClient) SendSystemMetrics(baseIndex string, metrics mode
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// func determineIndexName(baseIndex string, entry LogEntry) string {
|
||||
// switch entry.Type {
|
||||
// case "system_metrics":
|
||||
// return fmt.Sprintf("%s-system", baseIndex)
|
||||
// case "service_log":
|
||||
// return fmt.Sprintf("%s-service-%s", baseIndex, entry.Service)
|
||||
// default:
|
||||
// return fmt.Sprintf("%s-%s", baseIndex, entry.Tool)
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue