Batch job monitoring overview SAP Focused Run 4.0…

This blog will explain the use of batch job monitoring in SAP Focused Run 4.0. If you are using older SAP Focused Run 3.0 version, read this blog. If you are on 3.0 and did not use batch job monitoring, then don’t. First upgrade to 4.0 to avoid conversion effort.

For setup of batch job monitoring in SAP Focused Run 4.0, read this blog.

New powerful functions in SAP Focused Run 4.0 on Analytics and Job trending are explained below.

Batch job monitoring

Batch job monitoring in SAP Focused Run is part of Job and Automation monitoring:

After opening the start screen and selecting the scope you get the total overview:

Click on the top round red errors to zoom in to the details (you can’t drill down on the cards below):

Click on the job to zoom in:

Systems overview

Click on the system monitoring button:

On the screen, zoom out on the overview by clicking the blue Systems text top left:

Now you get the overview per system:

Batch job analysis

Batch job analysis is a powerful function. Select it in the menu:

Result screen shows 1 week data by default:

The default sorting is on total run time.

Useful sortings:

  1. Total run time: find the jobs that run long in your system in total. These most likely will also be the ones that cause high load, or business is waiting long for to finish to give results.
  2. Average run time: find the jobs that take on average long time to run. By optimizing the code or batch job variant, the run time can be improved.
  3. Failure rate: find the jobs that fail with a high %. Get the issues known and then address them.
  4. Total executions: some jobs might simply be planned too frequently. Reduce the run frequency.

By clicking on the job trend icon at the end of the line you jump to the trend function.

Job trend function

From the analysis screen or by selecting the Trend graph button you reach the job trend function:

Select the job and it will show the trend for last week:

You can see if execution went fine, or not, and bottom right see average time the job took to complete.

Batch job monitoring setup in Focused Run 4.0…

In Focused Run 4.0 the batch job monitoring was revised. If you are using older version of Focused Run, read this blog on older batch job monitoring setup.

For using batch job monitoring, read this blog.

Open batch job monitoring

Batch job monitoring is now combined with other automation functions like process chain monitoring. Open this tile:

Global settings

For batch job monitoring settings, open the configuration and start with the global settings:

Here you can see the data volume used and set the retention time for how long aggregated data is kept.

You can also set generic rating rules:

Activation per system

In the activation per system select the system and it will open the details:

First switch on the generic activation for each system.

Activation of jobs to monitor

Now you can start creating a job group. First select left Job groups, then the Plus button top right:

Add a job by clicking the plus button and search for the job:

Press Save to add the job to the monitoring.

Grouping logic

You can group jobs per logical block. For example you can group all basis jobs, all Finance jobs, etc. Or you can group jobs per system. Choice is up to you. Please read first the part on alerting. This might make you reconsider the grouping logic.

Adding alerting

The jobs added to the group are monitored. But alerting is a separate action.

Go to the Alerting part of the job group. And an alert. First select the Alert type (critical status, delay, runtime, missing a job). Assign a notification variant (who will get the alert mail), and decide on alert grouping or atomic alerts.

If you do not specify a filter it will apply for the complete group. You can also apply a filter here to select a sub group of the job group.

Based on the alerting you might want to reconsider the grouping.

Relevant OSS notes

Process Chain Monitoring in SAP Focused Run…

Process Chain Monitoring in SAP Focused Run is possible via Job And Automation Monitoring which is available as of SAP Focused Run 3.0 FP02.

You can launch the Job & Automation Monitoring app in the Advanced Application Management section in the Focused Run launchpad.

When you launch the app you will be asked for a scope selection for which you can specify the systems for which you want to activate Process Chain Monitoring.

To start the setup of Process Chain Monitoring click on the settings button .

In the settings popup click on the pencil button under Technical Systems.

In the next popup select the system for which you want to configure process chain monitors by clicking on the area as shown below.

In the next screen , in the Monitoring tab click on the + sign to create a new filter to activate data collection.

Now provide a filter name and then in Job Type select SAP BW Process Chain and save.

After creating the filter move to Alerting tab and click on the + sign to create a new alert.

You can create the following types of alerts.

  • Critical Execution Status: The Execution Status is rated green, if a job finished successfully and red, if the job execution did not finish, i.e., aborted. It is rated yellow, if a job finished with warnings or errors without aborting.
  • Critical Application Status: The Application Status is rated green, if a job successfully processed the application data. It is rated red, if e.g., an ABAP job execution writes errors into the application log and yellow, if there are warnings, but no errors.
  • Critical Delay: The Start Delay rating is rated green, if the technical delay of a job (e.g., in case of an ABAP job the time passed until a job gets a work process assigned) did not exceed the threshold defined.
  • Critical Runtime: The Run Time is rated green, if the runtime of a job did not exceed the threshold defined.  

To create the alert first select the alert type.

Then in Alert Filters section provide the BW Process Chain name for which you want to activate alerting. Also you must provide the job type as BW Process Chain. You can optionally enter further filters like Execution User, Executable Name, ABAP Client and whether it’s a Standard Job or not.

Note: With Job & Automation monitoring you can create alerts for Standard ABAP jobs as well. The filters Executable Name and Standard Job is applicable only for ABAP Job type.

Optionally you can also set Notification Variant, Alert Severity and enable Automatic Alert Confirmation in the Alert Settings section.

Optionally you can also provide Resolution Instructions in the Alert Resolution area.

If you select alert type Critical Delay or Critical Runtime you also have to enter the thresholds.

Finally click on the Save button to save and activate the alerting.

Note: When we activate monitoring of process chain by creating the filter in the Monitoring tab, we activate data collection for Process Chain monitoring. This will enable data collection of all process chains of that managed system. You can see status of all process chain runs for that system in the main page of the Job & Automation Monitoring app. Additionally and optionally you can create/enable alerting in the Alerting tab to alert on specific process chain failures.

Note: Since the launch of Job & Automation Monitoring in Focused Run 3.0 FP2 the old Job Monitoring feature has been renamed to Job Monitoring ABAP Only. The Job Monitoring ABAP Only functionality is completely deprecated as of release of Focused Run 4.0.

For more details on Job & Automation Monitoring you can refer to SAP documentation here.

Batch job monitoring overview SAP Focused Run 3.0…

Batch job monitoring is a powerful part of SAP Focused Run system monitoring.

This blog will give you the overview of functions of batch job monitoring.

For setup of the batch job monitoring, you can read all details in this blog.

Questions that will be answered are:

  • How does SAP Focused Run job monitoring work?
  • What can I alert on?
  • Is maintenance needed for batch job monitoring?

Batch monitoring overview

For batch job monitoring start the Job Monitoring FIORI tile:

The batch job monitoring overview screen opens now:

You can now zoom into the job errors per system:

And you can zoom in per job now:

Go back to the previous screen to click on the alert generated:

During the setup of batch job monitoring (see this blog), you make the settings on alerting and who to inform when a batch job fails.

In the settings of batch job monitoring you can alert per job on:

  • Job cancellation
  • Job start delay
  • Job run time
  • Message codes in the job log

Maintenance

Maintenance on Job monitoring is required. In the initial setup the SM37 job schedule is read. But you still need to perform maintenance:

  • Jobs that no longer run need to be removed
  • Changed job behavior (for example run time length)
  • New jobs (these you need to add)
  • New insights into job criticality and more points to monitor (you typically start with cancelled jobs only, later you learn and fine tune per job)
  • Receivers of alerts change over time

For maintenance, you can open the batch job configuration screen and with the icons on the right see the alerts for changed or deleted jobs:

Reference

The full setup guide for batch job monitoring can be downloaded from the SAP Focused Run expert portal via this link.

Batch job monitoring setup Focused Run 3.0…

This blog will explain how to setup batch job monitoring in SAP Focused Run 3.0. If you are using SAP Focused Run 4.0: read this blog on batch job monitoring setup in Focused Run 4.0.

The usage of batch job monitoring is explained in the overview blog for batch job monitoring.

Questions that will be answered are:

  • How to setup batch job monitoring?
  • Can I monitor batch job start delay?
  • Can I monitor batch job duration?
  • Can I monitor if specific error messages occurred in the job log?
  • Can I alert on batch jobs?
  • Can I notify on batch jobs errors by sending mails?

Batch job monitoring setup

To setup batch job monitoring start the Batch job monitoring FIORI tile:

On the top right now open the configuration screen by clicking on the wheel icon:

The batch job groups now open. Select the pencil icon to change:

In the next screen press the New button to add a new Job group:

A batch job group can be set up in many ways:
1. You define one group for each system.
2. You define a group per functionality that crosses multiple systems.
3. Combination of the above. For example all technical jobs are clustered.
Think twice carefully on this setup before you start to implement. Changing between the concepts can be costing a lot of work.

Give the new group a name:

Give the new job group a good description and add the systems:

Save the definition.

First goto the third tab to make the default job settings:

The default job settings will be applied to any job added to the group. You can still fine tune per job later on. It is best to start with job status monitoring first. And only switch on the more advanced options later on for specific jobs only.

Save your settings again.

Now go to the jobs tab and press the add button to add new jobs:

In the selection screen that pops up now, it is very important to first select the system you want to read the jobs from, and then press go:

Focused run will now read the jobs from the remote system. In the list, select the jobs you want to monitor. You can select them mass as well. Then press ok.

Save your work.

The selected jobs are actively monitored now.

The jobs need to run first before they are visible in the batch job monitoring overview screen. Especially for the weekly and monthly running jobs.

Fine tuning the job monitoring: job errors

Fine tuning of the job monitoring can be done on the monitoring rules tab. First select the job to fine tune:

Now you can start to make deviations from the default.

In the example above the job duration monitoring was activated. Note here that you should set 2 thresholds: 1 for yellow and 1 for red.

The third option is job activity: this you switch on for jobs you need to have running at a certain frequently.

The fourth option is the job delay: some job really must be started in time without delay. Indicate here after which time an alert should be generated if the job does not start in time.

The last option is to check the job log messages. Here you can check for messages in the job log. Usage example: a job might have finished technically correct, so the job cancellation is not triggered. But inside the job log a functional error might occur. This error code you can pickup here and trigger an alert in the job monitoring.

Fine tuning the job monitoring: alerting

In the second block you can fine tune the alerting per job:

You can choose here to automatically confirm the alert if the system detects that the next batch job run went ok.

The other important fine tuning possible here is decide how many job failures in a sequence are needed before the alert is raised. For example, you have a job that runs every 10 minutes, but on average fails twice per day and is normally corrected the next run. In this case you can set the Relevant job instance counter to 2. This way 2 failed jobs in a row will alert. If it is recovered after a single wrong run there is no alert generated (here you must also fine tune the data collection frequency).

In the alert notification section you can assign an alert notification variant (this holds the mail template and receivers). In the default setup, you normally set the notification towards the basis team. But for some job(s) you might also want to notify a functional or business team.

Reference

The full setup guide for batch job monitoring can be downloaded from the SAP Focused Run expert portal via this link.