I know this works:
{
"to": ["derin.mellor@hpe.com"],
"subject": "Unknown Device Connected",
"message": "Unknown device %{Connection:Client-Mac-Address-Colon} connected at: %{Date:Date-Time}. This is located at: %{Radius:Aruba:Aruba-Location-Id} on NAS: %{Radius:IETF:NAS-Identifier} Device Category: %{Authorization:[Endpoints Repository]:Category} Device Family: %{Authorization:[Endpoints Repository]:OS Family} Device Name: %{Authorization:[Endpoints Repository]:Device Name}. To register this device use this link https://cppm.hpearubademo.com/guest/mac_create.php?mac=%{Connection:Client-Mac-Address-Colon}&device_name=%{Authorization:[Endpoints Repository]:Device Name}"
}
If you're struggling to debug put the "API Framework" into Trace - see attacked (but not on a live environment ;-))
This will put more detailed logs into the CPG Logs.
What is more interesting is using an HTML email:
{
"to": ["derin.mellor@hpe.com"],
"subject": "Unknown Device Connected",
"headers": {"Content-Type": "text/html;charset=UTF-8"},
"message": "<html><head><style>body {background-color:#ffffff;background-repeat:no-repeat;background-position:top left;background-attachment:fixed;}h1{font-family:Arial, sans-serif;color:#000000;background-color:#ffffff;}p {font-family:Arial, sans-serif;font-size:14px;font-style:normal;font-weight:normal;color:#000000;background-color:#ffffff;}</style></head><body><h1><p style='color:#B92D5D;font-size:20px;'>An Unknown device %{Connection:Client-Mac-Address-Colon} connected</p><p>It is located at NAS-IP: %{Connection:NAD-IP-Address}, Port: %{Radius:IETF:NAS-Port-Id}.</br><b>Connection Time:</b> %{Date:Date-Time}</br><b>Manufacturer:</b> %{Authorization:[Endpoints Repository]:MAC Vendor}</br><b>Hostname:</b> %{Authorization:[Endpoints Repository]:Hostname}</br><b>Device Category:</b> %{Authorization:[Endpoints Repository]:Category}</br><b>Device OS Family:</b> %{Authorization:[Endpoints Repository]:OS Family}</br><b>Device Name:</b> %{Authorization:[Endpoints Repository]:Device Name}</p><p>Click <a href=\"https://cppm.hpearubademo.com/guest/mac_create.php?mac=%{Connection:Client-Mac-Address-Colon}&device_name=%{Authorization:[Endpoints Repository]:Device Name}\">here</a> to register your device.</p></br></body></html>"
}
I've attached both these Context Server Actions - in ContextServerAction.zip - just import with the password aruba123.
Remember to change my email address.
Regards Drin