@AlexDawson wrote:
Ah 🙂
This isn't something I'm personally familiar with, however I've gone through our documentation and found the following pointers, which will I'm pretty confident will help @moork and you to implement it.
Reviewing our documentation at https://library.netapp.com/ecm/ecm_download_file/ECMLP2862552 I look at page 50, which points out that a custom script can be executed to perform an action.
I also review the section in the SNOW web docs at https://docs.servicenow.com/bundle/paris-it-operations-management/page/product/event-management/task/send-events-via-web-service.html regarding creating events via API.
So, next step is to take the script inputs and turn them into a JSON web event post to SNOW
I assume that since you're asking about PowerShell, you're running AIQUM on Windows. Page 322 of ECMLP2862552 begins the section on using Scripts and points out that PowerShell scripts are supported on the Windows platform only. You probably want to map our script argument eventSourceName to SNOW's "node" identifier for the event to be sent.
This page covers using command line arguments inside PowerShell - https://www.red-gate.com/simple-talk/sysadmin/powershell/how-to-use-parameters-in-powershell/ - and then this page covers creating and sending JSON inside PowerShell - https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.1
So, what you need to do is write a script that will be called by AIQUM when an event is created, that then maps the arguments provided by it into a JSON object that then gets posted to SNOW.
Hope this helps!
Kevin, you are welcome to reach out to me internally if you have any feedback.
We had similar requirements to create Remedy INCs from Unified Manager alerts. There are some differences - Remedy vs SNOW, our UM instance is on Linux so we were somewhat more flexible, and we're using Perl instead of PS.
Our UM instance calls an alerting script that takes the input parameters, determines how to re-format them to create the INC, then uses our simplified process to create the INC. Our Remedy and Control-M teams worked together to make the actual INC creation process simple. Once your code is written to create the INC, it can be used wherever it's needed. It's been a great solution. I also implemented event logging so we could check to make sure that it was working properly if needed.
In short, this is a great solution to your problem. Extract what you need from the command line parameters, cook up the appropriate JSON and ship it off to SNOW.