elk

Logstash beats input “invalid version of beats protocol”

冷暖自知 提交于 2021-02-11 13:10:20
问题 I'm writing a kibana plugin and a logstash pipeline. For my tests, I just wrote a logstash input like that: input { beats { port => 9600 ssl => false ssl_verify_mode => "none" } } But when I try to open a connection with node (code above): invoke = (parameters, id, port, host) => { var fs = require('fs'); console.log(`Sending message in beats, host= ${host}, port= ${port}, message= ${parameters.message}`); var connectionOptions = { host: host, port: port }; var client = lumberjack.client

how to write an Elasticsearch query having multiple conditions

不羁岁月 提交于 2021-02-05 09:44:39
问题 Need help constructing an ES query. Here's an example of the raw JSON of the documents: { "user_uuid": 1234, "keywords": "apple", "@timestamp": "2020-01-15", }, { "uuid": 1234, "keywords": "google", "@timestamp": "2020-01-21", }, { "uuid": 9876, "keywords": "youtube", "@timestamp": "2020-01-25", } Here is an example requirement: { "search_groups":[ { "keywords": [ "google", "microsoft", "tesla" ], "time_range": 2020-01-17 - 2020-01-22 }, { "keywords": [ "apple", "youtube", "spotify" ], "time

Failed to execute action :action=>LogStash::PipelineAction::Create/pipeline_id:main

喜你入骨 提交于 2021-01-29 03:51:00
问题 I have installed ELK stack version 7.0.0 on my CentOS7 VM and I faced with an issue during Logstash service start: [ERROR] 2019-05-13 08:21:37.359 [Converge PipelineAction::Create] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"MultiJson::ParseError", :message=>"JrJackson::ParseError", :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:20:in load'", "/usr/share/logstash/vendor

ELK. Nested values are not found

 ̄綄美尐妖づ 提交于 2021-01-07 04:14:09
问题 I have index mapping like below: { "mapping": { "properties": { "MyMapProperty": { "type": "nested", "properties": { "first": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "second": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, } }, "SecondProperty": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "ThirdProperty": { "type": "text", "fields": { "keyword": { "type":

Elasticsearch unassigned shards CircuitBreakingException[[parent] Data too large

霸气de小男生 提交于 2021-01-01 13:58:38
问题 I got alert stating elasticsearch has 2 unassigned shards. I made below api calls to gather more details. curl -s http://localhost:9200/_cluster/allocation/explain | python -m json.tool Output below "allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes", "can_allocate": "no", "current_state": "unassigned", "index": "docs_0_1603929645264", "node_allocation_decisions": [ { "deciders": [ { "decider": "max_retry", "decision": "NO", "explanation": "shard

Elasticsearch unassigned shards CircuitBreakingException[[parent] Data too large

馋奶兔 提交于 2021-01-01 13:54:46
问题 I got alert stating elasticsearch has 2 unassigned shards. I made below api calls to gather more details. curl -s http://localhost:9200/_cluster/allocation/explain | python -m json.tool Output below "allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes", "can_allocate": "no", "current_state": "unassigned", "index": "docs_0_1603929645264", "node_allocation_decisions": [ { "deciders": [ { "decider": "max_retry", "decision": "NO", "explanation": "shard

Bucket sort in composite aggregation?

跟風遠走 提交于 2020-12-13 03:15:44
问题 How can I do Bucket Sort in composite Aggregation? I need to do Composite Aggregation with Bucket sort. I have tried Sort with aggregation. I have tried composite aggregation. 回答1: I think this question, is in continuation to your previous question, so considered the same use case You need to use Bucket sort aggregation that is a parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. And please refer to this documentation on composite aggregation to know

Bucket sort in composite aggregation?

五迷三道 提交于 2020-12-13 03:15:43
问题 How can I do Bucket Sort in composite Aggregation? I need to do Composite Aggregation with Bucket sort. I have tried Sort with aggregation. I have tried composite aggregation. 回答1: I think this question, is in continuation to your previous question, so considered the same use case You need to use Bucket sort aggregation that is a parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. And please refer to this documentation on composite aggregation to know

Sort Aggregation in elastic seach?

流过昼夜 提交于 2020-12-13 03:07:11
问题 I have use case where I need to get all unique user ids from Elasticsearch and it should be sorted by timestamp. What I'm using currently is composite term aggregation with sub aggregation which will return the latest timestamp. (I can't sort it in client side as it slow down the script) Sample data in elastic search { "_index": "logstash-2020.10.29", "_type": "doc", "_id": "L0Urc3UBttS_uoEtubDk", "_version": 1, "_score": null, "_source": { "@version": "1", "@timestamp": "2020-10-29T06:56:00

Sort Aggregation in elastic seach?

Deadly 提交于 2020-12-13 03:06:37
问题 I have use case where I need to get all unique user ids from Elasticsearch and it should be sorted by timestamp. What I'm using currently is composite term aggregation with sub aggregation which will return the latest timestamp. (I can't sort it in client side as it slow down the script) Sample data in elastic search { "_index": "logstash-2020.10.29", "_type": "doc", "_id": "L0Urc3UBttS_uoEtubDk", "_version": 1, "_score": null, "_source": { "@version": "1", "@timestamp": "2020-10-29T06:56:00