[英]Is is possible to index data into Elastic Search without using Logstash or FileBeats or Kibana?
Elastic Search is new to me.弹性搜索对我来说是新的。 I want to know whether it is possible to index data into Elastic Search with ES framework alone?
我想知道是否可以仅使用 ES 框架将数据索引到 Elastic Search 中? (without using its stack members like Logstash, FileBeats, Kibana, etc)
(不使用其堆栈成员,如 Logstash、FileBeats、Kibana 等)
You can use curl commands in your terminal.您可以在终端中使用 curl 命令。 Some famous ones
一些著名的
For delete an index用于删除索引
curl -X DELETE 'http://localhost:9200/samples'
For listing all indexes列出所有索引
curl -X GET 'http://localhost:9200/_cat/indices?v'
For adding a document to an index用于将文档添加到索引
curl -XPUT --header 'Content-Type: application/json' http://localhost:9200/samples/_doc/1 -d '{ "school": "Harvard" }'
For bulk load data in JSON format对于 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>
For showing the cluster health用于显示集群运行状况
curl --user $pwd -H 'Content-Type: application/json' -XGET https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243/_cluster/health?pretty
For query and returning some desired fields用于查询并返回一些需要的字段
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" } } }
Yes.是的。 Big time.
重要时刻。
There are a ton of tools you can use and a stack of SDKs, or you roll your own producer to hit the indexing APIs.您可以使用大量工具和大量 SDK,或者您可以使用自己的生产者来访问索引 API。
Here's a few examples:这里有几个例子:
Index APIs
Index APIs
Elastic publishes lists ofofficially supported clients and community supported clients , but they're heavy on programming languages and don't include things like the Fluentd output, the Kafka connector, and so on. Elastic 发布了官方支持的客户端和社区支持的客户端列表,但它们非常注重编程语言,并且不包括 Fluentd output、Kafka 连接器等内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.