BSI and SOI integration and Alarm example

advertisement
Table of Figures
Figure 1: Universal Connector Client Directory Structure ............................................................................ 3
Figure 2: SOI Topology visualization ............................................................................................................. 4
Figure 3: Wrapper script file location ........................................................................................................... 5
Figure 4: Example BSI Alert device................................................................................................................ 6
Figure 5: Example BSI Alert recipient............................................................................................................ 7
Figure 6: Example BSI Alert profile ............................................................................................................... 8
Summary:
BSI provides the capability to define alert devices. Basically an alert device is a program that gets called
by the alert engine and passes various arguments. SOI provides a command line utility for sending
information through the universal connector via web service calls. Among others you can create CIs and
Send Events/Alarms. Fundamentally this integration is accomplished defining the SOI command line
utility in BSI as an Alert Device. Specifically, a wrapper script is defined as the alert device which will
parse the BSI alert fields and call the SOI command line utility correctly.
Integration Steps:
•
Setup SOI on BSI Appserver
•
Copy over and run the InstallSAM installer and install the universal connector client.
Figure : Universal Connector Client Directory Structure
•
Create CI and run through Universal Connector
•
Make xml file with ci Information.
<Events>
<Event>
<property tag="eventType" value="AddCIEvent" />
<property tag="instanceID" value="SA_Application:National Help Desks" />
<property tag="className" value="Application" />
<property tag="deviceID" value="National Help Desks" />
<property tag="situationMessage" value="Adding a new CI" />
<property tag="Vendor" value="CA_BSI" />
<property tag="ProductName" value="CA_BSI" />
</Event>
</Events>
•
Execute command line:
GCEventAddCmd -h192.168.1.1:7090 –fgc_ciadd-application-bsi-national-servicedesks.xml
•
Finalize setup in SOI
•
Create the service and application hierarchy
Figure : SOI Topology visualization
•
Test Point: Verify command line interface execution
Sample Command:
"D:\Program Files (x86)\CA\"SOI\GCEventAddCmd.bat -h192.168.1.1:7090 -a20121514412382
-i"SA_Application:National Help Desks" -cApplication -dCA_BSI -s2 -tQuality -m"SLA Target
Violation Contract [Veterans First] Metric [Percentage of priority 2 resolutions that occurred
between 61-120 minutes] Target [0] ServiceLevel [7.7]"
•
Create wrapper script for BSI to call
Figure : Wrapper script file location
•
The wrapper script parses the command line alert values, sent by BSI with an alarm, and
builds the command string to execute.
Example Wrapper Batch File:
@echo off
setlocal
set COMMAND=SOI\GCEventAddCmd.bat
set CA_HOME="D:\Program Files (x86)\CA\"
set SOI_HOST=192.168.1.1
set SOI_PORT=7090
set DEVICE=CA_BSI
set DEFAULT_APP=SA_Application
set CLASS_NAME=Application
set TYPE=Quality
rem the following procedure is used to get a timestamp in the form of YYYYMMDDHHMMSSCC
which will be used for both
rem logging and as the *unique alert id.
for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('"echo.|date"') do (
for /f "tokens=1-3 delims=/.- " %%A in ("%date:* =%") do (
set %%a=%%A&set %%b=%%B&set %%c=%%C))
set /a "yy=10000%yy% %%10000,mm=100%mm% %% 100,dd=100%dd% %%
100"
for /f "tokens=1-4 delims=:. " %%A in ("%time: =0%") do @set
UNIQUE=%yy%%mm%%dd%%%A%%B%%C%%D
rem parse the arguments passed to this script to determine the correct CI for SOI
for /f "tokens=1,2 delims=:" %%a in ("%~1") do set service=%%a&set message=%%b
echo %UNIQUE% %CA_HOME%%COMMAND% -h%SOI_HOST%:%SOI_PORT% -a%UNIQUE% i"%DEFAULT_APP%:%service%" -c%CLASS_NAME% -d%DEVICE% -s%3 -t%TYPE% -m"%~2
%message%" >> %0.log
%CA_HOME%%COMMAND% -h%SOI_HOST%:%SOI_PORT% -a%UNIQUE% i"%DEFAULT_APP%:%service%" -c%CLASS_NAME% -d%DEVICE% -s%3 -t%TYPE% -m"%~2
%message%"
echo Return code: %ERRORLEVEL%
•
Create Alert device in BSI which executes the wrapper script and passes values
Figure : Example BSI Alert device
•
Create Alert recipient that uses the new alert device
Figure : Example BSI Alert recipient
•
Create Alert profile that with correct Message Body value
•
Must start with “#Service:” so wrapper script will function properly. The service needs
to be sent to the SOI universal connector client as a specific argument.
Figure : Example BSI Alert profile
•
Test Point: Generate an alarm that meets the defined condition to verify execution.
•
A simple way to test partial functionality is to setup a Login Failure alert profile. You will
need to make sure the Message contains a Service: for proper wrapper script function.
•
Successful display of alarm to SOI.
Download