1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736
|
<html>
<head>
<title>RabbitMQ Management HTTP Stats</title>
<style>
body { font: 12px Verdana,sans-serif; color: #444; padding: 8px 35px; }
td, th { font: 12px Verdana,sans-serif; color: #444; }
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
td.path { font-family: monospace; }
th { font-size 1em; font-weight: bold; }
table { border-collapse: collapse; }
table th, table td { vertical-align: top; border: 1px solid #bbb; padding: 5px; }
code { background: #ffa; }
pre { background: black; color: #0f0; padding: 10px; word-wrap: break-word;}
table pre { background: #ffa; color: black; }
</style>
</head>
<body>
<h1>RabbitMQ Management HTTP Stats</h1>
<h2>Introduction</h2>
<p>
Most of the GET requests you can issue to the HTTP API return
JSON objects with a large number of keys. While a few of these
keys represent things you set yourself in a PUT request or AMQP
command (e.g. queue durability or arguments), most of them
represent statistics to do with the object in question. This
page attempts to document them.
</p>
<p>
It should be read in conjunction with the manual page
for <code>rabbitmqctl</code> (see your installation if on Unix / Linux,
or <a href="http://www.rabbitmq.com/man/rabbitmqctl.1.man.html">the
RabbitMQ website</a> for the latest version). Any field which can
be returned by a command of the form <code>rabbitmqctl
list_<i>something</i></code> will also be returned in the
equivalent part of the HTTP API, so all those keys are not
documented here. However, the HTTP API also adds a lot of extra
fields which are not available in <code>rabbitmqctl</code>.
</p>
<h2>_details objects</h2>
<p>
Many fields represent a count of some kind: queue length,
messages acknowledged, bytes received and so on. Such absolute
counts returned by the HTTP API will often have a
corresponding <code>_details</code> object which offers
information on how this count has changed. So for example, from
a queue:
</p>
<pre> "messages": 123619,
"messages_details": {
"avg": 41206.333333333336,
"avg_rate": 1030.1583333333333,
"rate": 24723.8,
"samples": [
{
"sample": 123619,
"timestamp": 1400680560000
},
{
"sample": 0,
"timestamp": 1400680500000
},
{
"sample": 0,
"timestamp": 1400680440000
}
]
}</pre>
<p>
Here we have a <code>messages</code> count (the total messages
in the queue), with some additional data:
</p>
<table>
<tr>
<td><code>avg</code></td>
<td>
The average value for the requested time period (see below).
</td>
</tr>
<tr>
<td><code>avg_rate</code></td>
<td>
The average rate for the requested time period.
</td>
</tr>
<tr>
<td><code>rate</code></td>
<td>
How much the count has changed per second in the most recent
sampling interval.
</td>
</tr>
<tr>
<td><code>samples</code></td>
<td>
Snapshots showing how the value has changed over the
requested time period.
</td>
</tr>
</table>
<p>
<code>avg</code>, <code>avg_rate</code> and <code>samples</code>
will only appear if you request a specific time period by
appending query parameters to the URL. To do this you need to
set an age and an increment for the samples you want. The end of
the range returned will always correspond to the present.
</p>
<p>
Use <code>msg_rates_age</code>
and <code>msg_rates_incr</code> to return samples for messages
sent and received, <code>data_rates_age</code>
and <code>data_rates_incr</code> to return samples for bytes
sent and received, and <code>lengths_age</code>
and <code>lengths_incr</code> to return samples for queue
lengths. For example,
appending <code>?lengths_age=3600&lengths_incr=60</code> will
return the last hour's data on queue lengths, with a sample for
every minute.
</p>
<h2>message_stats objects</h2>
<p>
Many objects (including queues, exchanges and channels) will
return counts of messages passing through them. These are
included in a <code>message_stats</code> object (which in turn
will contain <code>_details</code> objects for each count, as
described above).
</p>
<p>
These can contain:
</p>
<table>
<tr>
<td><code>publish</code></td>
<td>
Count of messages published.
</td>
</tr>
<tr>
<td><code>publish_in</code></td>
<td>
Count of messages published "in" to an exchange, i.e. not
taking account of routing.
</td>
</tr>
<tr>
<td><code>publish_out</code></td>
<td>
Count of messages published "out" of an exchange,
i.e. taking account of routing.
</td>
</tr>
<tr>
<td><code>confirm</code></td>
<td>
Count of messages confirmed.
</td>
</tr>
<tr>
<td><code>deliver</code></td>
<td>
Count of messages delivered in acknowledgement mode to consumers.
</td>
</tr>
<tr>
<td><code>deliver_noack</code></td>
<td>
Count of messages delivered in no-acknowledgement mode to consumers.
</td>
</tr>
<tr>
<td><code>get</code></td>
<td>
Count of messages delivered in acknowledgement mode in
response to basic.get.
</td>
</tr>
<tr>
<td><code>get_noack</code></td>
<td>
Count of messages delivered in no-acknowledgement mode in
response to basic.get.
</td>
</tr>
<tr>
<td><code>deliver_get</code></td>
<td>
Sum of all four of the above.
</td>
</tr>
<tr>
<td><code>redeliver</code></td>
<td>
Count of subset of messages in <code>deliver_get</code>
which had the redelivered flag set.
</td>
</tr>
<tr>
<td><code>return</code></td>
<td>
Count of messages returned to publisher as unroutable.
</td>
</tr>
</table>
<p>
Only fields for which some activity has taken place will appear.
</p>
<h2>Detailed message stats objects</h2>
<p>
In addition, queues, exchanges and channels will return a
breakdown of message stats for each of their neighbours
(i.e. adjacent objects in the chain: channel -> exchange ->
queue -> channel).
</p>
<p>
As this possibly constitutes a large quantity of data, it is
only returned when querying a single channel, queue or exchange
rather than a list. Note also that the default sample retention
policy means that these detailed message stats do not retain
historical data for more than a few seconds.
</p>
<p>
The detailed message stats objects have different names
depending on where they are (documented below). Each set of
detailed stats consists of a list of objects with two fields,
one identifying the partner object and one <code>stats</code>
which is a message_stats object as described above.
</p>
<p>
For example, from a queue:
</p>
<pre> "incoming": [
{
"stats": {
"publish": 352593,
"publish_details": {
"rate": 100.2
}
},
"exchange": {
"name": "my-exchange",
"vhost": "/"
}
}
{
"stats": {
"publish": 543784,
"publish_details": {
"rate": 54.6
}
},
"exchange": {
"name": "amq.topic",
"vhost": "/"
}
}
],</pre>
<p>
This queue is currently receiving messages from two exchanges:
100.2 msg/s from "my-exchange" and 54.6 msg/s from "amq.topic".
</p>
<h2>/api/overview</h2>
<p>
This has the following fields:
</p>
<table>
<tr>
<td><code>cluster_name</code></td>
<td>
The name of the entire cluster, as set with <code>rabbitmqctl
set_cluster_name</code>.
</td>
</tr>
<tr>
<td><code>erlang_full_version</code></td>
<td>
A string with extended detail about the Erlang VM and how it
was compiled, for the node connected to.
</td>
</tr>
<tr>
<td><code>erlang_version</code></td>
<td>
A string with the Erlang version of the node connected
to. As clusters should all run the same version this can be
taken as representing the cluster.
</td>
</tr>
<tr>
<td><code>exchange_types</code></td>
<td>
A list of all exchange types available.
</td>
</tr>
<tr>
<td><code>listeners</code></td>
<td>
All (non-HTTP) network listeners for all nodes in the
cluster. (See <code>contexts</code>
in <code>/api/nodes</code> for HTTP).
</td>
</tr>
<tr>
<td><code>management_version</code></td>
<td>
Version of the management plugin in use.
</td>
</tr>
<tr>
<td><code>message_stats</code></td>
<td>
A message_stats object for everything the user can see - for
all vhosts regardless of permissions in the case
of <code>monitoring</code> and <code>administrator</code>
users, and for all vhosts the user has access to for other
users.
</td>
</tr>
<tr>
<td><code>node</code></td>
<td>
The name of the cluster node this management plugin instance
is running on.
</td>
</tr>
<tr>
<td><code>object_totals</code></td>
<td>
An object containing global counts of all connections,
channels, exchanges, queues and consumers, subject to the
same visibility rules as for <code>message_stats</code>.
</td>
</tr>
<tr>
<td><code>queue_totals</code></td>
<td>
An object containing sums of
the <code>messages</code>, <code>messages_ready</code>
and <code>messages_unacknowledged</code> fields for all
queues, again subject to the same visibility rules as
for <code>message_stats</code>.
</td>
</tr>
<tr>
<td><code>rabbitmq_version</code></td>
<td>
Version of RabbitMQ on the node which processed this request.
</td>
</tr>
<tr>
<td><code>statistics_db_node</code></td>
<td>
Name of the cluster node hosting the management statistics database.
</td>
</tr>
<tr>
<td><code>statistics_level</code></td>
<td>
Whether the node is running fine or coarse statistics.
</td>
</tr>
</table>
<h2>/api/nodes</h2>
<p>
This has the following fields:
</p>
<table>
<tr>
<td><code>applications</code></td>
<td>
List of all Erlang applications running on the node.
</td>
</tr>
<tr>
<td><code>auth_mechanisms</code></td>
<td>
List of all SASL authentication mechanisms installed on the node.
</td>
</tr>
<tr>
<td><code>contexts</code></td>
<td>
List of all HTTP listeners on the node.
</td>
</tr>
<tr>
<td><code>disk_free</code></td>
<td>
Disk free space in bytes.
</td>
</tr>
<tr>
<td><code>disk_free_alarm</code></td>
<td>
Whether the disk alarm has gone off.
</td>
</tr>
<tr>
<td><code>disk_free_limit</code></td>
<td>
Point at which the disk alarm will go off.
</td>
</tr>
<tr>
<td><code>exchange_types</code></td>
<td>
Exchange types available on the node.
</td>
</tr>
<tr>
<td><code>fd_total</code></td>
<td>
File descriptors available.
</td>
</tr>
<tr>
<td><code>fd_used</code></td>
<td>
Used file descriptors.
</td>
</tr>
<tr>
<td><code>mem_used</code></td>
<td>
Memory used in bytes.
</td>
</tr>
<tr>
<td><code>mem_alarm</code></td>
<td>
Whether the memory alarm has gone off.
</td>
</tr>
<tr>
<td><code>mem_limit</code></td>
<td>
Point at which the memory alarm will go off.
</td>
</tr>
<tr>
<td><code>name</code></td>
<td>
Node name.
</td>
</tr>
<tr>
<td><code>os_pid</code></td>
<td>
Process identifier for the Operating System under which this
node is running.
</td>
</tr>
<tr>
<td><code>partitions</code></td>
<td>
List of network partitions this node is seeing.
</td>
</tr>
<tr>
<td><code>proc_total</code></td>
<td>
Maximum number of Erlang processes.
</td>
</tr>
<tr>
<td><code>proc_used</code></td>
<td>
Number of Erlang processes in use.
</td>
</tr>
<tr>
<td><code>processors</code></td>
<td>
Number of cores detected and usable by Erlang.
</td>
</tr>
<tr>
<td><code>run_queue</code></td>
<td>
Average number of Erlang processes waiting to run.
</td>
</tr>
<tr>
<td><code>running</code></td>
<td>
Boolean for whether this node is up. Obviously if this is
false, most other stats will be missing.
</td>
</tr>
<tr>
<td><code>sockets_total</code></td>
<td>
File descriptors available for use as sockets.
</td>
</tr>
<tr>
<td><code>sockets_used</code></td>
<td>
File descriptors used as sockets.
</td>
</tr>
<tr>
<td><code>statistics_level</code></td>
<td>
'fine' or 'coarse'.
</td>
</tr>
<tr>
<td><code>type</code></td>
<td>
'disc' or 'ram'.
</td>
</tr>
<tr>
<td><code>uptime</code></td>
<td>
Time since the Erlang VM started, in milliseconds.
</td>
</tr>
</table>
<h2>/api/nodes/(name)</h2>
<p>
All of the above, plus:
</p>
<table>
<tr>
<td><code>memory</code></td>
<td>
Detailed memory use statistics. Only appears
if <code>?memory=true</code> is appended to the URL.
</td>
</tr>
</table>
<h2>/api/connections</h2>
<h2>/api/connections/(name)</h2>
<p>
See documentation for <code>rabbitmqctl
list_connections</code>. No additional fields,
although <code>pid</code> is replaced by <code>node</code>.
</p>
<p>
Note also that while non-AMQP connections will appear in this
list (unlike <code>rabbitmqctl list_connections</code>), they
will omit many of the connection-level statistics.
</p>
<h2>/api/connections/(name)/channels</h2>
<h2>/api/channels</h2>
<p>
See documentation for <code>rabbitmqctl list_channels</code>,
with <code>pid</code> replaced by <code>node</code>, plus:
</p>
<table>
<tr>
<td><code>connection_details</code></td>
<td>
Some basic details about the owning connection.
</td>
</tr>
<tr>
<td><code>message_stats</code></td>
<td>
See the section on message_stats above.
</td>
</tr>
</table>
<h2>/api/channels/(name)</h2>
<p>
All the above, plus
</p>
<table>
<tr>
<td><code>publishes</code></td>
<td>
Detailed message stats (see section above) for publishes to
exchanges.
</td>
</tr>
<tr>
<td><code>deliveries</code></td>
<td>
Detailed message stats for deliveries from queues.
</td>
</tr>
<tr>
<td><code>consumer_details</code></td>
<td>
List of consumers on this channel, with some details on each.
</td>
</tr>
</table>
<h2>/api/exchanges</h2>
<h2>/api/exchanges/(vhost)</h2>
<p>
See documentation for <code>rabbitmqctl list_exchanges</code>, plus:
</p>
<table>
<tr>
<td><code>message_stats</code></td>
<td>
See the section on message_stats above.
</td>
</tr>
</table>
<h2>/api/exchanges/(vhost)/(name)</h2>
<p>
All the above, plus:
</p>
<table>
<tr>
<td><code>incoming</code></td>
<td>
Detailed message stats (see section above) for publishes
from channels into this exchange.
</td>
</tr>
<tr>
<td><code>outgoing</code></td>
<td>
Detailed message stats for publishes from this exchange into
queues.
</td>
</tr>
</table>
<h2>/api/queues</h2>
<h2>/api/queues/(vhost)</h2>
<p>
See documentation for <code>rabbitmqctl list_queues</code>, with
all references to <code>pid</code>s replaced by <code>node</code>s
plus:
</p>
<table>
<tr>
<td><code>message_stats</code></td>
<td>
See the section on message_stats above.
</td>
</tr>
</table>
<h2>/api/queues/(vhost)/(name)</h2>
<p>
All the above, plus:
</p>
<table>
<tr>
<td><code>incoming</code></td>
<td>
Detailed message stats (see section above) for
publishes from exchanges into this queue.
</td>
</tr>
<tr>
<td><code>deliveries</code></td>
<td>
Detailed message stats for deliveries from this queue into
channels.
</td>
</tr>
<tr>
<td><code>consumer_details</code></td>
<td>
List of consumers on this channel, with some details on each.
</td>
</tr>
</table>
<h2>/api/vhosts/</h2>
<h2>/api/vhosts/(name)</h2>
<p>
All the fields from <code>rabbitmqctl list_vhosts</code>
(i.e. <code>name</code> and <code>tracing</code>) plus:
</p>
<table>
<tr>
<td><code>message_stats</code></td>
<td>
Global message_stats for this vhost. Note that activity for
other users in this vhost <b>is</b> shown, even for users
without the <code>monitoring</code> tag.
</td>
</tr>
<tr>
<td><code>messages</code> <code>messages_ready</code> <code>messages_acknowledged</code></td>
<td>
Sum of these fields for all queues in the vhost.
</td>
</tr>
<tr>
<td><code>recv_oct</code> <code>send_oct</code></td>
<td>
Sum of these fields for all connections to the vhost.
</td>
</tr>
</table>
</body>
</html>
|