I'm trying to get alerts to run the simple script below.
However it's not pulling in the variables.
The event gets passed to ServiceNow but instead of the alert variable it passes:
message_key: [1]
description: Test from Active-IQ by Rusty $ARGV[1],
============================================================================
#!/bin/bash
url="https://<removed>:8050/api/mid/em/inbound_event?Transform=jsonv2"
auth="<removed>:<removed>"
data='{
"records": [
{
"description": "Test from Active-IQ by Rusty $ARGV[1]",
"node": "test",
"severity": 2,
"updated": "2023-03-16 12:35:41",
"event_class": "ServiceNow Event Listner",
"type": "curl command",
"message_key": '$ARGV[1]' ,
"source": "Active-IQ",
"additional_info": {
"%_ext_ticket_ref": "",
"%F": "1217",
"is_config": "snow-dash",
"region": "texas"
},
"resource": "1.4.172.22.1.134"
}
]
}'
curl -u "$auth" --insecure -H "Content-Type: application/json" -d "$data" "$url"
I've been referencing the following documentation:
https://www.netapp.com/pdf.html?item=/media/19932-tr-4585.pdf (outdated)
https://docs.netapp.com/us-en/active-iq-unified-manager-97/health-checker/concept-how-scripts-work-with-alerts.html (hasn't been helpful)
https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OnCommand-Unified-Manager-alert-script-integration/td-p/128784 (has made me hopeful but raises more questions)