Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

api.py output errors to Zabbix #41

Open
adamlc opened this issue Jun 23, 2016 · 2 comments
Open

api.py output errors to Zabbix #41

adamlc opened this issue Jun 23, 2016 · 2 comments

Comments

@adamlc
Copy link
Contributor

adamlc commented Jun 23, 2016

Hey guys, sometimes api.py throws an error, which gets send to zabbix. For example:

Trigger: RabbitMQ Cluster partition detected
Trigger status: PROBLEM
Trigger severity: Average
Trigger URL:

Item values:

1. RabbitMQ Server Partitions (Jumplead - RabbitMQ:rabbitmq[server,partitions]): Traceback (most recent call last):
  File "./api.py", line 212, in <module>
    main()
  File "./api.py", line 207, in main
    print api.check_server(options.metric, options.node)
  File "./api.py", line 150, in check_server
    for nodeData in self.call
2. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
3. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*

Unfortunately I know literally nothing about python. Is there some way this could be handed better? I'm guessing its some sort of timeout issue.

@jasonmcintosh
Copy link
Owner

Yep - it's failing on the API call to the RabbitMQ server. PROBABLY should put an error handler in here that would catch it and return a failure situation vs. the string of the error.

@jasonmcintosh
Copy link
Owner

Note, it COULD also be an error with the JSON or other parsing. But regardless SHOULD be caught and logged as an error, then the api return a meaningful message implying an error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants