CA Spectrum Installation Instructions

How to Integrate CA Spectrum with BigPanda

Create an App Key

First create an App Key. You'll need a separate App Key for each integrated system.

Install the BigPanda API Wrapper

On your CA Spectrum server, install the BigPanda Alerts API Python module.

The easiest way is to use pip by running the following command:

  • sudo pip install bigpanda

For more detailed information, refer to the module documentation by running: (help(bigpanda))

Prepare a Script to Send Alerts to BigPanda

1. On your CA Spectrum server, locate the directory path to your AlarmNotifier.
This directory is typically located at: <$SPECROOT>/Notifier.

Your executable scripts are also located in this directory by default.

2. Create the following custom Python script in the directory.

import bigpanda
import sys

status = sys.argv[1]
host = sys.argv[2]
check_name = sys.argv[3]

bigpanda_client = bigpanda.Client(api_token="$TOKEN", app_key="$YOUR_APP_KEY")
alert = bigpanda_client.alert(status, hostname, check_name)
alert.send()

3. Save the Python script file as BigPanda_API.py

4. Set executable rights access to the Python script for your CA Spectrum Admin user

Configure Your Monitoring System to Call Your Script

1. Create an AlarmNotifier. See chapter 5 of your CA Spectrum & Alarm Notification User Manual for instructions.

2. Edit the SetScript, UpdateScript, and ClearScript that are executed by the AlarmNotifier. For this example, we describe how to edit the SetScript. Apply the same customizations to each script that can be executed by your AlarmNotifier.

3. Add code to your SetScript that executes your custom Python script. The following example shows how AlarmNotifier attributes in the SetScript are passed to the Python Alert API script.

echo "*******************************************************************"
 echo "Sending Alert to BigPanda:”
 echo ""
 echo "($RCVRS)"
 echo "*******************************************************************"
 echo_info | tee -i /tmp/set_alarm.$PID
  python BigPanda_API.py $SEV $SERVER $EVENTMSG

alarm_id=$AID status=$TIVSTAT Spectrum_Base SPECTRUM
 rm -f /tmp/set_alarm.$PID
else
 echo " "
 echo "*****************************************************"
 echo “There was an error“
 echo "*****************************************************"
 echo_info

Test the Integration by Sending a Test Alert

1. Restart the AlarmNotifier application service.

2. Test the custom SetScript & Python Alert API script by generating an alert on a system that is monitored by Spectrum.