Skip to content

Commit

Permalink
Update zbxTelegram.py
Browse files Browse the repository at this point in the history
Исправлена ошибка после обновления заббикса <5.2:
zbxTelegram.py:166 - ERROR: User authorization failed: Login name or password is incorrect
  • Loading branch information
Dmitry Sokolov authored Jan 16, 2021
1 parent f52e08c commit 6e39682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zbxTelegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_cookie():
req_cookie = requests.post(zabbix_api_url, data=data_api, verify=False)
cookie = req_cookie.cookies
req_cookie.close()
if 'zbx_sessionid' not in cookie:
if not any(_ in cookie for _ in ['zbx_session', 'zbx_sessionid']):
loggings.error(
'User authorization failed: {} ({})'.format('Login name or password is incorrect.', zabbix_api_url))
return False
Expand Down

0 comments on commit 6e39682

Please sign in to comment.