<div dir="ltr">Just found this older post:<div><a href="http://rabbitmq.1065348.n5.nabble.com/Monitoring-Message-Throughput-td17436.html">http://rabbitmq.1065348.n5.nabble.com/Monitoring-Message-Throughput-td17436.html</a><br>
</div><div><br></div><div>So looks like the avg_ingress_rate is over 5 seconds would get me what I'm looking for - that should probably never be 0 if we're regularly having publishes. Of course I'll have to poll it every 5 seconds or it could be 0 on occasion.</div>
<div><br></div><div>Jason</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 2:00 PM, Jason McIntosh <span dir="ltr"><<a href="mailto:mcintoshj@gmail.com" target="_blank">mcintoshj@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hrmm, looking at the API's now, <div><ul style="list-style-type:none;font-size:medium;font-family:monospace;margin:0px 0px 0px 2em;padding:0px">
<li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">incoming</span>: <div style="padding-right:6px;padding-left:6px"></div>[<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li>
<div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><div style="padding-right:6px;padding-left:6px">
</div>{<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">stats</span>: <div style="padding-right:6px;padding-left:6px"></div>{<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li>
<div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">publish</span>: <span style="white-space:pre-wrap;color:blue">44</span>,</div>
</li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">publish_details</span>: <div style="padding-right:6px;padding-left:6px">
</div>{<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">rate</span>: <span style="white-space:pre-wrap;color:blue">0.4</span></div></li></ul>}</div></li></ul>},</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">exchange</span>: <div style="padding-right:6px;padding-left:6px"></div>{<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li>
<div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">name</span>: <span style="white-space:pre-wrap;color:green">"phi"</span>,</div>
</li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">vhost</span>: <span style="white-space:pre-wrap;color:green">"phi"</span></div>
</li></ul>}</div></li></ul>}</div></li></ul>],</div></li></ul><div><font color="#000000" face="monospace" size="3">Is the publish details time delayed? e.g. for the last "5 minutes" or how is that reset? I don't see a "published since" kinda of field that would let me calculate a rate of incoming message flow. I can image that's a "transactions per minute" kinda rate, but that'll never hit 0 if the queue received one message since the beginning of time and nothing since.</font></div>
</div><div><font color="#000000" face="monospace" size="3"><br></font></div><div><font color="#000000" face="monospace" size="3">Now I did see this:</font></div><div><ul style="list-style-type:none;font-size:medium;font-family:monospace;margin:0px 0px 0px 2em;padding:0px">
<li><div style="display:inline-block;outline-width:1px;outline-style:dotted;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">backing_queue_status</span>: <div style="padding-right:6px;padding-left:6px"></div>{<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em">
<li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">q1</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div>
</li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">q2</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div>
</li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px"><span style="white-space:pre-wrap;font-weight:bold">delta</span>: <div style="padding-right:6px;padding-left:6px">
</div>[<ul style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;color:green">"delta"</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;color:blue">0</span></div></li></ul>],</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">q3</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">q4</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">len</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">pending_acks</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">target_ram_count</span>: <span style="white-space:pre-wrap;color:green">"infinity"</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">ram_msg_count</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">ram_ack_count</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">next_seq_id</span>: <span style="white-space:pre-wrap;color:blue">71</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">persistent_count</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">avg_ingress_rate</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">avg_egress_rate</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">avg_ack_ingress_rate</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">avg_ack_egress_rate</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">mirror_seen</span>: <span style="white-space:pre-wrap;color:blue">0</span>,</div></li><li><div style="display:inline-block;padding:1px 2px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px">
<span style="white-space:pre-wrap;font-weight:bold">mirror_senders</span>: <span style="white-space:pre-wrap;color:blue">1</span></div></li></ul>},</div></li></ul></div><div><font color="#000000" face="monospace" size="3"><br>
</font></div><div><font color="#000000" face="monospace" size="3">Is the next_seq_id used perhaps? I COULD store the previous value and if the value hasn't changed in 5 minutes on the monitoring side, alert on that, assuming that that changes based upon each message received?</font></div>
<div><font color="#000000" face="monospace" size="3"><br></font></div><div><font color="#000000" face="monospace" size="3">SO also going to release this:</font></div><div><a href="https://github.com/jasonmcintosh/rabbitmq-zabbix" target="_blank">https://github.com/jasonmcintosh/rabbitmq-zabbix</a><font color="#000000" face="monospace" size="3"><br>
</font></div><div><br></div><div>This is built off of some of the other monitoring stuff I've been working on, but focused on zabbix. The code gives an example template that (to me) is a pretty solid set of monitoring items for each server, auto-discovery, and basic stuff to monitor rabbitmq using zabbix. Eventually, I'd like to do a more push vs. pull type system, using zabbix_sender and a background process that regularly polls the API (perhaps even a plugin if I can learn enough erlang) and submits data to zabbix, instead of zabbix polling the server.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>Jason</div><div><font color="#000000" face="monospace" size="3"><br></font></div></font></span></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 3:59 AM, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 24/10/2013 5:48PM, Jason McIntosh wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The question I have is on the queue - I'd like to be able to monitor<br>
when the queue was last "accessed" for message publishes.<br>
</blockquote>
<br></div>
Probably your best bet is to look at the inbound message rate from the mgmt API.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I was looking<br>
at the idle_since but it looks like the date there gets reset anytime<br>
you even look at the list of queues.<br>
</blockquote>
<br></div>
That reports on the last time anything contacted the queue to wake it up - this would include publishing, consuming, (re)declaring, or listing it with rabbitmqctl (not mgmt).<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
One interesting thing I noticed while working on monitoring.<br>
rabbitmqctl does not seem like a very efficient mechanism for use by<br>
monitoring tools. I started off using ctl to get various queue and<br>
server information and found that it was extremely expensive to call<br>
repeatedly. I tried using some python scripts to hit the management API<br>
and my CPU load went down by about 70%. Not sure if other people have<br>
seem the same using rabbitmqctl?<br>
</blockquote>
<br></div>
This is expected. rabbitmqctl and the management API have quite different designs - in brief the management API maintains a database of current stats for everything that's going on, based on stats events emitted by queues, channels and connections. On the other hand when rabbitmqctl wants to know something it just goes and asks the queue / channel / connection directly - so it's a much simpler design but not as performant.<br>
<br>
Cheers, Simon<span><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><div class="im">-- <br><div dir="ltr">Jason McIntosh<br><a href="https://github.com/jasonmcintosh/" target="_blank">https://github.com/jasonmcintosh/</a><br>
<a href="tel:573-424-7612" value="+15734247612" target="_blank">573-424-7612</a></div>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Jason McIntosh<br><a href="https://github.com/jasonmcintosh/">https://github.com/jasonmcintosh/</a><br>573-424-7612</div>
</div>