Skip to Content

Implement a Dashboard Application for Monitoring Java Apps

Create an application that retrieves metrics for Java applications running in SAP BTP, Neo environment.
You will learn
  • How to configure a custom application that retrieves metrics for Java applications running in the Neo environment.
nikolasimeonov77Nikola SimeonovSeptember 15, 2022
Created by
December 1, 2020


The application you create shows the states of the Java applications and can also show the state and metrics of the processes running on those applications.

This tutorial uses a Java project published on GitHub. This project contains a dashboard application that requests the metrics of the following Java applications (running in SAP BTP, Neo environment):

  • app1 located in a1 subaccount and Europe (Rot/Germany) region

  • app2 located in a2 subaccount and US East region

After receiving each JSON response, the dashboard application parses the response and retrieves the name and state of each application as well as the name, state, value, thresholds, unit, and timestamp of the metrics for each process. The data is arranged in a list and then shown in the browser as a dashboard.

For more information about the JSON response, see SAP Monitoring Service Response for Java Applications.

To learn more about the whole scenario, read the Dashboard Scenario blog post.

  • Step 1

    Download the cloud-metrics-dashboard project as a ZIP file from

  • Step 2

    Extract the files into a local folder and import the folder in Eclipse as an existing Maven project.

    You can also upload your project by copying the URL from GitHub and pasting it as a Git repository path or URI after you switch to the Git perspective. Remember to switch back to a Java perspective afterward.

    How did you import the folder in Eclipse?

  • Step 3

    In Eclipse, open the class and update the following information:

    • Your logon credentials

    • Your Java applications, and their subaccounts and regions (hosts)

    private final String user = "my_username";
    private final String password = "my_password";
    private final List<ApplicationConfiguration> appsList = new ArrayList<ApplicationConfiguration>();
    public void configure(){
                            String landscapeFQDN1 = "";
                            String account1 = "a1";
                            String application1 = "app1";
                            ApplicationConfiguration app1Config = new ApplicationConfiguration(application1, account1, landscapeFQDN1);
                            String landscapeFQDN2 = "";
                            String account2 = "a2";
                            String application2 = "app2";
                            ApplicationConfiguration app2Config = new ApplicationConfiguration(application2, account2, landscapeFQDN2);

    The example shows only two applications, but you can create more and add them to the list.

    What parameters have you set the values for in the `` class?

  • Step 4
    1. Start your Java applications.

      You can retrieve metrics only for running Java applications.

      View the status of your Java applications and start them in the SAP BTP cockpit.

    2. Create a Java Web server (for example, Java Web Tomcat 8 server) in Eclipse and start it.

    3. Run your Eclipse project on the server.

    4. Verify the following:

      • Initially, the dashboard displays all the states of the Java applications.

      • When you select an application, you can view the states of the application’s processes.

      • When you select a process, you can view the process’s metrics.


        An empty field in the Thresholds column signifies that the warning and critical values are set to zeros.

    What have you verified for the dashboard application?

Back to top