Creating a threshold

You can create a threshold to determine under what conditions a Scheduler task or sensor is run.

Before you begin

You must be connected to the sysadmin database as user informix or another authorized user.

A threshold specifies a value that can be compared to a current value to determine whether a task or sensor must be run.

About this task

To create a threshold:

Procedure

  1. Use an INSERT statement to add values for the following columns in the ph_threshold table:
    • name: the name of the threshold
    • task_name: the name of the task from the ph_task table
    • value: the value of the threshold
    • value_type: the data type of the threshold (STRING or NUMERIC)
    • description: a description of what the threshold does
  2. Write the task or sensor action to use the threshold.

Example

The following example adds a threshold named IDLE TIMEOUT for a task named Idle_timeout:
INSERT INTO ph_threshold 
(
name,
task_name,
value,
value_type,
description
)
VALUES
(
"IDLE TIMEOUT",
"Idle_timeout",
"60",
"NUMERIC",
"Maximum amount of time in minutes for non-informix users to be idle."
);
The task action subtracts the time of the last user action from the current time and compare that value with the value column in the ph_threshold table.