Before starting...

This guide requires you to have SANM (Spectrum Alarm Notification Manager), the AlarmNotifier & AlarmNotifier Enhancements. You will also need a Spectrum Admin user with  read/write access.

Step 1 - add the forwarding script

On your CA Spectrum server, go to the directory of your AlarmNotifier - typically located at: <$SPECROOT>/Notifier.
Create a file named loom.py and paste the following inside:

import json
import requests
import sys
 
sev = sys.argv[1]
server = sys.argv[2]
eventmsg = sys.argv[3]

base_url = "https://<your-subdomain>.loomsystems.com/api/v1/events/raw"
data = {"sev": sev, "server": server, "eventmsg": eventmsg, "agent": "ca-spectrum"}
resp = requests.post(base_url, json=data, headers={'content-type':'application/json', 'accept':'application/json', 'user-agent':'loom-ca-spectrum-script/0.1'})

resp.raise_for_status()

Replace <your-subdomain> with according to the domain you use to access Loom, then save the script.
Give executable rights to the script for your Admin user.

Step 2 - configure the Notifier to trigger the script

Create an AlarmNotifier (See chapter 5 of your CA Spectrum & Alarm Notification User Manual).

Edit the SetScript, UpdateScript, and ClearScript. For example, here's what you should put in the SetScript:

python loom.py $SEV $SERVER $EVENTMSG

Restart the AlarmNotifier service.

Step 3 - send a test alert

Generate an alert in Spectrum and browse to your Loom. Go to the data-sources screen - the Raw events REST endpoint should now appear green.

Step 4 - customizing the integration

Loom endpoint does not restrict the properties in the posted object. If you'd like to send additional properties, simply modify the python script to accept additional inputs, and the AlarmNotifier scripts to invoke the script with the additional parameters.

That's it! if you need help or if you have any suggestion, use the in-app chat or send us an email.

Did this answer your question?