You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I configured the squadcast zabbix alerts like in the tutorial (https://support.squadcast.com/docs/zabbix-integration-guide).
But the script failed on start. hostname:/usr/lib/zabbix/alertscripts# ./sq-zabbix.py https://api.squadcast.com/v1/incidents/zabbix/1234.. "test2" "$(cat sq-zabbix.testcontent)" Sending data to squadcast {'id': '{TRIGGER.ID}', 'event_id': '{EVENT.ID}', 'subject': 'test2', 'status': '{TRIGGER.STATUS}', 'url': '{TRIGGER.URL}', 'value': '{TRIGGER.VALUE}', 'name': '{TRIGGER.NAME}', 'hostname': '{HOSTNAME}', 'severity': '{TRIGGER.SEVERITY}', 'ip': '{IPADDRESS}'} Traceback (most recent call last): File "./sq-zabbix.py", line 61, in <module> post_to_url(url, form_payload(data, subject)) File "./sq-zabbix.py", line 39, in post_to_url gcontext = ssl.SSLContext() TypeError: __new__() missing 1 required positional argument: 'protocol'
I added the prococol header in line 39 from: gcontext = ssl.SSLContext()
to gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
and it works. Please fix the script accordingly.
The text was updated successfully, but these errors were encountered:
I configured the squadcast zabbix alerts like in the tutorial (https://support.squadcast.com/docs/zabbix-integration-guide).
But the script failed on start.
hostname:/usr/lib/zabbix/alertscripts# ./sq-zabbix.py https://api.squadcast.com/v1/incidents/zabbix/1234.. "test2" "$(cat sq-zabbix.testcontent)" Sending data to squadcast {'id': '{TRIGGER.ID}', 'event_id': '{EVENT.ID}', 'subject': 'test2', 'status': '{TRIGGER.STATUS}', 'url': '{TRIGGER.URL}', 'value': '{TRIGGER.VALUE}', 'name': '{TRIGGER.NAME}', 'hostname': '{HOSTNAME}', 'severity': '{TRIGGER.SEVERITY}', 'ip': '{IPADDRESS}'} Traceback (most recent call last): File "./sq-zabbix.py", line 61, in <module> post_to_url(url, form_payload(data, subject)) File "./sq-zabbix.py", line 39, in post_to_url gcontext = ssl.SSLContext() TypeError: __new__() missing 1 required positional argument: 'protocol'
I added the prococol header in line 39 from:
gcontext = ssl.SSLContext()
to
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
and it works. Please fix the script accordingly.
The text was updated successfully, but these errors were encountered: