Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Messages throughput graph should be packets.

Fixes #8.
  • Loading branch information...
commit 256ee55e83e00a635ab747beb83486af0bf8b337 1 parent 5f1ceaa
Chet Luther cluther authored
14 ZenPacks/zenoss/RabbitMQ/__init__.py
@@ -52,9 +52,23 @@ class ZenPack(ZenPackBase):
52 52 """
53 53
54 54 def install(self, app):
  55 + self.pre_install(app)
55 56 super(ZenPack, self).install(app)
56 57 self._buildDeviceRelations()
57 58
  59 + def pre_install(self, app):
  60 + # Remove the "Throughput - Messages" graph so it can be replaced with
  61 + # the proper packets graph from objects.xml.
  62 + node_template = app.zport.dmd.Devices.rrdTemplates._getOb(
  63 + 'RabbitMQNode', None)
  64 +
  65 + if node_template:
  66 + messages_graph = node_template.graphDefs._getOb(
  67 + 'Throughput - Messages', None)
  68 +
  69 + if messages_graph:
  70 + node_template.graphDefs._delObject(messages_graph.id)
  71 +
58 72 def remove(self, app, leaveObjects=False):
59 73 if not leaveObjects:
60 74 # Remove our Device relations additions.
34 ZenPacks/zenoss/RabbitMQ/objects/objects.xml
@@ -314,6 +314,9 @@ True
314 314 </property>
315 315 <tomanycont id='graphPoints'>
316 316 <object id='Consumers' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  317 +<property type="long" id="sequence" mode="w" >
  318 +0
  319 +</property>
317 320 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
318 321 LINE
319 322 </property>
@@ -424,6 +427,9 @@ False
424 427 <property type="boolean" id="hasSummary" mode="w" >
425 428 True
426 429 </property>
  430 +<property type="long" id="sequence" mode="w" >
  431 +0
  432 +</property>
427 433 <tomanycont id='graphPoints'>
428 434 <object id='Channels' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
429 435 <property type="long" id="sequence" mode="w" >
@@ -455,6 +461,9 @@ AVERAGE
455 461 </property>
456 462 </object>
457 463 <object id='Connections' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  464 +<property type="long" id="sequence" mode="w" >
  465 +0
  466 +</property>
458 467 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
459 468 LINE
460 469 </property>
@@ -512,6 +521,9 @@ True
512 521 </property>
513 522 <tomanycont id='graphPoints'>
514 523 <object id='Queue' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  524 +<property type="long" id="sequence" mode="w" >
  525 +0
  526 +</property>
515 527 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
516 528 LINE
517 529 </property>
@@ -598,6 +610,9 @@ AVERAGE
598 610 </property>
599 611 </object>
600 612 <object id='Sent' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  613 +<property type="long" id="sequence" mode="w" >
  614 +0
  615 +</property>
601 616 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
602 617 LINE
603 618 </property>
@@ -625,7 +640,7 @@ AVERAGE
625 640 </object>
626 641 </tomanycont>
627 642 </object>
628   -<object id='Throughput - Messages' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
  643 +<object id='Throughput - Packets' module='Products.ZenModel.GraphDefinition' class='GraphDefinition'>
629 644 <property type="int" id="height" mode="w" >
630 645 100
631 646 </property>
@@ -633,7 +648,7 @@ AVERAGE
633 648 500
634 649 </property>
635 650 <property type="string" id="units" mode="w" >
636   -messages/sec
  651 +packets/sec
637 652 </property>
638 653 <property type="boolean" id="log" mode="w" >
639 654 False
@@ -684,6 +699,9 @@ AVERAGE
684 699 </property>
685 700 </object>
686 701 <object id='Sent' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  702 +<property type="long" id="sequence" mode="w" >
  703 +0
  704 +</property>
687 705 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
688 706 LINE
689 707 </property>
@@ -898,6 +916,9 @@ True
898 916 </property>
899 917 <tomanycont id='graphPoints'>
900 918 <object id='Consumers' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  919 +<property type="long" id="sequence" mode="w" >
  920 +0
  921 +</property>
901 922 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
902 923 LINE
903 924 </property>
@@ -955,6 +976,9 @@ True
955 976 </property>
956 977 <tomanycont id='graphPoints'>
957 978 <object id='Used' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
  979 +<property type="long" id="sequence" mode="w" >
  980 +0
  981 +</property>
958 982 <property select_variable="lineTypes" type="selection" id="lineType" mode="w" >
959 983 AREA
960 984 </property>
@@ -1007,6 +1031,9 @@ False
1007 1031 <property type="boolean" id="hasSummary" mode="w" >
1008 1032 True
1009 1033 </property>
  1034 +<property type="long" id="sequence" mode="w" >
  1035 +0
  1036 +</property>
1010 1037 <tomanycont id='graphPoints'>
1011 1038 <object id='Ready' module='Products.ZenModel.DataPointGraphPoint' class='DataPointGraphPoint'>
1012 1039 <property type="long" id="sequence" mode="w" >
@@ -1038,6 +1065,9 @@ AVERAGE
1038 1065 </property>
1039 1066 </object>
1040 1067 <object id='Threshold - Messages (Max)' module='Products.ZenModel.ThresholdGraphPoint' class='ThresholdGraphPoint'>
  1068 +<property type="long" id="sequence" mode="w" >
  1069 +0
  1070 +</property>
1041 1071 <property type="string" id="threshId" mode="w" >
1042 1072 queue size
1043 1073 </property>
2  setup.py
@@ -3,7 +3,7 @@
3 3 # or saved. Do not modify them directly here.
4 4 # NB: PACKAGES is deprecated
5 5 NAME = "ZenPacks.zenoss.RabbitMQ"
6   -VERSION = "1.0.0"
  6 +VERSION = "1.0.1"
7 7 AUTHOR = "Zenoss Labs"
8 8 LICENSE = ""
9 9 NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss']

0 comments on commit 256ee55

Please sign in to comment.
Something went wrong with that request. Please try again.