...
Code Block |
---|
language | xml |
---|
title | SystemMonitorNotification_op5OP5.xml |
---|
collapse | true |
---|
|
...
<!--
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>
... |
...
The following is an except from an XML file used to notifying a specific System Monitor (op5 Monitor) via the NotificationCommand on Windows:
Code Block |
---|
language | xml |
---|
title | SystemMonitorNotification_OP5.xml |
---|
collapse | true |
---|
|
...
<!--
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 Monitoring 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 Monitoring 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 Monitoring Success:0:SUCCESS 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 Monitoring Errors"
service_name_on_success="JobScheduler Monitoring Success"
service_status_on_error="2"
service_status_on_success="0">
<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>
... |
NotificationCommand ( Nagios / Opsview )
The following is an except from an XML file used to notifying a specific System Monitor (Opsview Monitor) via the NotificationCommand on Unix:
Code Block |
---|
language | xml |
---|
title | SystemMonitorNotification_OPSVIEW.xml |
---|
collapse | true |
---|
|
...
<!--
service_host The host that executes the passive check. The name must match the corresponding setting in the System Monitor. e.g- localhost
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 -e "localhost\tJobScheduler Monitoring Errors\t2\tERROR scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred\n" | /usr/local/nagios/bin/send_nsca -H monitor_host -c /usr/local/nagios/etc/send_nsca.cfg]]>
NotificationCommand after substitution (recovery case):
<![CDATA[echo -e "localhost\tJobScheduler Monitoring Errors\t0\tRECOVERED scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred\n" | /usr/local/nagios/bin/send_nsca -H monitor_host -c /usr/local/nagios/etc/send_nsca.cfg]]>
NotificationCommand after substitution (success case):
<![CDATA[echo -e "localhost\tJobScheduler Monitoring Success\t0\tSUCCESS scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=\n" | /usr/local/nagios/bin/send_nsca -H monitor_host -c /usr/local/nagios/etc/send_nsca.cfg]]>
-->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors"
service_name_on_success="JobScheduler Monitoring Success"
service_status_on_error="2"
service_status_on_success="0">
<NotificationCommand><![CDATA[echo -e "service_host\t${SERVICE_NAME}\t${SERVICE_STATUS}\t${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}\n" | /usr/local/nagios/bin/send_nsca -H monitor_host -c /usr/local/nagios/etc/send_nsca.cfg]]>
</NotificationCommand>
</NotificationMonitor>
... |
...