Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleSample NotificationCommand Unix. Script file.
#! /bin/sh 
# notification command has set the environment variables for this script:
# $SCHEDULER_MON_SERVICE_NAME               value of Attribute "service_name_on_error" or "service_name_on_success"
# $SCHEDULER_MON_SERVICE_STATUS             value of Attribute "service_status_on_error" or "service_status_on_success"
# $SCHEDULER_MON_SERVICE_MESSAGE_PREFIX	    ERROR       if error occured                                     
#                                            RECOVERED   if error recovered                                     
 #                                           TIMER       if performance check
# $SCHEDULER_MON_TABLE_FIELD_<field name>   table field name of result row for message string(see table definition SCHEDULER_MON_NOTIFICATIONS)
 #                                           e.g.: $SCHEDULER_MON_TABLE_FIELD_ID, $SCHEDULER_MON_TABLE_FIELD_TASK_ID etc.
echo $JAVA_HOME $SCHEDULER_MON_SERVICE_NAME:$SCHEDULER_MON_SERVICE_STATUS:$SCHEDULER_MON_SERVICE_MESSAGE_PREFIX history id = $SCHEDULER_MON_TABLE_FIELD_ORDER_HISTORY_ID > /tmp/command_output.txt
 

...