Issue with enriching alerts in Event Policy

book

Article ID: 144344

calendar_today

Updated On:

Products

CA Service Operations Insight (SOI)

Issue/Introduction

We are trying to configure an Event Policy via the GUI to run an enrichment script in Powershell.


I have defined 3 Input parameters as follows:


Input Parameter     Assigned Value

=============       =============

script                          D:\CA\Scripts\Pager\bin\pager_to_file.ps1

hostname                  ${pattern1.AlertedMdrElementID}

summary                   ${pattern1.Summary}

When the script receives the parameter values the Summary field appears to be split up into separate space delimited arguments, this is despite it looking to be one field in the Preview field e.g.

In Event Policy Preview field:

hostname = Myserver.ca.com

summary = Average over 1 samples total cpu is now 50.16%, which is equal to or above the threshold of 50%


The script sees this as:

hostname = Myserver.ca.com

summary = Average

summary = over

summary = 1

summary = samples

summary = total

summary = cpu

summary = is

etc. etc.

I get the same results even if I enclose the Assigned value in double quotes i.e. "${pattern1.Summary}"

Is there any way I can overcome this issue? As I really need summary to be sent across to the script as a single field.

Cause

This is due to how powershell manages the arguments, it considers space as the delimiter

Environment

Service Operations Insight (SOI) Manager 4.x

Resolution

Since powershell considers space as the delimiter, we need to tweak this by using 3 double quotes as mentioned below for "Summary" alert attribute.