MeetMe / newrelic-plugin-agent

Multi-Plugin python-based Agent for NewRelic's Platform
BSD 3-Clause "New" or "Revised" License
425 stars 265 forks source link

RabbitMQ Plugin #428

Open brettw-ozforex opened 9 years ago

brettw-ozforex commented 9 years ago

When running the newrelic-plugin-agent in the foreground for RabbitMQ I get the below error message.

INFO 2015-07-16 13:20:54,931 16330 MainProcess MainThread newrelic_plugin_agent.agent init L55 : Agent v1.3.0 initialized, Linux-3.10.0-229.7.2.el7.x86_64-x86_64-with-glibc2.2.5 (Red Hat Enterprise Linux Server 7.1 Maipo) CPython v2.7.5 INFO 2015-07-16 13:20:54,931 16330 MainProcess MainThread helper.controller run L251 : newrelic-plugin-agent v2.4.1 started INFO 2015-07-16 13:20:55,061 16330 MainProcess MainThread newrelic_plugin_agent.agent start_plugin_polling L263 : Enabling plugin: rabbitmq INFO 2015-07-16 13:20:55,062 16330 MainProcess MainThread newrelic_plugin_agent.plugins.rabbitmq poll L354 : Polling RabbitMQ via http://localhost:15672/api INFO 2015-07-16 13:20:55,343 16330 MainProcess MainThread newrelic_plugin_agent.plugins.rabbitmq poll L374 : Polling complete in 0.28 seconds INFO 2015-07-16 13:20:55,349 16330 MainProcess MainThread newrelic_plugin_agent.agent send_components L220 : Sending 2170 metrics to NewRelic Traceback (most recent call last): File "/bin/newrelic-plugin-agent", line 9, in load_entry_point('newrelic-plugin-agent==1.3.0', 'console_scripts', 'newrelic-plugin-agent')() File "/usr/lib/python2.7/site-packages/newrelic_plugin_agent/agent.py", line 337, in main helper.start(NewRelicPluginAgent) File "/usr/lib/python2.7/site-packages/helper/init.py", line 174, in start obj.start() File "/usr/lib/python2.7/site-packages/helper/controller.py", line 266, in start self.run() File "/usr/lib/python2.7/site-packages/helper/controller.py", line 253, in run self.process() File "/usr/lib/python2.7/site-packages/newrelic_plugin_agent/agent.py", line 125, in process self.send_data_to_newrelic() File "/usr/lib/python2.7/site-packages/newrelic_plugin_agent/agent.py", line 209, in send_data_to_newrelic self.send_components(components, metrics) File "/usr/lib/python2.7/site-packages/newrelic_plugin_agent/agent.py", line 230, in send_components True)) File "/usr/lib/python2.7/site-packages/requests/api.py", line 109, in post return request('post', url, data=data, json=json, _kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 50, in request response = session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 465, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send timeout=timeout File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen body=body, headers=headers) File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 349, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib64/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/usr/lib64/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/usr/lib64/python2.7/httplib.py", line 833, in _send_output self.send(message_body) File "/usr/lib64/python2.7/httplib.py", line 805, in send self.sock.sendall(data) File "/usr/lib64/python2.7/ssl.py", line 229, in sendall v = self.send(data[count:]) File "/usr/lib64/python2.7/ssl.py", line 198, in send v = self._sslobj.write(data) UnicodeEncodeError: 'ascii' codec can't encode characters in position 12065-12066: ordinal not in range(128)

brettw-ozforex commented 9 years ago

Ok I think this has to do with the number Queues / Metrics we are trying to send to new relic. Because if I delete all the queue from RabbitMQ it works fine but after a while it fails again because all the queues are recreated.