cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Java Batch Monitor Setup

Hello All!

 

I am trying to monitor a java batch job that runs in a linux box. I am trying to instrument this at box and batch job level.

Any guidance will be appreciated.

 

Thank you in advance!

6 REPLIES 6

andreas_grabner
Dynatrace Guru
Dynatrace Guru

Hi

If you have a Batch Job Application you need to tell dynatrace to start capturing a PurePath when your batch job method is called. We call this a "Custom Entry Point". you need to define a Sensor (which tells dynatrace to instrument a certain method, e.g: your DoJob method). In the Sensor Configuration for that Sensor you can say "Active and Start PurePath". This tells dynatrace to start a new PurePath in case this method is called and in case there is no active PurePath yet.

If you have that in place you will get PurePaths for your batch jobs.

Here are some additional links to the documentation that you will find useful:

There is also an interesting discussion thread on the same topic you should check out: How proceed with a batch process

Last thing: I recorded a webinar on Sensors as part of the Live Q&A Performance Clinics: http://bit.ly/dttutorials. I also have one webinar later today (Jan 7) where you can ask your questions and I answer them. Feel free to register: http://bit.ly/onlineperfclinic

Andi 

Hey Andreas!

Thank you for the feedback. However, I think that your suggestion needs that the batch job is triggered by the application. In this case, the batch job is a manual trigger. Someone executes the batch job directly using a shell that calls some java classes.

As well, the script is isolated, not in an application server. Therefore, not so sure how to connect the box/batch script to Dynatrace.

Let me know your thoughts.

dave_mauney
Dynatrace Champion
Dynatrace Champion

You need to deploy an agent to the server and add a setting to your script to set the dynatrace agentpath settings, similar to this

-agentpath:<path>=name=<agent_group_name>,server=<host>

If you right click on your system profile and select "Add Tier..." from the context menu, a wizard will walk you through the process.

Select Application/Java and the wizard will prompt you from there.

HTH,

dave

Thanks David. Just to add to this. If this is a command line tool you probably still need to define a Custom Entry Point Sensor. By default dynatrace starts PurePaths for well known interfaces such as Servlets, Web Services or RMI. But in your case you probably have your own Batch Methods that are called from your "main" method. I would create custom sensors for these to get a PurePath when they get called from your batch job

Andi

 

Thank you guys! I think I got the idea... basically implement an agent on the box using a Application -> Java  server and add the line of command on the shell script that Dave mentioned... plus add the custom entry point sensor once is setup.

I will give a shot and we I let u know if worked. Thank you very much!

dave_mauney
Dynatrace Champion
Dynatrace Champion

Good luck. Also, once you have the agent reporting, you can use the class browser and CPU sampling to help identify candidates for entry points if you are not familiar with the application.