oec-scripts icon indicating copy to clipboard operation
oec-scripts copied to clipboard

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

Open laugmanuel opened this issue 1 year ago • 1 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'

laugmanuel avatar Mar 02 '23 15:03 laugmanuel

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

ozlemmcokuk avatar Mar 05 '24 15:03 ozlemmcokuk