Alignak-monitoring-contrib / alignak-module-backend

Alignak modules (arbiter, broker, scheduler) for the backend
GNU Affero General Public License v3.0
0 stars 2 forks source link

Unallowed value for ls_state_id #110

Closed mohierf closed 6 years ago

mohierf commented 7 years ago

On the Alignak demo, I got this:

[2017-09-05 14:36:33 CEST] ERROR: [alignak.module.backend_broker] Patch livestate for host 59ae942735d17b41f9b7c77f error
[2017-09-05 14:36:33 CEST] ERROR: [alignak.module.backend_broker] Data: {'ls_output': u'[Errno 2] No such file or directory', 'ls_last_time_up': 0, 'ls_last_time_down': 1504614992, 'ls_last_time_unknown': 0, '_realm': u'59ae942435d17b41f9b7c70d', 'ls_perf_data': u'', 'ls_attempt': 0, 'ls_execution_time': 0.0555920601, 'ls_last_check': 1504614981, 'ls_last_state_type': u'HARD', 'ls_long_output': u'', 'ls_last_hard_state_changed': 0.0, 'ls_acknowledged': False, 'ls_state_id': 4, 'ls_acknowledgement_type': 1, 'ls_latency': 1.210944891, 'ls_downtimed': False, 'ls_last_state_changed': 0.0, 'ls_state': u'UNREACHABLE', 'ls_last_time_unreachable': 1504614992, 'ls_state_type': u'HARD', 'ls_last_state': u'UNREACHABLE'}
[2017-09-05 14:36:33 CEST] ERROR: [alignak.module.backend_broker] Exception: Backend error code 422: {"_status": "ERR", "_issues": {"ls_state_id": "unallowed value 4"}}, response: {u'_status': u'ERR', u'_issues': {u'ls_state_id': u'unallowed value 4'}}
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/alignak_module_backend/broker/module.py", line 512, in send_to_backend
    data, headers, True)
  File "/usr/local/lib/python2.7/site-packages/alignak_backend_client/client.py", line 640, in patch
    data=data, headers=headers, inception=False
  File "/usr/local/lib/python2.7/site-packages/alignak_backend_client/client.py", line 657, in patch
    raise BackendException(response.status_code, response.content, resp)
BackendException: Backend error code 422: {"_status": "ERR", "_issues": {"ls_state_id": "unallowed value 4"}}, response: {u'_status': u'ERR', u'_issues': {u'ls_state_id': u'unallowed value 4'}}
mohierf commented 7 years ago

As a consequence:

[2017-09-05 16:03:25 CEST] ERROR: [alignak.module.backend_broker] Alignak backend connection is not available. Skipping objects update.
[2017-09-05 16:03:25 CEST] ERROR: [alignak.module.backend_broker] Alignak backend connection is not available. Skipping objects update.
[2017-09-05 16:03:27 CEST] ERROR: [alignak.module.backend_broker] Alignak backend connection is not available. Skipping objects update.
mohierf commented 7 years ago

Alignak is using the values:

But the Alignak backend considers 0, 1 and 2!