opsgenie / oec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Options to specify python executable

matejzero opened this issue · comments

We have a case where OEC is running on server where python executable is linked to python2. In that case, we are unable to run nagios integration as nagios script is not compatible with python2.

At the moment, we modify https://github.com/opsgenie/oec/blob/master/runbook/executor.go#L19 and recompile ourself, but it would be nice if that cold be changed via config file so upgrade path would be simpler.

Is that something that could be done?

Hi @matejzero, you can track the progress of the issue from this ticket

Also running into this problem today seems it were never fixed.

I modified OEC's systemd service to have:

Environment="PATH=/home/opsgenie/python3/"

and in that directory is a symlink of /usr/bin/python3 to /home/opsgenie/python3/python and that seems to have worked around this, now it's trying to execute nagios commands from Opsgenie and is hitting execution of message [x] with with entityId [y] failed: exit status 2 Stderr: usage: actionExecutor.py [-h] -payload PAYLOAD -apiKey APIKEY -opsgenieUrl

I thought all of this got configured in /home/opsgenie/oec/conf/config.json, does the script not reference that either?