RabbitMQ plugin - extra fields:

Extra fields describing size of all message bodies in the queue.
* message_bytes
* message_bytes_ready
* message_bytes_unacknowledged
* message_bytes_ram
* message_bytes_persistent

More information about each field:
https://www.rabbitmq.com/man/rabbitmqctl.1.man.html
This commit is contained in:
Lukasz Jagiello 2016-01-25 19:17:58 +00:00
parent 5349a3b6d1
commit 478711c229
2 changed files with 19 additions and 3 deletions

View File

@ -57,9 +57,14 @@ type ObjectTotals struct {
} }
type QueueTotals struct { type QueueTotals struct {
Messages int64 Messages int64
MessagesReady int64 `json:"messages_ready"` MessagesReady int64 `json:"messages_ready"`
MessagesUnacknowledged int64 `json:"messages_unacknowledged"` MessagesUnacknowledged int64 `json:"messages_unacknowledged"`
MessageBytes int64 `json:"message_bytes"`
MessageBytesReady int64 `json:"message_bytes_ready"`
MessageBytesUnacknowledged int64 `json:"message_bytes_unacknowledged"`
MessageRam int64 `json:"message_bytes_ram"`
MessagePersistent int64 `json:"message_bytes_persistent"`
} }
type Queue struct { type Queue struct {
@ -270,6 +275,11 @@ func gatherQueues(r *RabbitMQ, acc inputs.Accumulator, errChan chan error) {
"consumer_utilisation": queue.ConsumerUtilisation, "consumer_utilisation": queue.ConsumerUtilisation,
"memory": queue.Memory, "memory": queue.Memory,
// messages information // messages information
"message_bytes": queue.MessageBytes,
"message_bytes_ready": queue.MessageBytesReady,
"message_bytes_unacked": queue.MessageBytesUnacknowledged,
"message_bytes_ram": queue.MessageRam,
"message_bytes_persist": queue.MessagePersistent,
"messages": queue.Messages, "messages": queue.Messages,
"messages_ready": queue.MessagesReady, "messages_ready": queue.MessagesReady,
"messages_unack": queue.MessagesUnacknowledged, "messages_unack": queue.MessagesUnacknowledged,

View File

@ -407,6 +407,12 @@ func TestRabbitMQGeneratesMetrics(t *testing.T) {
"messages_ready", "messages_ready",
"messages_unacked", "messages_unacked",
"message_bytes",
"message_bytes_ready",
"message_bytes_unacked",
"message_bytes_ram",
"message_bytes_persist",
"messages_acked", "messages_acked",
"messages_delivered", "messages_delivered",
"messages_published", "messages_published",