You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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 H 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.
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 H , 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 H 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.