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) is possible for java and node.js applications.

To enable the monitoring currently some manual action is needed for which basic programming knowledge and understanding of the BTP programming environment is needed.

It is planned for 2024, that simply "flag" jobs that you want get monitored via SAP Cloud ALM will be sufficient. Then you can stop the data collection job that you scheduled in step 4.

  1. Install the otel-agent-ext-java library or the xotel-agent-ext-js library (as described in prerequisites)
  2. Bind to Destination Service (as described in prerequisites)
  3. Create the java or node.js program (for job monitoring data collection) and schedule it to run every 5 min (for details see below)

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 “NGDCI_BTP_Job_Run_and_MetaData_Collectorjava 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()”. 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.

Create node.js Program for Monitoring Data Collection

Create node.js Program for Monitoring Data Collection

Note, that you need for this task some basic JavaScript 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 DCI & OTEL libraries
  • Copy "jobDataHandler.jsnode.js class 
  • Copy “NGDCI_BTP_Job_Run_and_MetaData_Collectornode.js class 
    • 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 node.js 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 “/dataCollectorToCALM”. Create the schedule for it and check that it is executed.