opsgenie / oec-scripts

Opsgenie Edge Connector Custom Scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest OEC-scripts 1.1.6 throws error on older OS releases / python versions

laugmanuel opened this issue · comments

We are running Icinga2 on RHEL7. A few days ago, I've updated to the latest release of these scripts (which was a bit painful, because the version inside the package is still 1.1.5).

Just now, I've noticed that opened alerts using the new scripts do show an error in OpsGenie alert activity log:

Executed [Create] action via OEC[integrationId: <id> integrationType: Icinga2] with errors. Reason: Err: exit status 1, Stderr: 
Traceback (most recent call last): File "/home/opsgenie/oec/scripts/actionExecutor.py", line 388, in <module> main()
File "/home/opsgenie/oec/scripts/actionExecutor.py", line 371, in main send_create_request(is_service_alert)
File "/home/opsgenie/oec/scripts/actionExecutor.py", line 46, in send_create_request attach(is_service_alert) 
File "/home/opsgenie/oec/scripts/actionExecutor.py", line 122, in attach with tempfile.TemporaryDirectory() as tempdir:
 AttributeError: 'module' object has no attribute 'TemporaryDirectory'

Hi @laugmanuel
Could you please check it with Icinga2-1.1.8_oec-1.1.4? Please let us know if the problem still exists