Sybase 12.5.1 User Manual page 66

Historical server
Table of Contents

Advertisement

hs_create_alarm
Examples
Usage
52
If alarm_action is
execute
alarm_value
triggering value for the alarm.
1
This example creates an alarm for a view named Page I/O. The view
contains the Page I/O data item with a Value for Session statistic type.
The data is logged to the page_io_alarm_file file when a trigger value
of 50 or greater is achieved.
hs_create_alarm PageIO,"Page I/O",
"Value for Session",log,page_io_alarm_file,50
2
This example creates an alarm for a view named Page I/O. This alarm
causes the /user/script1 script to be executed and passed the value 100
as its first parameter when a trigger value of 100 or greater is achieved
on the Page I/O data item.
hs_create_alarm PageIO,"Page I/O",
"Value for Session",execute,
"/user/script1 100",100
If alarm_action is
script or program executes in the background. The commands within
the script or program are executed in the foreground and displayed if
applicable.
For example, if you want the clock to display in an alarm condition,
you should put clock.exe into a script file and specify the script file
name when creating the alarm, rather than specifying clock.exe when
creating the alarm.
Then alarm_action_data is
Name of the file to execute, optionally followed by
a list of parameters separated by spaces. The file
must exist and the user who started Historical
Server must have execute permission for it.
When an alarm condition occurs and
Warning!
alarm_action
is
execute
executed by the account that started Historical
Server, not by the account that created the alarm.
This means that the access privileges of the person
who starts Historical Server are available to the
users who define alarms. A user who normally
cannot execute a file may be able to execute it
through an Historical Server alarm.
, when the alarm condition occurs, the
execute
, the specified file is
Historical Server

Advertisement

Table of Contents
loading

Table of Contents