10 Dec 2024 09:58 AM
I have a workflow that has the below DQL task, I want to run and compare executions of this and create a list (of new unhealthy workers).
fetch logs
| filter contains(log.tag, "octopus_workers")
| parse content, "JSON:json"
| fieldsFlatten json
| expand json.content
| fieldsFlatten json.content
| expand json.content.alertText
| fieldsFlatten json.content.alertText
| fields timestamp, Id=json.content.alertText.Id
The table looks like:
The timestamps are only currently ever 12hrs, (via the task that ingests the logs) but I will eventually ingest logs every 5min from workflow.
So the ability to compare Id's from previous 5min and capture Ids that are recently added.
13 Dec 2024 03:16 PM
Think maybe more than one way to do this, looking for the simplest, think if it ingests logs every 5min, I could compare the Id column from one execution to another and grab any unique ones. OR could make one DQL query that compares logs from the different times (now and -5min) but not having luck finding any examples of what I want to do.
Thanks