Versions Compared

Key

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

...

Code Block
languagehtml/xml
<?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 count send operations for sending error/recovered 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 count send operations for sending performance notifications 
                    
                    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>

Explanation

  • SystemMonitorNotification can contain several Notification definitions for notification of error or success conditions
    • Notification contain one NotificationMonitor
      • NotificationMonitor has the following attributes
        • service_name_on_error (optional) - Service name to send of error/recovery messages
        • service_name_on_success (optional) - Service name to send of success messages if order is successfully completed
        • service_status_on_error (optional) - Service status (e.g. CRITICAL or WARNING) to send of error messages. If not set - CRITICAL will be sended
        • service_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 elements
        • NotificationCommand command line for calling of the extern script for system notification
        • NotificationInterface calling API for system notification (currently for NSCA notifications). This Element has the following attributes
          • service_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 notifications
          • monitor_host (required) - hostname of System Monitor
          • monitor_encryption (required) - specifies that the communication with the System Monitor is encrypted. NONE, XOR, TRIPLE_DES encryptions are available.

For this concrete example and following the description from above (about the schema):

...