简体   繁体   中英

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? (without using its stack members like Logstash, FileBeats, Kibana, etc)

You can use curl commands in your terminal. 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

 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" } } }

You can find more on Here .

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.

Here's a few examples:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM