![](/img/trans.png)
[英]Is there a way of sending data directly to elasticsearch without using filebeats and logstash?
[英]Is is possible to index data into Elastic Search without using Logstash or FileBeats or Kibana?
彈性搜索對我來說是新的。 我想知道是否可以僅使用 ES 框架將數據索引到 Elastic Search 中? (不使用其堆棧成員,如 Logstash、FileBeats、Kibana 等)
您可以在終端中使用 curl 命令。 一些著名的
用於刪除索引
curl -X DELETE 'http://localhost:9200/samples'
列出所有索引
curl -X GET 'http://localhost:9200/_cat/indices?v'
用於將文檔添加到索引
curl -XPUT --header 'Content-Type: application/json' http://localhost:9200/samples/_doc/1 -d '{ "school": "Harvard" }'
對於 JSON 格式的批量加載數據
export pwd="elastic:" curl --user $pwd -H 'Content-Type: application/x-ndjson' -XPOST 'https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243/0/_bulk?pretty' --data-binary @<file>
用於顯示集群運行狀況
curl --user $pwd -H 'Content-Type: application/json' -XGET https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243/_cluster/health?pretty
用於查詢並返回一些需要的字段
GET filebeat-7.6.2-2020.05.05-000001/_search { "_source": ["suricata.eve.timestamp","source.geo.region_name","event.created"], "query": { "match": { "source.geo.country_iso_code": "GR" } } }
您可以在此處找到更多信息。
是的。 重要時刻。
您可以使用大量工具和大量 SDK,或者您可以使用自己的生產者來訪問索引 API。
這里有幾個例子:
Index APIs
Elastic 發布了官方支持的客戶端和社區支持的客戶端列表,但它們非常注重編程語言,並且不包括 Fluentd output、Kafka 連接器等內容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.