I've started writing checks that return multiple metrics as JSON and then using multiple dependant items for induvidual metrics. This has worked out well, but there is one check I'm trying to do where I need to check for stalled processes, so I count items in a JSON array where the status is not "completed" and the timestamp is over 12 hours ago. Unfortunately I don't know of a way to do a jsonpath filter against the current timestamp, something like
$.body.documents[?(@.timestamp < NOW() - 12 hours)].length()
Any ideas, or will I need to change the data generation to add a field with the age of the document pre calculated?
$.body.documents[?(@.timestamp < NOW() - 12 hours)].length()
Any ideas, or will I need to change the data generation to add a field with the age of the document pre calculated?