Setting a custom violation description in NewRelic does not seem to be accessible in the OpsGenie NewRelic New integration parsed variables.
Is there a way to access this field from the payload sent by NewRelic using variable interpolation ?
Eg.
```
{{ raw.payload.condition_description }}
```
https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-new-relic-alerts-new/
Update:
@Nick Haller helped confirm that the format for rendering the custom condition description is.
{{_payload.payload.condition_description}}
Can you update the documentation below regarding custom attributes?
Integrate Opsgenie with New Relic Workflows | Opsgenie | Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This also helped me acquire custom properties (in this case, the associated entity to the SLI/SLO definition).
I would love documentation update; and also would like it noted that there must be no space padding around {{ }} and the variable _payload...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @steven.falconieri ,
If this field / data is parsing in the payload, you should be able to extract it using either String Processing or Regex.
It would realistically depend on how the condition_description is parsing in the payload, but maybe try:
{{payload.condition_description}}
Feel free to also share a what the payload looks like in the Processed incomingData log either with a screenshot or copy/paste it here - as long as you are comfortable sharing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Nick Haller , that suggestion definitely makes it much more obvious whats happening.
It appears that although the payload being received includes the `condition_description` field it is is not part of the `_parsedData`.
Might i suggest a feature request to include the raw payload in the parsed data or are there potential security implications in doing so.
Parsed data
```
{ "_incomingData": { "_parsedData": {
"-originalTags": [ "og_priority:P2", "service.name:android" ],
"target_name": "Transaction query",
"incident_acknowledge_url":"https://alerts.newrelic.com/accounts/XXXX/incidents/XXXX/acknowledge",
"event_type": "INCIDENT",
"incident_id": "XXXX",
"target_link": "https://insights.newrelic.com/accounts/XXXX/query?query=SELECT%2010%20From%20Transaction%20%20TIMESERIES%201%20minute%20SINCE%20%272022-03-08%2015%3A52%3A13%27%20UNTIL%20%272022-03-08%2021%3A51%3A13%27",
"_target_labels_map": {},
"delayIfDoesNotExists": "true",
"details": "Transaction query result is > 1.0 for 1 minutes on 'test og custom desc'",
"state": "open",
"condition_name": "test og custom desc",
"target_product": "NRQL",
"timestamp": "1646776273605",
"owner": "",
"severity": "CRITICAL",
"policy_url": "https://alerts.newrelic.com/accounts/XXXX/policies/XXXXXX",
"-recipients": [],
"target_type": "Query",
"policy_name": "TEST",
"incident_url": "https://alerts.newrelic.com/accounts/xxxxx/incidents/xxxxx",
"priority": "CRITICAL",
"-teams": [],
"runbook_url": "null",
"-tags": [ "og_priority:P2", "service.name:android" ],
"-target_labels": [ {} ] },
"integrationType": "NewRelicV2",
"integrationName": "NewRelic [dev]",
"integrationId": "xxxx",
"incomingDataId": "xxxx"
} }
```
Raw payload received
```
{ "_incomingData": { "integrationType": "NewRelicV2", "_payload": "
{\"apiKey\":\"xxx\",
\"teams\":\"\",\"payload\":{\"account_id\":xxx,
\"account_name\":\"xxxxx\",\
"condition_id\":xxxx,
\"condition_name\":\"test og custom desc\",
\"condition_description\":\"This is a custom description field\",
\"current_state\":\"open\",
\"details\":\"Transaction query result is > 1.0 for 1 minutes on 'test og custom desc'\",
\"incident_acknowledge_url\":\"https://alerts.newrelic.com/accounts/xxxx/incidents/xxxxx/acknowledge\",\"incident_id\":xxxx,
\"incident_url\":\"https://alerts.newrelic.com/accounts/xxxxx/incidents/xxxxx\",\"owner\":\"\",
\"policy_name\":\"TEST\",
\"policy_url\":\"https://alerts.newrelic.com/accounts/xxxxx/policies/xxxxxx\",
\"open_violations_count\":{\"critical\":1,\"warning\":0},\"closed_violations_count\":{\"critical\":0,\"warning\":0},\"severity\":\"CRITICAL\",\"targets\":[{\"id\":\"Transaction\",\"name\":\"Transaction query\",\"link\":\"https://insights.newrelic.com/accounts/xxxxxx/query?query=SELECT%2010%20From%20Transaction%20%20TIMESERIES%201%20minute%20SINCE%20%272022-03-08%2015%3A52%3A13%27%20UNTIL%20%272022-03-08%2021%3A51%3A13%27\",\"labels\":{},\"product\":\"NRQL\",\"type\":\"Query\"}],\"timestamp\":xxxxx,\"timestamp_utc_string\":\"2022-03-08, 21:51 UTC\",\"event_type\":\"INCIDENT\",\"version\":\"1.0\",\"violation_callback_url\":\"https://insights.newrelic.com/accounts/xxxxxx/query?query=SELECT%2010%20From%20Transaction%20%20TIMESERIES%201%20minute%20SINCE%20%272022-03-08%2015%3A52%3A13%27%20UNTIL%20%272022-03-08%2021%3A51%3A13%27\",\"duration\":469,\"condition_family_id\":xxxxx,\"metadata\":{\"evaluation_system_source\":\"Willamette\"}},\"recipients\":\"\",\"tags\":\"og_priority:P2,service.name:android\"}", "_httpParams": {}, "httpUrl": "/v2/json/newrelic", "incomingDataId": "xxxxx", "_httpHeaders": { "User-Agent": "okhttp/4.9.1", "X-Amz-Cf-Id": "xxxx", "X-Forwarded-For": "xxxx", xxxx, xxxx, xxxx", "Accept-Encoding": "gzip", "Content-Length": "xxx", "X-Amzn-Trace-Id": "Self=1-xxx-xxx;Root=1-xxxx-xxxx", "Content-Type": "application/json" } }, "_actionSource": { "_details": { "ownerType": "NewRelicV2", "clientIpAddress": "xxxx", "writeAccessGranted": "true", "configAccessGranted": "false", "deleteAccessGranted": "true", "ownerId": "xx-xxx", "ownerDomain": "integration", "readAccessGranted": "true" }, "type": "API" } }
```
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing that. Based on the payload shared, you may be able to simply use:
{{condition_description}}
to extract that field. If either of those suggestions do not work - feel free to open a ticket with support here: https://support.atlassian.com/opsgenie/
You can even reference this Community post and Nick H., and I'll try to pick that up! We might need to take a deeper look into the account / logs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the suggestion @Nick Haller but my testing with `{{condition_description}}` was unsuccessful. I have raised a support ticket OGSP-85926 as you suggested.
Really appreciate the help on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.