question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with item "RabbitMQ Check Aliveness"

See original GitHub issue

Hi, thanks for this plugin - it saves a lot of my time. 😃

All works fine, except item “RabbitMQ Check Aliveness”… In some reason zabbix-agent returns traceback:

Traceback (most recent call last):
  File "./api.py", line 212, in <module>
    main()
  File "./api.py", line 201, in main
    print api.check_aliveness()
  File "./api.py", line 138, in check_aliveness
    return self.call_api('aliveness-test/%2f')['status']
  File "./api.py", line 37, in call_api
    return json.loads(urllib2.build_opener(handler).open(url).read())
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 438, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 890, in http_error_401
    url, req, headers)
  File "/usr/lib/python2.7/urllib2.py", line 865, in http_error_auth_reqed
    response = self.retry_http_basic_auth(host, req, realm)
  File "/usr/lib/python2.7/urllib2.py", line 878, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 444, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 401: Unauthorized

PS. I created .rab.auth with USERNAME and PASSWORD where set login and password of rabbitmq user.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
mschedrincommented, Jul 13, 2017

For those looking for right user permissions:

rabbitmqctl add_user zabbix pass
rabbitmqctl set_user_tags zabbix monitoring
rabbitmqctl set_permissions -p / zabbix '^aliveness-test$' '^amq\.default$' '^aliveness-test$'

Probably worth adding to documentation.

1reaction
mschedrincommented, Jul 13, 2017

Actually, the user tag should be ‘monitoring’, not ‘management’. I’ve corrected my message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aliveness-test is missing from version rabbitmq 3.4.1 Erlang ...
It was actually a problem with the queue itself, marked as durable=true. Once I removed it, it was recreated as durable=false and I...
Read more >
Chapter 10. Monitoring: Houston, we have a problem
Checking aliveness with the REST API. Testing that RabbitMQ is accepting new connections and able to build an AMQP channel is a good...
Read more >
Monitoring - RabbitMQ
Monitoring helps detect issues before they affect the rest of the environment and, eventually, ... A Health check is the most basic aspect...
Read more >
RabbitMQ HTTP API call to aliveness-test returns 404 but ...
To get this to work I simply changed my request from: curl -i http://guest:guest@localhost:55672/api/aliveness-test/.
Read more >
[rabbitmq-discuss] RabbitMQ API - aliveness-test
Aliveness test creates a new connection to the node you contact, declares a queue (which is not mirrored), publishes a message so that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found