<?xml version="1.0" encoding="ISO-8859-1"?>

<spooler>
    <!-- Sample configuration for Network Monitoring solution stack:

This configuration file contains:

   - Job: monitor_check_status

     This job is used in a job chain for a web service to check the job scheduler log file 
     and send respective status messages to a monitor, e.g. nagios plugin.
     
   Samples that generate warnings and errors:

   - Job: monitor_sample_warning
     creates a warning for the job scheduler log file

   - Job: monitor_sample_error
     creates an error for the job scheduler log file -->
    <config>
        <http_server>
            <web_service debug="no"
                         timeout="30"
                         name="monitor_service"
                         url_path="/monitor_service"
                         job_chain="monitor_service">
                <params>
                    <param name="request_stylesheet"
                           value="config/scheduler_soap_request.xslt"/>
                    <param name="response_stylesheet"
                           value="config/scheduler_soap_response.xslt"/>
                </params>
            </web_service>
        </http_server>


        <jobs>
            <!-- This job accepts orders to check the job scheduler log file for warnings and errors 
and returns respective status messages in the order to the caller.

Log rotation is considered. -->
            <job name="monitor_check_status"
                 title="Check job scheduler log file and return status message to requesting monitor"
                 order="yes"
                 idle_timeout="310"
                 stop_on_error="no"
                 force_idle_timeout="no"
                 timeout="120">
                
                <script java_class="sos.stacks.monitor.JobSchedulerMonitorMessageJob"
                        language="java"/>
                <run_time let_run="no"/>
            </job>

            <!-- This job resets warnings and errors 
and returns respective status messages to the caller. -->
            <job name="monitor_reset_status"
                 title="Reset warnings and errors for status messages to requesting monitor">
                <params>
                    <param name="type"
                           value="reset"/>
                </params>
                <script java_class="sos.stacks.monitor.JobSchedulerMonitorMessageJob"
                        language="java"/>
                <run_time let_run="no"/>
            </job>
        </jobs>


        <job_chains>
            <job_chain name="monitor_service"
                       orders_recoverable="no"
                       visible="yes">
                <job_chain_node state="start"
                                job="monitor_check_status"
                                next_state="end"
                                error_state="error"/>
                <job_chain_node state="end"/>
                <job_chain_node state="error"/>
            </job_chain>
        </job_chains>
    </config>
</spooler>
