logstash-plugins / logstash-output-opentsdb

Apache License 2.0
5 stars 13 forks source link

How to use dynamic arry field with output? #10

Closed rober0371 closed 6 years ago

rober0371 commented 6 years ago

I want to use a dynamic arry field in the logstash,but i try again and again,there is no data in my opentsdb.I need help!!!!

input data:

{ "X-Span-Export" => "true", "level" => "INFO", "springMetrics" => [ [0] "uc-user-security-api", [1] "20", [2] "appName", [3] "uc-user-security-api", [4] "port", [5] "81" ], "message" => "{\"springMetrics\":[\"uc-user-security-api\",\"20\",\"appName\",\"uc-user-security-api\",\"port\",\"81\"],\"timestamp\":1531987655428}", "type" => "openapi", "tags" => [ [0] "tcp", [1] "TSDB" ], "springAppName" => "uc-user-security-api", "@timestamp" => 2018-07-19T08:07:35.428Z, "X-B3-SpanId" => "3b6294dc71ce79f3", "thread_name" => "http-nio-81-exec-4", "level_value" => 20000, "@version" => "1", "host" => "10.168.138.50", "X-B3-TraceId" => "3b6294dc71ce79f3", "logger_name" => "tsdb", "timestamp" => 1531987655428 }

output code:

opentsdb { host => "10.168.99.108" port => 4242 metrics => [springMetrics] }

I try metrics with :[springMetrics]、 "%{[springMetrics]}"、springMetrics..... but no data into my opentsdb ,why?

robbavey commented 6 years ago

I apologize for the inconvenience, but this is a usage question, and should be asked at https://discuss.elastic.co.

GitHub is for coding issues and error reporting.