Alignak-monitoring / alignak

Monitoring tool, highly flexible and new standard oriented
https://alignak-monitoring.github.io
GNU Affero General Public License v3.0
86 stars 19 forks source link

Module inner metrics raised an exception #1104

Closed mohierf closed 5 years ago

mohierf commented 5 years ago

I noticed:

[2019-05-14 08:30:24] ERROR: [broker-master.alignak.module.inner-metrics] initialization, test connection failed. Error: [Errno 111] Connection refused
[2019-05-14 08:30:24] ERROR: [broker-master.alignak.modulesmanager] The module instance inner-metrics raised an exception on initialization: local variable 'connections' referenced before assignment, I remove it!
[2019-05-14 08:30:24] ERROR: [broker-master.alignak.modulesmanager] local variable 'connections' referenced before assignment
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/alignak/modulesmanager.py", line 189, in try_instance_init
    if not instance.init():
  File "/usr/local/lib/python3.6/site-packages/alignak/modules/inner_metrics.py", line 294, in init
    return connections
UnboundLocalError: local variable 'connections' referenced before assignment
mohierf commented 5 years ago

This happen only when all the configured connections fail to establish! Must be fixed with a proper variable initialization....