...
Notification View
The Notification View allows to manage the configuration to be managed:
Explanation:
- If this view shows an empty configuration then the "New" button can be used to created a configuration.
- Alternatively, a configuration can be added with the "Upload" button. A configuration sample is available from the
jetty_base/resources/xsd/notifications/notification.xml-example
file.
...
Structure and Elements
The configuration make makes use of the following base elements that , which are available from the Configurations root element.
- Fragments: Define re-usable configuration blocks for Messages, Monitors and monitored Objects.
- MessageFragments
- Message
- Defines the content that which is sent e.g. , for example, by mail to a user or that which is used to parameterize a command line utility, e.g. for forwarding such as content to be forwarded to a System Monitor.
- Messages for use with E-Mail represent the mail body, either for use with plain text e-mails or for use with HTML e-mails.
- Messages for use with the Command Line represent a string that can be used with the Notifications/Notification/NotificationMonitors/CommandFragmentRef element, see below.
- Message elements can include Monitor Variables that are placeholders for values, e.g. for the Workflow Path, Order ID etc.
- Any number of Message elements can be added.
- MonitorFragments. Such These fragments come in a number of flavors for the following notifcation types.
- MailFragment
- The following elements are required to send mail:
- MessageRef: Specifies the reference to a Message element that provides the mail body.
- Subject: Specifies the mail subject that and can include Monitor Variables.
- To: Specifies the e-mail address of the recipient. Multiple recipients can be separated by comma.
- The following elements are optional to send mail:
- CC: The recipient of carbon copies. Multiple recipients can be separated by comma.
- BCC: The recipient of blind carbon copies. Multiple recipients can be separated by comma.
- From: The e-mail address of the account that is used to send mail. Consider that it depends on your mail server configuration if determines whether a specific account has to be used or if an arbitrary account can or an arbitrary account can be used.
- For details see JS7 - Notifications - Configuration Element MailFragment
- CommandFragment
- MessageRef: Specifies the reference to a Message element that which provides the content that should is to be forwarded with the Command element. The message content is available from the
${MESSAGE}
Monitor Variable for use with later elements. - Command: Specifies the shell command for Linux/Windows that which is used to forward notifications, e.g. , to, for example, a System Monitor Agent utility.
- The above example notification view example above makes use of a shell command like this:
echo "${MESSAGE}" >> /tmp/notification.log
- The
echo
shell command appends the content of the ${MESSAGE}
Monitor Variable to a file in the /tmp
directory.
- For details see JS7 - Notifications - Configuration Element CommandFragment
- JMSFragment
- NSCAFragment
- This fragment type is used for direct connections to System Monitors that operate a Nagios-compatible NSCA service for passive checks such as Nagios®, Icinga®, Opsview®. This fragment type makes use of the JSend NSCA Java API.
- The required connection attributes such as host, port, timeouts are specific for to the respective System Monitor being used.
- Consider Note that JSend NSCA can be used without encryption or with an XOR or TRIPLE_DES encryption. Additional encryption schemes are not supported.
- For details see JS7 - Notifications - Configuration Element NSCAFragment
- ObjectFragments
- Workflows: Any umber of workflow configurations can be added and are distinguished by a unique name that is added to this element.
- Workflow: A specific workflow can be specified , e.g. by by, for example, its name. The path attribute allows a regular expression to specify a part of the workflow path.
- WorkflowJob: This element can be used to limit notifications to specific jobs in a workflow.
- This includes to optionally specify the option of specifing the job name and/or its label.
- When using this element then it is required to specify the criticality that It is necessary that the criticality, which can be one of ALL, NORMAL , CRITICALor CRITICAL, is specified when using this element.
- Optionally the The return_code_from and return_code_to attributes can be optionally used to further limit notifications to jobs that which complete with the given return code. For The return code for shell jobs the return code corresponds to the OS exit code.
- Notifications: Define the effective notifications by references to the above Fragments elements described above.
- Notification: Any number of notifications can be added and are with each norification being distinguished by a unique name. A notification is assigned a type that is which can be any one of SUCCESS, WARNING and or ERROR. This allows to specify notifications that which are used e.g. in case , for example, in the event of job errors and warnings . And this allows to specify notifications in case of to be specified. This also allows notifications to be specified for successful workflow execution. Consider Note that successful executions include execution includes both the absence of job errors and optionally the presence of job warnings.
- NotificationMonitors: Selects one or more of the above MonitorFragments. It is possible to select multiple fragments of the same fragment type.
- CommandFragmentRef: Selects the CommandFragment to be used.
- MessageRef: Selects the Message element to be used with the Command.
- MailFragmentRef: Selects the MailFragment to be used in order to send notifications by mail. If multiple MailFragment elements are referenced then different types of mail, e.g. for different recipients or with different content and layout of the mail body can be used.
- NSCAFragmentRef: Selects the NSCAFragment to be used for direct integration with a NSCA compatible System Monitor.
- JMSFragmentRef: Selects the JMSFragment to be used to send notifications to a Java Message Queue compatible product.
- NotificationObjects: Selects the workflows for which notifications are created for.
- WorkflowRef: Selects a Workflows element that limits notifications to the their respective workflows. Any number of workflow references can be added.
...
- Syntax
- All variables have to be used with the following syntax, independently from of the operating system in use:
${VARIABLE_NAME}
- Scope
- The Message element can include Monitor Variables: users can select the variable names from the below list of variables and use for example
${MON_N_CREATED}
. - The Command elements can include Operating System Variables: users have to prefix variable names from the below list with
JS7_
to use for example ${JS7_MON_N_CREATED}
.
...
Expand |
---|
title | List of Order Variables |
---|
|
Expand |
---|
title | Sample data: Names and Positions |
---|
| MON_O_HISTORY_ID | MON_O_NAME | MON_O_WORKFLOW_POSITION | MON_O_START_WORKFLOW_POSITION | MON_O_END_WORKFLOW_POSITION | MON_O_PARENT_ID | MON_O_MAIN_PARENT_ID |
---|
318207 | #2021-07-23#T7052187293-Test0000000070 | 0 | 0 | 2 | 0 | 318207 | 320121 | branch1 | 1/branch1:0 | 1 | 1/fork+branch1:2 | 318207 | 318207 | 320122 | branch2 | 1/branch2:0 | 1 | 1/fork+branch2:2 | 318207 | 318207 | 321560 | branch2b | 1/fork+branch2:1/branch2b:0 | 1/fork+branch2:1 | 1/fork+branch2:1/fork+branch2b:0 | 320122 | 318207 | 321561 | branch2c | 1/fork+branch2:1/branch2c:0 | 1/fork+branch2:1 | 1/fork+branch2:1/fork+branch2c:0 | 320122 | 318207 | 321682 | branch1b | 1/fork+branch1:1/branch1b:0 | 1/fork+branch1:1 | 1/fork+branch1:1/fork+branch1b:0 | 320121 | 318207 | 321683 | branch1c | 1/fork+branch1:1/branch1c:0 | 1/fork+branch1:1 | 1/fork+branch1:1/fork+branch1c:0 | 320121 | 318207 |
|
Name | Description | Note |
---|
MON_O_HISTORY_ID | The Order History ID (unique identifier). |
| MON_O_CONTROLLER_ID
| The JS7 Controller ID. |
| MON_O_ORDER_ID | The Order ID (unique identifier). |
| MON_O_WORKFLOW_VERSION_ID | The version identifier of the workflow. |
| MON_O_WORKFLOW_POSITION | The order's current position in the workflow. |
| MON_O_WORKFLOW_PATH | The inventory path of the workflow that the order is executed for. |
| MON_O_WORKFLOW_FOLDER | The parent folder of a workflow in the inventory. |
| MON_O_WORKFLOW_NAME | The identifier of the workflow that the order is executed for. |
| MON_O_WORKFLOW_TITLE | The title of the workflow that the order is executed for. |
| MON_O_HAS_CHILDREN | The Boolean value true or false indicates that the current order is a parent order with forked child orders. |
| MON_O_MAIN_PARENT_ID | If the current order is a nested child order then this identifier points to the monitoring identifier of the main parent order. |
| MON_O_PARENT_ID | If the current order is a child order then this identifier points to the monitoring identifier of the direct parent order. | Consider Note that child orders can be nested. | MON_O_PARENT_ORDER_ID | The Order ID of the parent order if the current order is a child order. |
| MON_O_NAME | The Order ID of the current order if this is a main order. If the current order is a child order then the branch name of the child order is returned. |
| MON_O_SEVERITY | The Order History status. | SUCCESSFUL, FAILED, INCOMPLETE | MON_O_STATE | The current order state, see JS7 - Order State Transitions |
| MON_O_STATE_TIME | The point in time when the order transitioned to its current state. |
| MON_O_CURRENT_HOS_ID | The monitoring identifier of the current order step. |
| MON_O_START_CAUSE | The reason for the start of an order. | ORDER, FORK | MON_O_START_TIME_SCHEDULED | The point in time that the order was scheduled for. |
| MON_O_START_TIME | The timestamp when the order started. |
| MON_O_START_WORKFLOW_POSITION | For a main order the position in the workflow that the order was started for is returned. For a child order the workflow position related to its branch is returned. |
| MON_O_START_VARIABLES |
|
| MON_O_END_TIME | The timestamp for the end of order execution. | Consider case the event of job errors, an order might | be have halted in a failed state and | does not provide without providing an end time as the order did not completely execute the workflow. | MON_O_TIME_ELAPSED | The difference in seconds between the end time and the start time of order execution. |
| MON_O_END_WORKFLOW_POSITION | For a main order the last position in the workflow is returned. For a child order the last position of its branch is returned. |
| MON_O_END_HOS_ID |
|
| MON_O_ERROR | The Boolean value true or false that indicates if an error has occurred for the current order. |
| MON_O_ERROR_CODE | A JS7 error code in case that a known error | occurshas occurred. |
| MON_O_ERROR_REASON | A predefined reason that indicates the cause of an error, e.g. FAILED . | DISRUPTED, FAILED, TIMEDOUT | MON_O_ERROR_RETURN_CODE | In case of errors for shell jobs the operating system exit code is returned. For JITL jobs and for JVM jobs the return code optionally is implemented by the respective Java class. |
| MON_O_ERROR_STATE |
|
| MON_O_ERROR_TEXT | The error message in | case that occurredoccurring. |
| MON_O_LOG_ID | The database identifier of the order log. |
| MON_O_CREATED | The timestamp that the order monitoring entry | is has been added. |
| MON_O_MODIFIED | The timestamp that the order monitoring entry has been modified. |
|
|
Order Step Variables
The following variables are available from order steps, e.g. from jobs executed with a workflow and can be used with Message elements and with Command elements.
Expand |
---|
title | List of Order Step Variables |
---|
|
Name | Description | Note |
---|
MON_OS_HISTORY_ID | The Order History identifier for the current order step. |
| MON_OS_WORKFLOW_POSITION | The textual position indicator of the order step in the workflow including the branch identifier. |
| MON_OS_HO_MAIN_PARENT_ID | For a main order the monitoring identifier is returned. For a child the Order History identifier of the main order is returned. |
| MON_OS_HO_ID | The Order History identifier of the current order. |
| MON_OS_POSITION | The numeric position index of the order step in an instruction block within the workflow, e.g. within a Fork Instruction or Lock Instruction. |
| MON_OS_JOB_NAME | The name of the job that the order is executing. |
| MON_OS_JOB_TITLE | The title of the job that the order is executing. |
| MON_OS_JOB_LABEL | The unique label of the job instruction in the workflow. | The label is unique for each occurrence of a job in a workflow. | MON_OS_JOB_CRITICALITY | The criticality as defined with the job. | NORMAL, CRITICAL | MON_OS_AGENT_ID | The unique identifier of an Agent that is specified when registering an Agent. |
| MON_OS_AGENT_URI | The URI of the Agent that executes the current job. |
| MON_OS_SEVERITY | The Order History status of the current order step. | SUCCESSFUL, FAILED, INCOMPLETE | MON_OS_START_CAUSE | The cause for the start of the order step. | ORDER, FORK | MON_OS_START_TIME | The timestamp for the start of execution in the current order step. |
| MON_OS_START_VARIABLES | The list of order variables before execution of the current workflow instruction. |
| MON_OS_END_TIME | The timestamp for the end of execution of the current workflow instruction. |
| MON_OS_END_VARIABLES | The list of resulting order variables resulting after execution of the current workflow instruction. |
| MON_OS_TIME_ELAPSED | The difference in seconds between the end time and the star time of execution of the current order step. |
| MON_OS_ERROR | The Boolean value true or false that indicates if an error occurred with the current workflow instruction. |
| MON_OS_ERROR_CODE | A JS7 error code in case that the event of a known error occursoccuring. |
| MON_OS_ERROR_REASON | A predefined reason that indicates the cause of error, e.g. FAILED . | DISRUPTED, FAILED, TIMEDOUT | MON_OS_ERROR_STATE | The order state for the current order step caused by the error, e.g. FAILED , BROKEN . |
| MON_OS_ERROR_TEXT | The error message in case that the event of an error occurred with occurring in the current order step. |
| MON_OS_RETURN_CODE | For shell jobs, the operating system exit code is returned. For JITL jobs and for JVM jobs, the return code optionally is implemented by the respective relevant Java class. |
| MON_OS_WARN | The indicator for the type of warning, e.g. WARN_IF_SHORTER . | NONE, WARN_IF_SHORTER, WARN_IF_LONGER | MON_OS_WARN_TEXT | The warning message in case that the event of a warning occurredoccurring. |
| MON_OS_LOG_ID | The identifier of the task log. |
| MON_OS_CREATED | The timestamp that the monitoring entry is has been added. |
| MON_OS_MODIFIED | The timestamp that the monitoring entry is entry has been modified. | |
|
JOC Cockpit Variables
...