jasonmcintosh / rabbitmq-zabbix

Zabbix RabbitMQ Configuration
Apache License 2.0
251 stars 168 forks source link

Queue discovery only works in DEBUG mode #45

Closed FreeK closed 7 years ago

FreeK commented 8 years ago

Auto discovery only works with "level=logging.DEBUG" in api.py. Anyone with the same issue?

plutoid commented 8 years ago

Hi FreeK,

I have the similar discovery issue like yours. do you mean below setting should be changed? api.py ==>

logging.basicConfig(filename='/var/log/zabbix/rabbitmq_zabbix.log', level=logging.WARNING, format='%(asctime)s %(levelname)s: %(message)s')

logging.basicConfig(filename='/var/log/zabbix/rabbitmq_zabbix.log', level=logging.DEBUG, format='%(asctime)s %(levelname)s: %(message)s')

BRs, Hua

jasonmcintosh commented 8 years ago

Need more details on this - not enough info to help debug any issues? The level thing should JUST affect logging, not any behavior of any other of the code.

FreeK commented 8 years ago

@plutoid yes, this line has to be changed. If it's only on warning level, the discovery fails (what makes absolutely no sense).

spm33 commented 7 years ago

I just had this happen to me as well. Happened on two servers, one through a proxy, one not. Using latest templates/scripts/configs from the repo and Zabbix 2.4.8.

jasonmcintosh commented 7 years ago

Can people try with the latest release see if that fixes things? I've not seen this behavior myself so having a hard time replicating the issue/isolating what it could be...

jasonmcintosh commented 7 years ago

Note... only thought SO far might be a spacing issue of tabs vs. spaces.... but having a hard time finding any such issue.

spm33 commented 7 years ago

Confirmed on latest on two fresh servers. In case it matters, my api.py is spaces, not tabs.

I'm willing to do whatever to help troubleshoot this. I looked at traces and didn't see anything significant, but I'm terrible at Python, so I'm basically dead-ended.

This is on latest CentOS 7, Python packages listed below: python.x86_64 2.7.5-34.el7 installed python-IPy.noarch 0.75-6.el7 installed python-babel.noarch 0.9.6-8.el7 @base python-backports.x86_64 1.0-8.el7 installed python-backports-ssl_match_hostname.noarch python-chardet.noarch 2.2.1-1.el7_1 installed python-cheetah.x86_64 2.4.4-5.el7.centos installed python-configobj.noarch 4.7.2-7.el7 installed python-decorator.noarch 3.4.0-3.el7 installed python-iniparse.noarch 0.4-9.el7 installed python-jinja2.noarch 2.7.2-2.el7 @base python-jsonpatch.noarch 1.2-3.el7.centos installed python-jsonpointer.noarch 1.9-2.el7 installed python-kitchen.noarch 1.1.1-5.el7 installed python-libs.x86_64 2.7.5-34.el7 installed python-markdown.noarch 2.4.1-1.el7.centos installed python-markupsafe.x86_64 0.11-10.el7 @base python-perf.x86_64 3.10.0-327.13.1.el7 @updates python-pillow.x86_64 2.0.0-19.gitd1c6db8.el7 installed python-pip.noarch 7.1.0-1.el7 @epel python-prettytable.noarch 0.7.2-2.el7.centos installed python-pyasn1.noarch 0.1.6-2.el7 @base python-pycurl.x86_64 7.19.0-17.el7 installed python-pygments.noarch 1.4-9.el7 installed python-pyudev.noarch 0.15-7.el7_2.1 installed python-requests.noarch 2.6.0-1.el7_1 installed python-setuptools.noarch 0.9.8-4.el7 installed python-six.noarch 1.9.0-2.el7 installed python-tornado.x86_64 4.2.1-1.el7 @saltstack python-urlgrabber.noarch 3.10-7.el7 installed python-urllib3.noarch 1.10.2-2.el7_1 installed python-zmq.x86_64 15.3.0-2.el7 @saltstack python2-boto.noarch 2.39.0-1.el7 @epel python2-crypto.x86_64 2.6.1-9.el7 @epel python2-msgpack.x86_64 0.4.8-1.el7 @epel python2-rsa.noarch 3.4.1-1.el7 @epel

jasonmcintosh commented 7 years ago

I'm curious - did you ever figure this out?

spm33 commented 7 years ago

Nope, just tried with latest and greatest everything (Zabbix 3.2, RabbitMQ 3.6.9, master of the templates) a couple of weeks ago and had the same problem.

jasonmcintosh commented 7 years ago

OK so some ideas... 1) What happens from server side if you call zabbix_get against the client from the server? E.g. zabbix_get -k rabbitmq.discovery_nodes - this SHOULD return a JSON document. 2) If you call the api directly from a commandline as the zabbix user - does this work or is there a stack trace? E.g. su zabbix, then run "/etc/zabbix/scripts/rabbitmq/list_rabbit_nodes.sh

jasonmcintosh commented 7 years ago

Closing - reopen if needed and more information available.

jasonmcintosh commented 7 years ago

Last set of ideas - check audit logs for selinux permissions issues - it's possible you're hitting those on your system.