14.12.2012 Views

Optivity Telephony Manager: System Administration - BT Business

Optivity Telephony Manager: System Administration - BT Business

Optivity Telephony Manager: System Administration - BT Business

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

616 Alarm management<br />

Rules<br />

Rules allow you to define actions that may be applied to a given event. Rules may only<br />

be defined in scripts. By default, rules are examined in a top-down manner. You may<br />

use an infer statement to explicitly specify the order in which rules are examined.<br />

A rule consists of an if statement containing a logical expression, followed by an<br />

instruction. A rule may also include an else statement, which is only executed if the<br />

logical expression in the if statement is false. Within a rule, a send statement or a<br />

function may be called. New variables may not be defined within the scope of a rule.<br />

Example:<br />

rule check_Meridian1_critical {<br />

if($CurrentTrapDevice="Meridian1" and<br />

$NormalizedSeverity=Critical) {<br />

// print event to console<br />

send( con,<br />

"--> Critical Meridian1 alarm received! ",<br />

$ErrorCode," - " , // M1 error code<br />

$CurrentPCTime, " - ", // Time that PC<br />

received the alarm<br />

$CurrentTrapSource," - " , // Name of this M1<br />

$DeviceTime," - " , // Timestamp from M1<br />

$Text," - ", // Text with error<br />

message<br />

$OperatorData // More text with error<br />

message<br />

);<br />

}<br />

else{<br />

// append event to log file<br />

send(sample_file,"--> Critical alarm received! ",<br />

$ErrorCode," - " , // Error code<br />

$CurrentPCTime, " - ", // Time that PC<br />

received the alarm<br />

$CurrentTrapSource," - " , // Name of this device<br />

$DeviceTime," - " , // Timestamp<br />

$Text," - ", // Text with error<br />

message<br />

$OperatorData // More text with error<br />

message<br />

);<br />

}<br />

}<br />

The preceding script defines the rule check_Meridian1_critical, which sends critical<br />

Meridian 1 alarms to the console and appends other events to the log file sample_file.<br />

553-3001-330 Standard 3.00 August 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!