Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sq-zabbix.py protocol failure #2

Open
try2codesecure opened this issue Apr 15, 2021 · 0 comments
Open

sq-zabbix.py protocol failure #2

try2codesecure opened this issue Apr 15, 2021 · 0 comments

Comments

@try2codesecure
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant