Hi everyone,
We are currently implementing a bidirectional integration between Zabbix 7 and Opsgenie using the Opsgenie Edge Connector (OEC).
While the inbound integration (Zabbix to Opsgenie) works perfectly and alerts are created correctly, the outbound flow (OEC) fails when we try to Acknowledge or Close an alert from the Opsgenie console.
The OEC successfully authenticates with the Zabbix API, but it fails to pass the eventid to Zabbix. Specifically, the actionExecutorForZabbix7.py script sends an empty string for the eventids parameter, causing Zabbix to return a -32602 error.
Environment details:
OEC Version: 1.1.4 (Core) / 1.1.11 (Package)
Zabbix Version: 7.x
Environment: Linux (OEC running as a local service)
Execution log (simplified):
INFO: Will execute Acknowledge for alertId [REDACTED_ALERT_ID]
DEBUG: Username: oec
DEBUG: Command Url: https://[REDACTED_ZABBIX_URL]/api_jsonrpc.php
DEBUG: Action: Acknowledge
DEBUG: [Acknowledge] login response: 200 result: [REDACTED_AUTH_TOKEN]
DEBUG: Posting to Zabbix. Method: event.acknowledge, Params: eventids: "", message: "Acknowledged by [USER] via Opsgenie", action: 6
DEBUG: Zabbix response: error: code: -32602, message: "Invalid params.", data: "Invalid parameter /eventids: an array is expected."
Technical Analysis: It appears that the actionExecutorForZabbix7.py script is unable to extract the Zabbix eventid from the Opsgenie alert details or extra properties, even though the alert was originally created by the Zabbix integration. Since the eventids field is mandatory in Zabbix 7 API and must be an array, the empty string result in an API rejection.
Config /etc/opsgenie/conf/oecConfig.json:
{
"actionMappings": {
"Acknowledge": {
"filepath": "/home/opsgenie/oec/scripts/actionExecutorForZabbix7.py",
"sourceType": "local",
"stderr": "/var/log/opsgenie/oec-ack.log",
"stdout": "/var/log/opsgenie/oec-ack.log"
},
"Close": {
"filepath": "/home/opsgenie/oec/scripts/actionExecutorForZabbix7.py",
"sourceType": "local",
"stderr": "/var/log/opsgenie/oec-close.log",
"stdout": "/var/log/opsgenie/oec-close.log"
}
},
"apiKey": "REDACTED",
"appName": "OEC-zabbix.pepita.io",
"baseUrl": "https://api.eu.opsgenie.com",
"globalFlags": {
"command_url": "https://zabbix.pepita.io/api_jsonrpc.php",
"password": "REDACTED",
"user": "oec"
},
"logLevel": "debug"
Request:
Could you please verify if the current actionExecutorForZabbix7.py script (Zabbix 7 compatible) requires specific "Extra Properties" or "Tags" to correctly map the eventid?
Is there a known issue with OEC 1.1.4 and Zabbix 7 API regarding the eventids parameter format?
Could you provide the latest version of the Zabbix execution script that supports API Token authentication and correct event mapping for Zabbix 7?
Best regards,
Vincenzo
I had to write my own actionExecutor script after failing to find a usable one provided from Atlassian in several of their repos. I'm not sure where you located the version you have, but you might want to check your action parameter value. AFAIK, the correct action to acknowledge an alert is 2, not 6. Reference event.acknowledge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.