1 Pluspunkt 0 Minuspunkte

Ich habe begonnen Windows Eventlogs mit Winlogbeat zu sammeln. Dabei werden allerdings so komische Indexe erstellt die immer mit ".ds" beginnen was Datastreams sind. Ich würde die Logs aber gerne in einem ganz normalen Index sammeln. Ich habe die Konfiguration umgeschrieben, davor war

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["172.21.0.134:9200"]

  # Protocol - either `http` (default) or `https`.
  protocol: "https"
  ssl.verification_mode: none

  # Authentication credentials - either API key or username/password.
  #api_key: "id:api_key"
  username: "elastic"
  password: "xxxxxxx"

  # Pipeline to route events to security, sysmon, or powershell pipelines.
  pipeline: "winlogbeat-%{[agent.version]}-routing"

und ich habe es zu 

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["172.21.0.134:9200"]

  # Protocol - either `http` (default) or `https`.
  protocol: "https"
  ssl.verification_mode: none

  # Authentication credentials - either API key or username/password.
  #api_key: "id:api_key"
  username: "elastic"
  password: "fw5XeLo_I0X470yF_XQL"

  # Pipeline to route events to security, sysmon, or powershell pipelines.
  index: "mytest-%{[agent.name]}"

setup.ilm.enabled: false
setup.ilm.overwrite: true
setup.template.name: "mytest"
setup.template.pattern: "mytest-*"

geändert. Aber trotzdem werden wieder Indexe mit ".ds" angelegt. Wie kann ich machen das der Index genau so heisst wie ich ihn in der yml Konfiguration angegeben habe?

von (0 Punkte)  

1 Antwort

0 Pluspunkte 0 Minuspunkte

Wenn noch ein Index Template vorhanden ist wird dieses automatisch auch auf neue Indices angewendet. Prüfe, welche templates vorhanden sind

curl -X GET "https://1<elastic-server>:9200/_index_template?pretty"

Du kannst das entsprechende Index template löschen und den Index neu erstellen.

curl -X DELETE "https://<elastic-server>:9200/_index_template/<template-name>"
von (844 Punkte)  
Aber wenn ich den Index neu erstelle sind die ganzen Daten aus dem alten Index aber weg. Kann ich den Index nicht umwandeln so das die Daten erhalten bleiben?
Du kannst einen Reindex machen , dabei werden die Daten aus dem alten Index in einen neuen Index übertragen. https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html