Giter Club home page Giter Club logo

zenpacks.zenoss.rabbitmq's People

Contributors

burbel avatar cluther avatar danielrobbins avatar joshw avatar kevinjcash avatar okuzmyk avatar olst avatar otrach avatar pcarinhas avatar ssvsergeyev avatar yichi-lu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zenpacks.zenoss.rabbitmq's Issues

Seeing a keyerror in Zenoss 5 running 1.0.8

2016-05-19 13:56:08,171 ERROR zen.ZenModeler: : Traceback (most recent call last):
File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 101, in inner
return callable(_args, *_kw)
File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 163, in remote_applyDataMaps
if adm._applyDataMap(device, map, commit=False):
File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 126, in _applyDataMap
return self._applyDataMapImpl(device, datamap)
File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 176, in _applyDataMapImpl
tobj = device.getObjByPath(datamap.compname)
File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 641, in getObjByPath
return getObjByPath(self, path)
File "/opt/zenoss/Products/ZenUtils/Utils.py", line 302, in getObjByPath
next=obj[name]
File "/opt/zenoss/lib/python2.7/site-packages/OFS/ObjectManager.py", line 777, in getitem
raise KeyError, key
KeyError: 'rabbitmq_nodes'
Traceback (most recent call last):
File "/opt/zenoss/Products/DataCollector/zenmodeler.py", line 684, in processClient
if driver.next():
File "/opt/zenoss/Products/ZenUtils/Driver.py", line 63, in result
raise ex
RemoteException: : Traceback (most recent call last):
File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 101, in inner
return callable(_args, *_kw)
File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 163, in remote_applyDataMaps
if adm._applyDataMap(device, map, commit=False):
File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 126, in _applyDataMap
return self._applyDataMapImpl(device, datamap)
File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 176, in _applyDataMapImpl
tobj = device.getObjByPath(datamap.compname)
File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 641, in getObjByPath
return getObjByPath(self, path)
File "/opt/zenoss/Products/ZenUtils/Utils.py", line 302, in getObjByPath
next=obj[name]
File "/opt/zenoss/lib/python2.7/site-packages/OFS/ObjectManager.py", line 777, in getitem
raise KeyError, key
KeyError: 'rabbitmq_nodes'

2016-05-19 13:56:08,172 ERROR zen.ZenModeler: Client vg0dmq01 finished with message: [Failure instance: Traceback (failure with no frames): <class 'Products.ZenHub.PBDaemon.RemoteException'>: : Traceback (most recent call last):
File "/opt/zenoss/Products/ZenHub/PBDaemon.py", line 101, in inner
return callable(_args, *_kw)
File "/opt/zenoss/Products/ZenHub/services/ModelerService.py", line 163, in remote_applyDataMaps
if adm._applyDataMap(device, map, commit=False):
File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 126, in _applyDataMap
return self._applyDataMapImpl(device, datamap)
File "/opt/zenoss/Products/DataCollector/ApplyDataMap.py", line 176, in _applyDataMapImpl
tobj = device.getObjByPath(datamap.compname)
File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 641, in getObjByPath
return getObjByPath(self, path)
File "/opt/zenoss/Products/ZenUtils/Utils.py", line 302, in getObjByPath
next=obj[name]
File "/opt/zenoss/lib/python2.7/site-packages/OFS/ObjectManager.py", line 777, in getitem
raise KeyError, key
KeyError: 'rabbitmq_nodes'

]

Using HTTP API vs. ssh

Is there a reason to use the rabbitmq commands rather than the HTTP API?

It is my understanding that all of the data available via the command line API is also available of the HTTP API. Are there any plans to support both?

What about a merge request with support for the HTTP API?

Too many values to unpack Python error

i've got this error on the few RMQ servers and have no idea how to fix it.

ERROR zen.ZenModeler: Traceback (most recent call last):
File "/opt/zenoss/Products/DataCollector/zenmodeler.py", line 647, in processClient
datamaps = plugin.process(device, results, self.log)
File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.RabbitMQ-1.0.7.egg/ZenPacks/zenoss/RabbitMQ/modeler/plugins/zenoss/ssh/RabbitMQ.py", line 88, in process
device, command_strings[1], 'rabbitmq_nodes/%s' % node_id))
File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.RabbitMQ-1.0.7.egg/ZenPacks/zenoss/RabbitMQ/modeler/plugins/zenoss/ssh/RabbitMQ.py", line 117, in getVHostRelMap
'%s/rabbitmq_vhosts/%s' % (compname, vhost_id))
File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.RabbitMQ-1.0.7.egg/ZenPacks/zenoss/RabbitMQ/modeler/plugins/zenoss/ssh/RabbitMQ.py", line 177, in getQueueRelMap
re.split(r'\s+', queue_string)
ValueError: too many values to unpack

No 'where' clause found for event_key ComponentId

I get the following error whenever I try to access any of the RabbitMQ "Components" from a device (ex: "RabbitMQ Nodes").

ValueError No 'where' clause found for event_key ComponentId

Applying the following patch stopped the error from appearing, but I don't really understand the ramifications of the change:

diff --git a/ZenPacks/zenoss/RabbitMQ/RabbitMQComponent.py b/ZenPacks/zenoss/RabbitMQ/RabbitMQComponent.py
index e588399..f56aed7 100644
--- a/ZenPacks/zenoss/RabbitMQ/RabbitMQComponent.py
+++ b/ZenPacks/zenoss/RabbitMQ/RabbitMQComponent.py
@@ -36,8 +36,5 @@ class RabbitMQComponent(DeviceComponent, ManagedEntity):
             },),
         },) 

-    # Query for events by id instead of name.
-    event_key = "ComponentId"
-   
     # Commands are run via SSH and should not be specified absolutely.
     zCommandPath = ''

Software Component Versions

Zenoss     Zenoss 3.2.0
Zope       Zope 2.12.1
Python     Python 2.6.2
Database   MySQL 5.0.77 (Ver 5.0.77)
RRD        RRDtool 1.3.9
Twisted    Twisted 8.1.0
NetSnmp    NetSnmp 5.3.2
PyNetSnmp  PyNetSnmp 0.29.13
WMI        Wmi 1.3.13

Incorrect relationship remote classes

In RabbitMQQueue.py rabbitmq_vhost relationship remote class should be ZenPacks.zenoss.RabbitMQ.RabbitMQVHost.RabbitMQVHost not ZenPacks.zenoss.RabbitMQ.RabbitMQNode.RabbitMQVHost.

In RabbitMQExchange.py, rabbitmq_vhost relationship remote class should be ZenPacks.zenoss.RabbitMQ.RabbitMQVHost.RabbitMQVHost not ZenPacks.zenoss.RabbitMQ.RabbitMQNode.RabbitMQVHost.

Thoroughput - Messages graph using incorrect metrics

The throughput graph is using the 'recvCount' and 'sentCount' metrics, which are derived from the 'recv_cnt' and 'send_cnt' Connection metrics. Per the rabbitmqctl manpage, both of those metrics track the number of packets sent and received, not messages.

Removing Zenpack does not remove everything

If you do an uninstall on the ZenPack it leaves components on the device. If you click on a component a ribbon error is displayed. The template also remains on the system.

NaN Values for Some Metrics

I have been using the RabbitMQ zenpack for about a week, and several RRDs only have NaN values (recvBytes, recvCount, et al.).

After some digging, I found that the variable "results.values" in the file parsers/RabbitMQCTL.py had repeated some fields and was missing others, e.g. (note sendCount)

[(({}, 'connections'), 2), (({}, 'channels'), 2), (({}, 'sendQueue'), 0), (({}, 'sendCount'), 14), (({}, 'sendCount'), 14), (({}, 'sendCount'), 14), (({}, 'sendCount'), 14)]

line 162 in parsers/RabbitMQCTL.py reads:

for field in delta_metrics:

changing it to this:

for metric in delta_metrics:

seemed to fix the problem.

This looks like a simple typo, the loop declaration uses a "field" variable which is never referenced in the loop body, the loop body in fact uses the "metric" variable which was last used in a previous loop.

After the change, the RRDs and graphs have real values, and the results.values variable looks correct.

Let me know what you think.

Modeler doesn't use zCommandPath

I'm running the zenpack with RabbitMQ 2.2.0 on RHEL5. Rabbitmqctl command is run as a rabbitmq user on the server. Zenpack provides data to the device graphs correctly but doesn't populate the components. When running command manually on the RabbitMQ server data comes out just fine.

When running zenmodeler manually I see in the logs:
2012-02-08 11:53:32,416 DEBUG zen.SshClient: x.x.x.x channel 1 CommandChannel exit code for rabbitmqctl status 2>&1 && (echo COMMAND ; for vhost in $(rabbitmqctl -q list_vhosts) ; do echo "VHOST: $vhost" ; echo "SPLIT" ; rabbitmqctl -q list_exchanges -p $vhost name type durable auto_delete arguments ; echo "SPLIT" ; rabbitmqctl -q list_queues -p $vhost name durable auto_delete arguments ; echo "VHOST" ; done) is 127: Command not found

I guess it can't find the rabbitmqctl command. It is located in /usr/sbin and I've set that path to zCommandPath. I don't wish to access the RabbitMQ server as a root. How can I get the path right?

ZenPacks.zenoss.RabbitMQ To Monitor RabbitMQ in Zenoss Core 4

Now that Core 4 is using RabbitMQ, it would seem logical that the RabbitMQ pack could be used to monitor the Rabbit instance running on your Zenoss Core master server, however this pack seems demand modeling and collection over SSH. Would it be possible to update this so you run it against localhost as well? In case it helps, here is the output when running the modeler showing the SSH connection attempt to localhost:

2012-03-15 11:17:05,964 INFO zen.ZenModeler: plugins: zenoss.ssh.RabbitMQ
2012-03-15 11:17:05,965 DEBUG zen.SshClient: 127.0.0.1 SshClient connecting to localhost:22 with timeout 10.0 seconds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.