How to list Management Module alerts which are specifically using an action.
search cancel

How to list Management Module alerts which are specifically using an action.

book

Article ID: 39837

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

Question:

You can use the Command Line Workstation to list all alerts and their respective management modules like this :

list alerts matching (.*) in management modules matching Sample

You can also do the same for actions :

list actions matching (.*) in management modules matching Sample

However there is no way to specifically list which alerts are using an action.

We have thousands of alerts & thus have to go through all of them to check which ones use specific actions.

 

Answer:

This Unix/Linux script uses xmllint on each Management Module jar file (em_home/config/modules) to parse out any AlertBase node that has a sub-node of ActionID from the ManagementModule.xml file inside the jar file.

Just create the script in a work directory with em_home set to your EM install directory

*****************************************************************

em_home=<your EM HOME>

modules_home=$em_home"/config/modules"

for i in $modules_home/*.jar

do

cp $i .

jar xvf $i ManagementModule.xml

echo *.jar >> alert_actions.out

echo "===============================" >> alert_actions.out

echo 'cat /ManagementModule/DataGroups/DataGroup/AlertBase' | xmllint --shell  ManagementModule.xml|sed ':a;N;$!ba;s/\n/ /g' | sed 's/\-\-\-\-\-\-\-/\n/g' | grep ActionID | awk -F '[<>]' '{print "======="} {print "Alert Name =", $5} {print  "Alert Action Name = ",$41}'  >> alert_actions.out

echo '** End of this MM **' >> alert_actions.out

echo "" >> alert_actions.out

rm -f ManagementModule.xml

rm -f *.jar

done

 

*****************************************************************

The alert_actions.out file contains the output list. Below is example output with OOTB Management Modules where only the Sample Management Module has any alerts which use actions.

*****************************************************************

ADA-APM_ManagementModule.jar

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

** End of this MM **

 

BtStats_ManagementModule.jar

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

** End of this MM **

 

ChangeDetectorManagementModule.jar

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

** End of this MM **

 

New_Management_Module.jar

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

** End of this MM **

 

SampleManagementModule.jar

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

=======

Alert Name = CPU Heuristic

Alert Action Name =  Console Notification Action

=======

Alert Name = Console Summary Alert

Alert Action Name =  Console Notification Action

** End of this MM **

 

SPM_ManagementModule.jar

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

** End of this MM **

 

TriageMapConfigurationsManagementModule.jar

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

** End of this MM **

*****************************************************************

 

Additional Information:

Script and example output attached here:

list_alert_actions

alert_actions.out

Environment

Release: CEMUGD00200-9.7-Introscope to CA Application-Performance Management-Upgrade Main
Component:

Attachments

1558534413812TEC1996932.zip get_app