1

Considering I have this structure of json in datadog :

"parameter":
{
  "name":"mybeautifulvar",
  "value":"my_beautiful_string_value"
}

It's a regular extract for a value, one time a day, and I search to display the last value of this variable but I'm struggling on how to do it.

All I have been able to do is to display a count in a query value graph

index:main service:myservice @parameter.name:mybeautifulvar count_unique:@parameter.value

How can I get the last value instead of unique count ?

Matthew
  • 148
  • 1
  • 5

1 Answers1

0

Have you considered using the feature where log values can be turned into metrics?

Refer to: https://docs.datadoghq.com/logs/logs_to_metrics/

Since you already have a search scope, this should be straightforward to create the metric - you'll need to choose a name.

Then you can use a Query Value widget as you wanted and choose the last value aggregator to display the most recent value.

Mike Fiedler
  • 2,152
  • 1
  • 17
  • 33