Sunteți pe pagina 1din 10

How to get top 5 processes and attach on Alarm

message (notes)
Summary Description
This document is designed to describe how to get top 5 process from Windows or
Linux operational system when any alarm related to CPU utilization occur and
attach the output on alarm notes.
This can be useful if you need to improve monitoring capability creating automation
level on the event management process adding value to operators and event
escalation.

Software required
Operational System Compatibility

Windows 2008 / 2012 32bit or 64bit

Unix / Linux 32bit - 64 bit

Software

Nimbus robot 7.61 or later must be installed on the target server where the
top cpu will be collected.

Probes (all probes below must be running on target server)

Nexec v1.35 or later

CDM v5.21 or later

Other considerations
All config (.cfg) files and scripts mentioned on this document will be attached on the
last section called attachments. Please go to the last page and use it in order to
keep all configuration steps easier.

Configuration
To configure this feature you will need to perform the 4 steps below

Step 1 Create a LUA script (script attached)

Step 2 Configure nexec probe ( .cfg attached)

Step 3 Create auto operator (AO) profile

Step 4 - Perform a LAB test

Step 1 Create a LUA script


This is an example of a LUA script to run a profile on nexec probe via
callback (this full is script is attached on attachment section)
The LUA script is appropriate to extract information from alarms and construct a
path to call back probe in context. Variables are crated to put this script running in
any situation, the only static information you should check and is related to the
nexec probes is the profile name (get_top_process).

Step 2 Configure and test nexec probe (the .cfg for Linux and
windows are on attachments section)

After deploy nexec probe on each robot, please configure using follow information
Linux only (please, see attached .cfg files for Linux and Windows.

Active:
Name: get_top_process
Command: ps
Argument: -Ao user,uid,comm,pid,pcpu,tty --sort=-pcpu | head -n 6
ACL required: Available to all

Now run the test and check if top 5 process are showing on Stdout window.

Step 3 Create auto operator (AO) profile

Step 4 Perform a LAB test

For tests purpose, please change the threshold for Low alarm to 1% and it should
generate an alarm information alarm. This information alarm will trigger the AO
profile and run the script.

Check the results on UMP > USM > Alarm page. You should have an alarm message
about high CPU utilization and clicking on notes, you should see two sample of top
5 processes.

Attachments

LUA Script to callback nexec probe and run get_top_process profile

LUA_Script_get_top_p
rocesses_on_alarm_cpu_and_attach_to_notes.rtf

Nexec config probe for Windows (S.O)

nexec_Windows_top_
5_process.cfx

Nexec config probe for Linux (S.O)

nexec_Linux_top_5_pr
ocess.cfx

Document created by:


Robson Almeida
robson.almeida@ca.com
CA Technologies

Sr Consultant, Technical Sales

March, 17th , 2015

S-ar putea să vă placă și