Skip to content

Commit

Permalink
Stab at per-queue monitoring: messages, etc.
Browse files Browse the repository at this point in the history
Not tested yet. Running into issues with SSH command timeouts and
zSshConcurrentSessions.
  • Loading branch information
cluther committed Sep 24, 2011
1 parent 08bb4c1 commit 1901147
Show file tree
Hide file tree
Showing 3 changed files with 405 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ZenPacks/zenoss/RabbitMQ/RabbitMQQueue.py
Expand Up @@ -38,3 +38,11 @@ class RabbitMQQueue(RabbitMQComponent):

def device(self):
return self.rabbitmq_vhost().device()

@property
def rabbitmq_node_name(self):
return self.rabbitmq_vhost().rabbitmq_node().title

@property
def rabbitmq_vhost_name(self):
return self.rabbitmq_vhost().title
358 changes: 358 additions & 0 deletions ZenPacks/zenoss/RabbitMQ/objects/objects.xml
Expand Up @@ -713,6 +713,364 @@ AVERAGE
</object>
</tomanycont>
</object>
<!-- ('', 'zport', 'dmd', 'Devices', 'rrdTemplates', 'RabbitMQQueue') -->
<object id='/zport/dmd/Devices/rrdTemplates/RabbitMQQueue' module='Products.ZenModel.RRDTemplate' class='RRDTemplate'>
<property type="string" id="targetPythonClass" mode="w" >
Products.ZenModel.Device
</property>
<tomanycont id='datasources'>
<object id='rabbitQueues' module='Products.ZenModel.BasicDataSource' class='BasicDataSource'>
<property select_variable="sourcetypes" type="selection" id="sourcetype" mode="w" >
COMMAND
</property>
<property type="boolean" id="enabled" mode="w" >
True
</property>
<property type="string" id="component" mode="w" >
${here/title}
</property>
<property type="string" id="eventClass" mode="w" >
/Status/RabbitMQ
</property>
<property type="string" id="eventKey" mode="w" >
rabbitmq_node_status
</property>
<property type="int" id="severity" mode="w" >
4
</property>
<property type="string" id="commandTemplate" mode="w" >
rabbitmqctl -q -n ${here/rabbitmq_node_name} list_queues -p ${here/rabbitmq_vhost_name} name messages_ready messages_unacknowledged messages consumers memory 2&gt;&amp;1
</property>
<property type="int" id="cycletime" mode="w" >
300
</property>
<property type="boolean" id="usessh" mode="w" >
True
</property>
<property type="string" id="parser" mode="w" >
ZenPacks.zenoss.RabbitMQ.parsers.Node
</property>
<tomanycont id='datapoints'>
<object id='consumers' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property id='zendoc' type='string'>
Number of consumers.
</property>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
<property type="boolean" id="isrow" mode="w" >
True
</property>
<property type="string" id="rrdmin" mode="w" >
0
</property>
<property type="string" id="description" mode="w" >
Number of consumers.
</property>
</object>
<object id='memory' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property id='zendoc' type='string'>
Bytes of memory consumed by the Erlang process associated with the queue, including stack, heap and internal structures.
</property>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
<property type="boolean" id="isrow" mode="w" >
True
</property>
<property type="string" id="rrdmin" mode="w" >
0
</property>
<property type="string" id="description" mode="w" >
Bytes of memory consumed by the Erlang process associated with the queue, including stack, heap and internal structures.
</property>
</object>
<object id='messages' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property id='zendoc' type='string'>
Sum of ready and unacknowledged messages (queue depth).
</property>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
<property type="boolean" id="isrow" mode="w" >
True
</property>
<property type="string" id="rrdmin" mode="w" >
0
</property>
<property type="string" id="description" mode="w" >
Sum of ready and unacknowledged messages (queue depth).
</property>
</object>
<object id='ready' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property id='zendoc' type='string'>
Number of messages ready to be delivered to clients.
</property>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
<property type="boolean" id="isrow" mode="w" >
True
</property>
<property type="string" id="rrdmin" mode="w" >
0
</property>
<property type="string" id="description" mode="w" >
Number of messages ready to be delivered to clients.
</property>
</object>
<object id='unacknowledged' module='Products.ZenModel.RRDDataPoint' class='RRDDataPoint'>
<property id='zendoc' type='string'>
Number of messages delivered to clients but not yet acknowledged.
</property>
<property select_variable="rrdtypes" type="selection" id="rrdtype" mode="w" >
GAUGE
</property>
<property type="boolean" id="isrow" mode="w" >
True
</property>
<property type="string" id="rrdmin" mode="w" >
0
</property>
<property type="string" id="description" mode="w" >
Number of messages delivered to clients but not yet acknowledged.
</property>
</object>
</tomanycont>
</object>
</tomanycont>
<tomanycont id='graphDefs'>
<object id='Consumers' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
<property type="int" id="height" mode="w" >
100
</property>
<property type="int" id="width" mode="w" >
500
</property>
<property type="string" id="units" mode="w" >
consumers
</property>
<property type="boolean" id="log" mode="w" >
False
</property>
<property type="boolean" id="base" mode="w" >
False
</property>
<property type="int" id="miny" mode="w" >
0
</property>
<property type="int" id="maxy" mode="w" >
-1
</property>
<property type="boolean" id="hasSummary" mode="w" >
True
</property>
<property type="long" id="sequence" mode="w" >
2
</property>
<tomanycont id='graphPoints'>
<object id='Consumers' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
LINE
</property>
<property type="long" id="lineWidth" mode="w" >
2
</property>
<property type="boolean" id="stacked" mode="w" >
False
</property>
<property type="string" id="format" mode="w" >
%7.0lf%s
</property>
<property type="string" id="legend" mode="w" >
${graphPoint/id}
</property>
<property type="long" id="limit" mode="w" >
-1
</property>
<property type="string" id="dpName" mode="w" >
rabbitQueues_consumers
</property>
<property type="string" id="cFunc" mode="w" >
AVERAGE
</property>
</object>
</tomanycont>
</object>
<object id='Memory Usage' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
<property type="int" id="height" mode="w" >
100
</property>
<property type="int" id="width" mode="w" >
500
</property>
<property type="string" id="units" mode="w" >
bytes
</property>
<property type="boolean" id="log" mode="w" >
False
</property>
<property type="boolean" id="base" mode="w" >
False
</property>
<property type="int" id="miny" mode="w" >
0
</property>
<property type="int" id="maxy" mode="w" >
-1
</property>
<property type="boolean" id="hasSummary" mode="w" >
True
</property>
<property type="long" id="sequence" mode="w" >
1
</property>
<tomanycont id='graphPoints'>
<object id='Used' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
AREA
</property>
<property type="long" id="lineWidth" mode="w" >
1
</property>
<property type="boolean" id="stacked" mode="w" >
False
</property>
<property type="string" id="format" mode="w" >
%7.2lf%s
</property>
<property type="string" id="legend" mode="w" >
${graphPoint/id}
</property>
<property type="long" id="limit" mode="w" >
-1
</property>
<property type="string" id="dpName" mode="w" >
rabbitQueues_memory
</property>
<property type="string" id="cFunc" mode="w" >
AVERAGE
</property>
</object>
</tomanycont>
</object>
<object id='Messages' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
<property type="int" id="height" mode="w" >
100
</property>
<property type="int" id="width" mode="w" >
500
</property>
<property type="string" id="units" mode="w" >
messages
</property>
<property type="boolean" id="log" mode="w" >
False
</property>
<property type="boolean" id="base" mode="w" >
False
</property>
<property type="int" id="miny" mode="w" >
0
</property>
<property type="int" id="maxy" mode="w" >
-1
</property>
<property type="boolean" id="hasSummary" mode="w" >
True
</property>
<tomanycont id='graphPoints'>
<object id='Ready' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
<property type="long" id="sequence" mode="w" >
1
</property>
<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
AREA
</property>
<property type="long" id="lineWidth" mode="w" >
1
</property>
<property type="boolean" id="stacked" mode="w" >
False
</property>
<property type="string" id="format" mode="w" >
%7.1lf%s
</property>
<property type="string" id="legend" mode="w" >
${graphPoint/id}
</property>
<property type="long" id="limit" mode="w" >
-1
</property>
<property type="string" id="dpName" mode="w" >
rabbitQueues_ready
</property>
<property type="string" id="cFunc" mode="w" >
AVERAGE
</property>
</object>
<object id='Total' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
<property type="string" id="color" mode="w" >
000000
</property>
<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
LINE
</property>
<property type="long" id="lineWidth" mode="w" >
2
</property>
<property type="boolean" id="stacked" mode="w" >
False
</property>
<property type="string" id="format" mode="w" >
%7.1lf%s
</property>
<property type="string" id="legend" mode="w" >
${graphPoint/id}
</property>
<property type="long" id="limit" mode="w" >
-1
</property>
<property type="string" id="dpName" mode="w" >
rabbitQueues_messages
</property>
<property type="string" id="cFunc" mode="w" >
AVERAGE
</property>
</object>
<object id='Unacknowledged' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
<property type="long" id="sequence" mode="w" >
2
</property>
<property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
AREA
</property>
<property type="long" id="lineWidth" mode="w" >
1
</property>
<property type="boolean" id="stacked" mode="w" >
True
</property>
<property type="string" id="format" mode="w" >
%7.1lf%s
</property>
<property type="string" id="legend" mode="w" >
${graphPoint/id}
</property>
<property type="long" id="limit" mode="w" >
-1
</property>
<property type="string" id="dpName" mode="w" >
rabbitQueues_unacknowledged
</property>
<property type="string" id="cFunc" mode="w" >
AVERAGE
</property>
</object>
</tomanycont>
</object>
</tomanycont>
</object>
<!-- ('', 'zport', 'dmd', 'Events', 'Perf', 'RabbitMQ') -->
<object id='/zport/dmd/Events/Perf/RabbitMQ' module='Products.ZenEvents.EventClass' class='EventClass'>
</object>
Expand Down

0 comments on commit 1901147

Please sign in to comment.