You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
[
{
"partitions": [],
"os_pid": "3480",
"fd_total": 65536,
"sockets_total": 58893,
"mem_limit": 6871733043,
"mem_alarm": false,
"disk_free_limit": 2000000000,
"disk_free_alarm": false,
"proc_total": 1048576,
"rates_mode": "basic",
"uptime": 571207655,
"run_queue": 1,
"processors": 2,
"exchange_types": [
{
"name": "topic",
"description": "AMQP topic exchange, as per the AMQP specification",
"enabled": true
},
{
"name": "headers",
"description": "AMQP headers exchange, as per the AMQP specification",
"enabled": true
},
{
"name": "direct",
"description": "AMQP direct exchange, as per the AMQP specification",
"enabled": true
},
{
"name": "fanout",
"description": "AMQP fanout exchange, as per the AMQP specification",
"enabled": true
}
]
},
{
"partitions": [],
"os_pid": "3004",
"fd_total": 65536,
"sockets_total": 58893,
"mem_limit": 6871733043,
"mem_alarm": false,
"disk_free_limit": 2000000000,
"disk_free_alarm": false,
"proc_total": 1048576,
"rates_mode": "basic",
"uptime": 42968677,
"run_queue": 1,
"processors": 2,
"exchange_types": [
{
"name": "headers",
"description": "AMQP headers exchange, as per the AMQP specification",
"enabled": true
},
{
"name": "direct",
"description": "AMQP direct exchange, as per the AMQP specification",
"enabled": true
},
{
"name": "topic",
"description": "AMQP topic exchange, as per the AMQP specification",
"enabled": true
},
{
"name": "fanout",
"description": "AMQP fanout exchange, as per the AMQP specification",
"enabled": true
}
]
}
]
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 tried Length([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?
The text was updated successfully, but these errors were encountered:
@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?The text was updated successfully, but these errors were encountered: