Adding a new sensor

  1. From the Task Schedule page, click Add a New Task.
  2. Click Sensor under What type of task would you like to add? and then click Next.
  3. Enter a name in the Sensor Name field. For example: MySensor.
  4. Select a category from the Sensor Group list.
  5. Add a description of the new task in the text field and click Next.
  6. Specify the allowable time frame in which the sensor can run, such as between 10:00 a.m. and 6:00 p.m., every hour, each day.
    1. Specify the start time of the time interval, using the 24-hour clock format: hh:mm:ss. For example: 10:00:00
    2. Specify the stop time of the time interval, using the 24-hour clock format: hh:mm:ss. For example: 18:00:00
    3. Specify the frequency for how often the task can run during the allowable time interval, in days, hours, and minutes: d Days h Hours m Minutes. For example: 0 Days 1 Hours 00 Minutes.
    4. Specify the data delete time, in days, hours, and minutes: d Days h Hours m Minutes. For example: 1 Days 0 Hours 0 Minutes.
  7. Click Next.
  8. In the Result Table Name field, specify the name of the result table to hold the sensor data. For example: MyResults
  9. Click Next.
  10. Complete the SQL statement for the results table by entering the column names and definitions in the SQL Statement field. For example, if you want to collect the return code of taskA (with task_id 10) in table TaskA_ReturnCode, you could enter the following SQL statement:
    create table TaskA_ReturnCode(task_name varchar(20), errorcode integer)
  11. Specify the command statement that the sensor is to run. For example:
    insert into TaskA_ReturnCode 
        values('TaskA', (select run_retcode from ph_run where run_task_id=10))
  12. Verify the entries for each selection.
    • If the entries are correct, click Finish confirm and create the sensor.
    • Click Back to return to the previous pages to update any incorrect values.

Copyright© 2018 HCL Technologies Limited