Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 4967d17

Browse files
committed
Add tracking of the acknowledgements on a queue, as this may be more important than the messages delivered
1 parent 559d8b1 commit 4967d17

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

rabbitmq.template.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,49 @@
11061106
<valuemap/>
11071107
<logtimefmt/>
11081108
</item_prototype>
1109+
<item_prototype>
1110+
<name>RabbitMQ $2 on vhost $1, queue $3</name>
1111+
<type>2</type>
1112+
<snmp_community/>
1113+
<multiplier>0</multiplier>
1114+
<snmp_oid/>
1115+
<key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_ack,{#QUEUENAME}]</key>
1116+
<delay>0</delay>
1117+
<history>7</history>
1118+
<trends>365</trends>
1119+
<status>0</status>
1120+
<value_type>0</value_type>
1121+
<allowed_hosts/>
1122+
<units>msgs/s</units>
1123+
<delta>1</delta>
1124+
<snmpv3_contextname/>
1125+
<snmpv3_securityname/>
1126+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
1127+
<snmpv3_authprotocol>0</snmpv3_authprotocol>
1128+
<snmpv3_authpassphrase/>
1129+
<snmpv3_privprotocol>0</snmpv3_privprotocol>
1130+
<snmpv3_privpassphrase/>
1131+
<formula>1</formula>
1132+
<delay_flex/>
1133+
<params/>
1134+
<ipmi_sensor/>
1135+
<data_type>0</data_type>
1136+
<authtype>0</authtype>
1137+
<username/>
1138+
<password/>
1139+
<publickey/>
1140+
<privatekey/>
1141+
<port/>
1142+
<description>Rate of message acknowledgement per queue</description>
1143+
<inventory_link>0</inventory_link>
1144+
<applications>
1145+
<application>
1146+
<name>rabbitmq data</name>
1147+
</application>
1148+
</applications>
1149+
<valuemap/>
1150+
<logtimefmt/>
1151+
</item_prototype>
11091152
<item_prototype>
11101153
<name>RabbitMQ $2 on vhost $1, queue $3</name>
11111154
<type>2</type>
@@ -1318,6 +1361,18 @@
13181361
<key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_publish,{#QUEUENAME}]</key>
13191362
</item>
13201363
</graph_item>
1364+
<graph_item>
1365+
<sortorder>3</sortorder>
1366+
<drawtype>0</drawtype>
1367+
<color>0000C8</color>
1368+
<yaxisside>0</yaxisside>
1369+
<calc_fnc>2</calc_fnc>
1370+
<type>0</type>
1371+
<item>
1372+
<host>Template App RabbitMQ v3</host>
1373+
<key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_ack,{#QUEUENAME}]</key>
1374+
</item>
1375+
</graph_item>
13211376
</graph_items>
13221377
</graph_prototype>
13231378
</graph_prototypes>

scripts/rabbitmq/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def _prepare_data(self, queue, tmpfile):
163163
logging.debug("SENDER_DATA: - %s %s" % (key,value))
164164
tmpfile.write("- %s %s\n" % (key, value))
165165
## This is a non standard bit of information added after the standard items
166-
for item in ['deliver_get', 'publish']:
166+
for item in ['deliver_get', 'publish', 'ack']:
167167
key = '"rabbitmq.queues[{0},queue_message_stats_{1},{2}]"'
168168
key = key.format(queue['vhost'], item, queue['name'])
169169
value = queue.get('message_stats', {}).get(item, 0)
@@ -202,6 +202,8 @@ def check_server(self, item, node_name):
202202
return self.call_api('overview').get('message_stats', {}).get('deliver_get_details', {}).get('rate',0)
203203
elif item == 'message_stats_publish':
204204
return self.call_api('overview').get('message_stats', {}).get('publish_details', {}).get('rate',0)
205+
elif item == 'message_stats_ack':
206+
return self.call_api('overview').get('message_stats', {}).get('ack_details', {}).get('rate',0)
205207
elif item == 'message_count_total':
206208
return self.call_api('overview').get('queue_totals', {}).get('messages',0)
207209
elif item == 'message_count_ready':

0 commit comments

Comments
 (0)