KBI 220230 Performance Data For Argent Predictor With Unix Rules

Version

All

Date

19 Jul 2002

Summary

This KBI article explains how to configure the Unix Rules to retrieve performance data

to be used for reporting in the Argent Predictor.

Technical Background

The Unix Rules can be used to monitor the status of a threshold, or to collect data to be used in the Argent Predictor.

Running any scripts in the Unix Rule templates requires that you use the integrated XML format.

XML Elements are declared at the beginning of each Unix rule.

If the Unix script is designed to gather performance metrics for the Argent Predictor, then the value between the tags within the block should be set to [performance].

The script should be written so that the output contains the following block in the output:

performance

$OBJECT

$COUNTER

$INSTANCE

$METRIC

HERE IS A SAMPLE SCRIPT

——————- SCRIPT START HERE ————————-

#!/bin/sh

#

#

# total_cpu_usage.txt 6.1

#

# 10/04/01 (c) ArgSoft Intellectual Properties Limited

#

#

# Summary:

#

# This Rule uses ps to find if over 90% of the processor power is used.

#

#

#

# Pass (0):

#

#

#

# Fail (1):

#

#

#

#

# For more information, email Unix@Argent.com

#

#

#

STATUS=NOVAL

SUMMARY=NOVAL

COMMENT=NOVAL

OBJECT=NOVAL

COUNTER=NOVAL

INSTANCE=NOVAL

METRIC=NOVAL

#

# xmlOut prints an entire XML output for a command script.

#

xmlOut()

{

cat <

]>

$STATUS

$SUMMARY

performance

$OBJECT

$COUNTER

$INSTANCE

$METRIC

!

}

EXIT_CODE=0

STATUS=good

SUMMARY=”Sample Predictor script”

COMMENT=”Sample Predictor script”

OBJECT=”Sample Unix Object”

COUNTER=”Sample Unix Counter”

INSTANCE=”Sample Unix Instance”

METRIC=”1.0″

xmlOut

exit $EXIT_CODE

——————- SCRIPT END HERE ————————-

After you run it, The Argent Predictor data [Sample Unix Object].[Sample Unix

Counter] (Sample Unix Instance) will be shown for the Unix machine.

Resolution

N/A.