Open c0shea opened 1 month ago
Thanks for raising this. I think the expression should be:
Length(@Properties[?].partitions) = 0
But I'm not sure it will work - first because the app sniffs for {
to detect JSON:
And second because of the way we currently use Seq.Syntax assuming that the content can be converted directly into a LogEvent
:
I think both problems can be overcome, but we'll need to exercise some care so it's not a super quick fix right now, unfortunately.
Trying to think up a shorter-term workaround but coming up blank currently; will loop back if one appears.
@nblumhardt Thanks for looking into it! No worries if it's not an easy fix that can be done soon. Was more curious to get it working, but I have other workarounds I can put in place in the meantime.
I'm trying to create a health check to alert on network partitions in RabbitMQ. I can successfully call the RabbitMQ API (
http://rabbitmq:15672/api/nodes
), but I can't figure out a data extraction expression that works. The JSON response looks like this:I'm trying to have the health check fail if the
partitions
array is not empty in any of the array elements. My cluster contains two nodes, so I triedLength([0].partitions) + Length([1].partitions)
but that didn't work.[?].partitions
also didn't work. Is there a way to extract a value when the outer element is an array instead of a root named property?