Versions Compared

Key

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

...

Code Block
languagexml
titleExample
collapsetrue
<!--
 Example OP5
 NSCA Status:
 0 - OK
 1 - WARNING
 2 - CRITICAL
 3 - UNKNOWN
 -->
 ...
 <!--
 Sending occurred errors as CRITICAL (default)
 -->
 <NotificationMonitor service_name_on_error="JobScheduler Errors">
 ...
 <!--
 Sending occurred errors as WARNING
 -->
 <NotificationMonitor service_name_on_error="JobScheduler Errors" service_status_on_error="1">
 ...        

One of the following elements must be nested inside a NotificationMonitor element:

...

Code Block
languagexml
titleExample
collapsetrue
<SystemMonitorNotification system_id="OP5">   
  <Notification>       
    <NotificationMonitor service_name_on_error="Errors">
       ...     
    </NotificationMonitor> <NotificationObjects> <!-- Send the 
job chain error, occurrent <NotificationObjects>in the "test/my_jobchain"      
      <!--        
      Send the job chain error, occurrent in the "test/my_jobchain" job chain, job chain, to the "Errors" service.        
      -->        
      <JobChain name="test/my_jobchain" />     
    </NotificationObjects>   
  </Notification>
 </SystemMonitorNotification>  

...

Code Block
languagexml
titleExample
collapsetrue
<SystemMonitorNotification system_id="OP5">
  <Notification>  
    <NotificationMonitor service_name_on_error="Errors">
      ...
    </NotificationMonitor>
    <NotificationObjects>
       <!--
       Send the job chain error, occurrent in the "test/my_jobchain" job chain, to the "Errors" service.
       -->
       <JobChain name="test/my_jobchain" />
    </NotificationObjects>
  </Notification>
  
  <Notification>    
    <NotificationMonitor service_name_on_error="Performance">
      ...
    </NotificationMonitor>
    <NotificationObjects>
        </NotificationMonitor> <NotificationObjects> <!--       
       Send the performance check error, occurrent in the "test/my_jobchain" job chain, to the "Performance" service.
       Send of the performance check error to the "Performance" service will be ignored when the "test/my_jobchain" has the job chain error (default notify_on_error = false).
       -->
      <Timer name="my_timer" />
    </NotificationObjects>
  </Notification>
  
  <Timer name="my_timer">
    <JobChain name="test/my_jobchain" />
  </Timer>
 </SystemMonitorNotification> 

...

Code Block
languagexml
titleExample
collapsetrue
<SystemMonitorNotification system_id="OP5">
  ...
  <Timer name="my_timer_1">
    <JobChain name="test/my_jobchain_1" />
    <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum>
  </Timer>
  <Timer name="my_timer_2">    
    <JobChain name="test/my_jobchain_2" />
    <JobChain name="test/my_jobchain_3" />
    <Minimum><Script language="javascript"><![CDATA[500]]></Script></Minimum>
    <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum>
  </Timer>
 </SystemMonitorNotification> 

...

Code Block
languagexml
titleSystemMonitorNotification_op5OP5.xml
collapsetrue
 ...
<!--
monitor_host            The hostname or ip address of System Monitor host 
monitor_port            The TCP port that the System Monitor would listen to
monitor_encryption      Encryption algorithm
service_host            The host that executes the passive check. The name must match the corresponding setting in the System Monitor
%MON_N_SCHEDULER_ID%    See explanation "Table variables"
...
-->
<NotificationInterface monitor_host="monitor_host" monitor_port="5667" monitor_encryption="XOR" service_host="service_host"><![CDATA[
scheduler id=%MON_N_SCHEDULER_ID%, history id=%MON_N_ORDER_HISTORY_ID%, job_chain=%MON_N_JOB_CHAIN_NAME%(%MON_N_ORDER_ID%), step =%MON_N_ORDER_STEP_STATE%, error=%MON_N_ERROR_TEXT%
]]></NotificationInterface>
...

...

Code Block
languagexml
titleSystemMonitorNotification_op5OP5.xml
collapsetrue
... 
<!--
service_host               The host that executes the passive check. The name must match the corresponding setting in the System Monitor.
monitor_host               The hostname or ip address of System Monitor host.
%SERVICE_NAME%             See explanation "Service variables"
%SERVICE_STATUS%           See explanation "Service variables"
%SERVICE_MESSAGE_PREFIX%   See explanation "Service variables"
%MON_N_SCHEDULER_ID%       See explanation "Table variables"
...
NotificationCommand after substitution (error case):
<![CDATA[echo service_host:JobScheduler Errors:2:ERROR scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
 
NotificationCommand after substitution (recovery case): 
<![CDATA[echo service_host:JobScheduler Errors:0:RECOVERED scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]> 
 
NotificationCommand after substitution (success case):  
<![CDATA[echo service_host:JobScheduler Success:0:scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error= | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>  
 
-->
<NotificationMonitor service_name_on_error="JobScheduler Errors" service_name_on_success="JobScheduler Success">
  <NotificationCommand><![CDATA[echo service_host:%SERVICE_NAME%:%SERVICE_STATUS%:%SERVICE_MESSAGE_PREFIX%scheduler id=%MON_N_SCHEDULER_ID%, history id=%MON_N_ORDER_HISTORY_ID%, job_chain=%MON_N_JOB_CHAIN_NAME%(%MON_N_ORDER_ID%), step=%MON_N_ORDER_STEP_STATE%, error=%MON_N_ERROR_TEXT% | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
  </NotificationCommand>  
</NotificationMonitor>

...

...