Docker - ELK Stack

ELK

Cluster

Node

Shard

index shard ilişkisi

Replica

cluster

Peki Replica shardlar nasıl güncel kalıyor?

Örnek bir seacrh sonuc

Elasticsearch ve Relational Database Kavramları

Elasticsearch DSL Sorgusu

{
"query": {
"match": {
"message": {
"query": "full-text arama sorgusu"
}
}
}
}
{
"query": {
"multi_match" : {
"query": "subject ve message alanlarında ara",
"fields": [ "subject", "message" ]
}
}
}
{
"query": {
"multi_all" : {}
}
}
{
"query": {
"term": {
"user.id": {
"value": "cihat",
"boost": 1.0
}
}
}
}
{
"query": {
"range": {
"age": {
"gte": 10, // Büyük eşittir.
"lte": 20 // Küçük eşittir.
}
}
}
}

elasticsearch.yml

docker-compose.yml

Docker Volume

kibana.yml

logstash.conf

logstash.yml

Bridge Network

docker-compose.yml

Elasticsearch Rest API

İndex Eklemek

curl -X PUT http://localhost:9200/index-name

İndexleri listelemek

curl -X GET 'http://localhost:9200/_cat/indices?v'
index list

Veri Eklemek

curl -XPUT --header 'Content-Type: application/json' http://localhost:9200/index-name/_doc/1 -d '{"orderMode" : "Delivery"}'

Url ile sorgulama

curl -X GET http://localhost:9200/index-name/_search?q=orderMode:Delivery

İndexteki tüm Dökümanları Listemek

curl -X GET 'http://localhost:9200/index-name/_search'

İndex’i silmek

curl -X DELETE 'http://localhost:9200/indexname'

--

--

Software Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store