Trying to get MAC and Serial Number for node/device into webhook payload, but cannot find a working variable, and all attempts to create a custom variable seem to be failing.
Here is one option that I've tried. I've tried many different formatting options, but just can't seem to get the values into the payloads. I've put the variables that I've been trying to get to work in boldface. All the others work without issue
Any assistance would be greatly appreciate. Thank you all.
{
"app_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"status": "${N=Alerting;M=Severity}",
"managed": "${N=SwisEntity;M=CustomProperties.Managed}",
"byob": "${N=SwisEntity;M=CustomProperties.BYOB_Circuit}",
"alert": "${N=Alerting;M=AlertMessage}",
"host": "${N=SWQL;M=SELECT TOP 1 RelatedNodeCaption FROM Orion.AlertObjects WHERE AlertObjectID = ${N=Alerting;M=AlertObjectID} }",
"custid": "${N=SwisEntity;M=CustomProperties.CustID}",
"object": "${N=SWQL;M=SELECT TOP 1 EntityCaption FROM Orion.AlertObjects WHERE AlertObjectID = ${N=Alerting;M=AlertObjectID} }",
"object_type": "${N=Alerting;M=ObjectType}",
"NodeID": "${N=SwisEntity;M=NodeID}",
"serialnum": "${SQL:Select TOP 1 ServiceTag FROM APM_HardwareInfo WHERE nodeid='${NodeID}'}",
"macid": "${SQL: SELECT TOP 1 MAC FROM NodeMACAddresses FROM APM_HardwareInfo WHERE nodeid=${NodeID}}",
"description": "${N=Alerting;M=AlertDescription}",
"solarwinds_url": "${N=Alerting;M=AlertDetailsUrl}",
"acknowledged": "${N=Alerting;M=Acknowledged}",
"acknowledged_by": "${N=Alerting;M=AcknowledgedBy}",
"polling_engine": "${N=SwisEntity;M=Engine.ServerName}",
"ipaddress": "${N=SwisEntity;M=IP_Address}",
"latitude": "${N=SwisEntity;M=CustomProperties.Latitude}",
"longitude": "${N=SwisEntity;M=CustomProperties.Longitude}",
"location": "${N=SwisEntity;M=Location}",
"carrier": "${N=SwisEntity;M=CustomProperties.CarrierName}",
"carriername": "${N=SwisEntity;M=CustomProperties.CarrierName}",
"contactinfoemail": "${N=SwisEntity;M=CustomProperties.ContactInfoEmail}",
"circuitid": "${N=SwisEntity;M=CustomProperties.CircuitID}",
"siteaddress:": "${N=SwisEntity;M=CustomProperties.SiteAddress}",
"circuitype": "${N=SwisEntity;M=CustomProperties.CircuitType}",
"circuitspeed": "${N=SwisEntity;M=CustomProperties.CircuitSpeed}",
"timestamp": "${N=SWQL;M=SELECT GETUTCDATE() as a1 FROM Orion.Engines}",
"solarwinds_object_id": "${N=Alerting;M=AlertObjectID}"
}