Вы находитесь на странице: 1из 2

$PingNode Object Template Usage

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind.

Updated: Sept 24th, 2008

Summary
This object when enabled will ping the configured node every 10 seconds by default and report general status and reply time. It is configured to alarm in the case of a ping timeout.

Configuration Details
Download and import the $PingNode.aaPKG file into the galaxy via the IDE from: <\\Server9\Support\Non public apps, patches & literature\Application Server\PingNode> Attributes: PingNode - the configured node or IP address to ping PingNodeEnable - enables the ping script PingReplyTime - round trip time in ms PingResult - string containing the ping result (e.g. Success, Timeout) PingStatus - boolean flag indicating node status How to use: Make an instance of the $PingNode template and assign it to the appropriate area. When naming the instance it is recommended to use the node name as part of the instance name (so node name is indicated in the alarm display). Next, set the PingNode inherited UDA to the nodename or IP address desired. The PingNodeEnable needs to be configured as true either during development or runtime for the ping script to run. If the ping frequency needs to be changed, modify the freqency of the inherited 'Ping' script. There is also a graphical status display included with each PingNode instance created which can be used in Windowmaker:

Template Customization
The $PingNode template can be customized to provide additional features. Specifically, the Ping script within the object template can be modified. Below is an analysis of the script and the functions it provides:

dim Input as string; Input = me.PingNode; Prepare a local variable to contain the value of the target node name dim PingTest as System.Net.NetworkInformation.Ping; Declare an instance of the system.net.networkinformation.ping class called PingTest dim PingReply as System.Net.NetworkInformation.PingReply; Declare an instance of the system.net.networkinformation.pingreply class to contain the returned results of the ping PingTest = new System.Net.NetworkInformation.Ping; Initialize PingTest instance PingReply = PingTest.Send(Input); Perform the ping and return results to the PingReply instance if PingReply.Status == "Success" then me.PingStatus = true; else me.PingStatus = false; endif; Set the Boolean status of the PingStatus UDA which is used for alarming me.PingReplyTime = PingReply.RoundTripTime; me.PingResult = PingReply.Status; Set the PingReplyTime (latency) and test Status UDAs

Mark B.

Вам также может понравиться