Hi all,
My organization used to be pretty Splunk heavy in the past, but we’re slow shifting our Log Aggregation/Interrogation initiatives to Dynatrace.
I am far more versed in SPL that I am in DQL, so I was hoping to get some assistance with building a query for a specific scenario.
We have MQ Metrics being ingested via Logs into Dynatrace and I want to create a query that will show a timeseries of the actual values for Queue Depth over a period of time. In Splunk I could use the stats commands with the “values” option and it wouldn’t aggregate the values for that particular field - it would simply show them in a timeseries.
With DQL, I can only do AVG or SUM, or any of the other aggregations that are available, but I don’t want the Queue Depth to be aggregated, I just want a timeseries of the values as they were ingested.
I managed to create a query that shows Queue Name, Timestamp for the Event and the Queue Depth in a table view, but it’ll show me all occurrences for all the queues across the selected timeframe.
fetch logs
| filter dt.host_group.id == "hostgroupname"
| filter contains(log.source, "qstatus")
| parse content, """DATA ld:nasTimestamp "," ld:groupName "," ld:nodeName "," ld:queueManager "," ld:queueName "," ld:queueDepth "," ld:ipProcs "," ld:opProcs ","ld:messageAge "," ld:uncommittedMessages "," ld:putDate ","
ld:putTime "," ld:getDate "," ld:getTime ",""""
| filter startsWith(queueName, "APPLICATIONCODE")
| fields timestamp, queueName, queueDepth
I have searched the community forum and came across a solution to only show the last value for the queueDepth field, that did half of what I was hoping to achieve:
| summarize latestDepth = takeLast(queueDepth), by:{queueName}
But I still can’t figure out a way to have the queueDepth (or last queueDepth) values displayed in a timeseries.
Not sure I made myself abundantly clear, but I’m happy to try and further clarify the ask. ![]()
Thanks in advance.