Elasticsearch Cheat Sheet (pfELK): Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „== Indices anzeigen == * curl -u elastic:123Start$ -k "https://localhost:9200/_cat/indices?v" == Alle Data Streams anzeigen == * curl -u elastic:123Start$ -k…“)
 
 
Zeile 15: Zeile 15:
  
 
== Letzte Dokumente (egal welcher Namespace) ==
 
== Letzte Dokumente (egal welcher Namespace) ==
* curl -u elastic:123Start$ -k \
+
* curl -u elastic:123Start$ -"https://localhost:9200/.ds-logs-pfelk-*/_search?pretty" -H 'Content-Type: application/json' -d '{
"https://localhost:9200/.ds-logs-pfelk-*/_search?pretty" \
+
  "size": 5,
-H 'Content-Type: application/json' -d '{
+
  "sort": [ { "@timestamp": "desc" } ],
  "size": 5,
+
  "_source": ["@timestamp","log.syslog.appname","data_stream.namespace","message"]
  "sort": [ { "@timestamp": "desc" } ],
+
}'
  "_source": ["@timestamp","log.syslog.appname","data_stream.namespace","message"]
 
}'
 
  
 
== Suche nach Keyword (z. B. suricata) ==
 
== Suche nach Keyword (z. B. suricata) ==

Aktuelle Version vom 13. September 2025, 17:52 Uhr

Indices anzeigen

Alle Data Streams anzeigen

Letzte Dokumente aus Suricata

  • curl -u elastic:123Start$ -k \

"https://localhost:9200/.ds-logs-pfelk-suricata-*/_search?pretty" \ -H 'Content-Type: application/json' -d '{

 "size": 5,
 "sort": [ { "@timestamp": "desc" } ],
 "_source": ["@timestamp","suricata.eve.alert.signature","source.ip","destination.ip","event.type"]

}'

Letzte Dokumente (egal welcher Namespace)

  "size": 5,
  "sort": [ { "@timestamp": "desc" } ],
  "_source": ["@timestamp","log.syslog.appname","data_stream.namespace","message"]
}'

Suche nach Keyword (z. B. suricata)

Index löschen (Beispiel suricata von heute)

Index-Template (Übersicht)

Cluster-Health