...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="utf-8"?>
<SystemMonitorNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SystemMonitorNotification_v1.0.xsd">
<Notification>
<!--
configure system monitor service name and command for send notification to OP5 system monitor using nsca client
notification command substitution in this case:
All Environment variables e.g. %TEMP% or %JAVA_HOME%
%SERVICE_NAME% Error Service (service_name_on_error)
%SERVICE_STATUS% 1 if error occured (service_status_on_error)
0 if error recovered (service_status_on_success)
%SERVICE_MESSAGE_PREFIX% ERROR if error occured
RECOVERED if error recovered
TIMER if performance check
%ORDER_HISTORY_ID% ... table field name of result row for building message (see table definition SCHEDULER_MON_NOTIFICATIONS)
-->
<NotificationMonitor service_name_on_error="Error Service" service_status_on_error="1" service_status_on_success="0">
<NotificationCommand>
<![CDATA[cmd /c echo my_nsca_service_host:%SERVICE_NAME%:%SERVICE_STATUS%:%SERVICE_MESSAGE_PREFIX%history id=%ORDER_HISTORY_ID%, step =%ORDER_STEP_STATE%, error=%ERROR_TEXT%, check = %CHECK_TEXT% | C:\nsca\send_nsca.exe -H nsca_server_host -c C:\nsca\send_nsca.cfg -d : ]]>
</NotificationCommand>
</NotificationMonitor>
<NotificationObject>
<!--
configure job chains and number of send operations for same problem (if problem is recovered or acknowledged no error notifications will be sended) for sending error notifications
requirement: monitoring of this job chains must be configured in CheckHistoryConfiguration.xml
-->
<JobChains>
<JobChain notifications="10" name="samples/sample_jobChain_1"/>
<JobChain notifications="10" name="samples/sample_jobChain_2"/>
</JobChains>
<Timers>
<Timer>
<!--
configure job chains and number of send operations to same check
requirement: timer check for this job chain must be configured in CheckHistoryConfiguration.xml
-->
<JobChains>
<JobChain notifications="1" name="samples/sample_jobChain_1"/>
</JobChains>
</Timer>
</Timers>
</NotificationObject>
</Notification>
</SystemMonitorNotification>
|
...
SystemMonitorNotification
can contain severalNotification
definitions for notification of error or success conditionsNotification
(required) contain one NotificationMonitorNotificationMonitor
(required) contains the configuration for delivery notifications to System Monitor and has the following attributesservice_name_on_error
(optional) - Service name to send of error/recovery messages. One of service_name_on_error or service_name_on_success must be set.service_name_on_success
(optional) - Service name to send of success messages if order is successfully completed. One of service_name_on_error or service_name_on_success must be set.service_status_on_error
(optional) - Service status (e.g. CRITICAL or WARNING) to send of error messages. If not set - CRITICAL will be sendedservice_status_on_success
(optional) - Service status (e.g. SUCCESS) to send of success messages. If not set - OK will be sended
NotificationMonitor
can has one of the following elementsNotificationCommand
(optional) command line for calling of the extern script for system notificationNotificationInterface
(optional) calling API for system notification (currently for NSCA notifications). This Element has the following attributesservice_host
(required) - hostname for the host the notification are sent from (the way it is named at the System Monitor)monitor_port
(required) - port of System Monitor to receive notificationsmonitor_host
(required) - hostname of System Monitormonitor_encryption
(required) - specifies that the communication with the System Monitor is encrypted. NONE, XOR, TRIPLE_DES encryptions are available.
NotificationObject
(required) contains the configuration of objects, which will be sended to System MonitorJobChains
(optional) - can contain severalJobChain
definitionsJobChain
(required) has the following attributesnotifications
(optional) - Number of notifications for the same problem (if problem is recovered or acknowledged - no notification will be sended). By default - 1scheduler_id
(optional) - JobScheduler instance with the given identification. By default - JobChain will be checked in all JobScheduler instances that logged into the same databasename
(optional) - Job chain name including possible folder names. By default - all JobChains for defined scheduler_id are checkedstep_from
(optional) - Start Job node name for checkingstep_to
(optional) - End Job node name for checking
Jobs
(optional) can contain severalJob
definitionsJob
(required) has the following attributesscheduler_id
(optional) - JobScheduler instance with the given identification. By default - Job will be checked in all JobScheduler instances that logged into the same databasename
(optional) - Job name including possible folder names. By default - all Jobs for defined scheduler_id are checked
Timers
(optional) - can contain severalTimer
definitionsTimer
(required) has the following elementsJobChains
(optional) - can contain severalJobChain
definitions for performance notificationJobChain
(required) has the following attributesnotifications
(optional) - Number of notifications for the same check. By default - 1scheduler_id
(optional) - JobScheduler instance with the given identification. By default - JobChain will be checked in all JobScheduler instances that logged into the same databasename
(optional) - Job chain name including possible folder names. By default - all JobChains for defined scheduler_id are checkedstep_from
(optional) - Start Job node name for checkingstep_to
(optional) - End Job node name for checking
Jobs
(optional) can contain severalJob
definitions for performance notificationJob
(required) has the following attributesscheduler_id
(optional) - JobScheduler instance with the given identification. By default - Job will be checked in all JobScheduler instances that logged into the same databasename
(optional) - Job name including possible folder names. By default - all Jobs for defined scheduler_id are checked
Sample Notification configuration using NotificationInterface
<!--Code Block language html/xml .... <!-- notification message substitution in this case: All Environment variables e.g. %TEMP% or %JAVA_HOME% %ORDER_HISTORY_ID% ... table field name of result row for building message (see table definition SCHEDULER_MON_NOTIFICATIONS) --> <NotificationMonitor service_name_on_error="Error Service"> <NotificationInterface service_host="my_nsca_service_host" monitor_port="5667" monitor_host="nsca_server_host" monitor_encryption="XOR"> order history id=%ORDER_HISTORY_ID%, job chain=%JOB_CHAIN_NAME%, order id=%ORDER_ID%, step =%ORDER_STEP_STATE%, error=%ERROR_TEXT%, check = %CHECK_TEXT% </NotificationInterface> ...
For this concrete example and following the description from above (about the schema):
...