<div dir="ltr">Hrmm, looking at the API&#39;s now,�<div><ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em;color:rgb(0,0,0);font-family:monospace;font-size:medium"><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">incoming</span>:�<div class="" style="padding-right:6px;padding-left:6px"></div>[<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li style>
<div class="" 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 class="" style="padding-right:6px;padding-left:6px">
</div>{<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">stats</span>:�<div class="" style="padding-right:6px;padding-left:6px"></div>{<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li style>
<div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">publish</span>:�<span class="" style="white-space:pre-wrap;color:blue">44</span>,</div>
</li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">publish_details</span>:�<div class="" style="padding-right:6px;padding-left:6px">
</div>{<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">rate</span>:�<span class="" style="white-space:pre-wrap;color:blue">0.4</span></div></li></ul>}</div></li></ul>},</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">exchange</span>:�<div class="" style="padding-right:6px;padding-left:6px"></div>{<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li style>
<div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">name</span>:�<span class="" style="white-space:pre-wrap;color:green">&quot;phi&quot;</span>,</div>
</li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">vhost</span>:�<span class="" style="white-space:pre-wrap;color:green">&quot;phi&quot;</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 &quot;5 minutes&quot; or how is that reset? �I don&#39;t see a &quot;published since&quot; kinda of field that would let me calculate a rate of incoming message flow. �I can image that&#39;s a &quot;transactions per minute&quot; kinda rate, but that&#39;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 class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em;color:rgb(0,0,0);font-family:monospace;font-size:medium">
<li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">backing_queue_status</span>:�<div class="" style="padding-right:6px;padding-left:6px"></div>{<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em">
<li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">q1</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div>
</li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">q2</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div>
</li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">delta</span>:�<div class="" style="padding-right:6px;padding-left:6px">
</div>[<ul class="" style="list-style-type:none;padding:0px;margin:0px 0px 0px 2em"><li style><div class="" 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 class="" style="white-space:pre-wrap;color:green">&quot;delta&quot;</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;color:blue">0</span></div></li></ul>],</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">q3</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">q4</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">len</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">pending_acks</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">target_ram_count</span>:�<span class="" style="white-space:pre-wrap;color:green">&quot;infinity&quot;</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">ram_msg_count</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">ram_ack_count</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">next_seq_id</span>:�<span class="" style="white-space:pre-wrap;color:blue">71</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">persistent_count</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">avg_ingress_rate</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">avg_egress_rate</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">avg_ack_ingress_rate</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">avg_ack_egress_rate</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">mirror_seen</span>:�<span class="" style="white-space:pre-wrap;color:blue">0</span>,</div></li><li style><div class="" 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 class="" style="white-space:pre-wrap;font-weight:bold">mirror_senders</span>:�<span class="" 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&#39;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">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&#39;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&#39;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>
<div><br></div><div>Jason</div><div><font color="#000000" face="monospace" size="3"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 3:59 AM, Simon MacMullen <span dir="ltr">&lt;<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">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&#39;d like to be able to monitor<br>
when the queue was last &quot;accessed&quot; for message publishes.<br>
</blockquote>
<br></div>
Probably your best bet is to look at the inbound message rate from the mgmt API.<div class="im"><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 class="im"><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&#39;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&#39;s a much simpler design but not as performant.<br>

<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</font></span></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>