Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logstash datadog metrics output plugins can not resolve variable in dd_tags #15

Open
jinesh90 opened this issue Jul 24, 2019 · 0 comments

Comments

@jinesh90
Copy link

Please post all product and debugging questions on our forum. Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.

For all general issues, please provide the following details for fast resolution:

  • Version: logstash-output-datadog_metrics (3.0.4)
  • Operating System: ubuntu 18.06 GA
  • Config File (if you have sensitive info, please remove it):
    {code}
    input {
    tcp {
    codec => fluent
    port => 4400
    }
    }
    filter{
    json {
    source => "log"

}
}
output {
datadog_metrics {
api_key => <api_key>
metric_name => "test.metrics"
metric_type => "counter"
metric_value => 1
dd_tags => ["servicename:%{service}"]
}
}
{code}

  • Sample Data:
    {code}

{code}
{
"traceId" => "1234",
"service" => "testlog",
"@Version" => "1",
"log" => "{"timeMillis":1563999134904,"thread":"main","level":"INFO","loggerName":"logger","message":"Starting registrar","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":1,"threadPriority":5,"timestamp":"2019-07-24T20:12:14.904","build":"11112","traceId":"1234","service":"testlog"}\r",
"container_name" => "container1",
"timestamp" => "2019-07-24T20:12:14.904",
"host" => "12.123.12.12",
"@timestamp" => 2019-07-24T20:12:14.000Z,
"thread" => "main",
"tags" => [
[0] "f8cdd0aeb906",
[1] "servicename:testlog"
],
"region" => "us-west-2",
"source" => "stdout",
"service_name" => "testlog",
"message" => "Starting registrar",
"build" => "11112",
"timeMillis" => 1563999134904,
"loggerName" => "logger",
"container_id" => "f65421a",
"level" => "INFO",
"endOfBatch" => false,
"port" => 41704
}
{code}

  • Steps to Reproduce:
  1. use the logstash.conf according to config.
  2. make sure you have installed logstash-output-datadog_metrics (3.0.4)
  3. in logstash config, output part, make sure user filled correct information about datadog key and other params
  4. use json parser as filter. and fluentd as input mentioned in logstash.conf.
  5. in dd_tag field, use any of parsed json value,( in this case, "%{service}")

Issue:
in data dog, metrics created as per expectation, but tag is not resolving value of "%{service}", it should be "testlog" but it takes as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant