Contact Us

Monitoring SAP Job Scheduling Service Jobs

High Level Concept

For monitoring jobs of a customer built BTP application (namely those that you see in your local Service Dashboard (for example) you need to  

  1. Install the calm-crun-client-api-java library (as described in prerequisites)
  2. Enable Backend Data Collection (as described in Auto-Instrumentation for Java)
  3. Bind to Destination Service (as described in prerequisites)
  4. Create a Java program (for job monitoring data collection) and schedule it to run every 5 min (as described below)

It is planned, that step 4 (i.e. the the scheduling of the monitoring data collector) becomes obsolete. Instead you will simply need to "flag" jobs that you want get monitored via SAP Cloud ALM and can stop the data collection job.

Create JAVA Program for Monitoring Data Collection

Create Java Program for Monitoring Data Collection

Note, that you need for this task some basic Java programming knowledge and understanding of the BTP programming environment.

In the application that you have deployed to your BTP account and that you have bound to the job scheduler service (and to the destination service) 

  • Make sure the VCAP services are present and filled with job scheduler service and destination service information
  • Copy “JobMonManualInstrumentation” java class along with DCI & OTEL libraries
    • In the coding enter the value of your subaccount, i.e. update static String PROVIDER_SUB_ACCOUNT_ID = "bc585a62-426f-4cb4-99d2-ab5ae8a6439a";
    • Optionally: Specify in the coding the job names that you want to transfer (please include the name of the CALM data collection job)

Schedule Java Program to run every 5 min

In Service Dashboard create "Collect Job Execution Data for CALM" job to run every 5 minutes. As action REST endpoint call POST method “pushDataToCALM()” from “JobMonManualInstrumentation” java class that you created above. Create the schedule for it and check that it is executed.

Verify that monitoring data collection works

After the execution of the data collection job (within 5 minutes) you should see the data collection job (together with other jobs of your BTP application that have run since scheduling the data collection job) in your SAP Cloud ALM tenant in the Job & Automation Monitoring application.