Open epierotto opened 6 years ago
Using the snippet example:
{ "opsgenie": { "customerKey": "the-key", "teams": ["teams"], "recipients": "the-recipients", "source": "alert-source", "overwrite_quiet_hours": true, "tags": ["sensu"] } }
Tags is an array of strings and in this line it's appending the config['opsgenie']['tags'] into tags array
config['opsgenie']['tags']
Which creates: "tags":[["sensu"],"OverwriteQuietHours","critical"]
"tags":[["sensu"],"OverwriteQuietHours","critical"]
It should be: tags + json_config['tags'] if json_config['tags']
tags + json_config['tags'] if json_config['tags']
Alerts are rejected by OpsGenie API with the message: HTTP 422 Unprocessable Entity
HTTP 422 Unprocessable Entity
Using the snippet example:
Tags is an array of strings and in this line it's appending the
config['opsgenie']['tags']
into tags arrayWhich creates:
"tags":[["sensu"],"OverwriteQuietHours","critical"]
It should be:
tags + json_config['tags'] if json_config['tags']
Alerts are rejected by OpsGenie API with the message:
HTTP 422 Unprocessable Entity