zalando-zmon / zmon-worker

ZMON Python Worker
https://zmon.io/
Other
19 stars 41 forks source link

Report missing plugin configurations properly (e.g. WORKER_PLUGIN_SCALYR_READ_KEY) #27

Closed amjedonline closed 8 years ago

amjedonline commented 8 years ago

Zmon worker returns an error on trying to get timeseries based logs from scalyr Here is a simple check definition def check(): query = "$serverHost='my-awesome-service' $severity >= '5'" return scalyr().timeseries(query, minutes=5)

Results in {"status":"error/client/badRequest","message":"request must have 'token' field"}

hjacobs commented 8 years ago

@amjedonline you need to set the environment variable WORKER_PLUGIN_SCALYR_READ_KEY in your ZMON Worker (https://docs.zmon.io/en/latest/installation/configuration.html#worker).

Jan-M commented 8 years ago

You need to specify: WORKER_PLUGIN_SCALYR_READ_KEY: ....

hjacobs commented 8 years ago

We should add a proper error message and unit test for it :smile:

Jan-M commented 8 years ago

True ;-)

Jan-M commented 8 years ago

Just needs to be checked in the functions and not during partial construction, as it is optional.

hjacobs commented 8 years ago

:+1: