avatarEric Anicet

Summary

The website content provides a guide on monitoring and managing Spring Boot applications using Ostara for Spring, an open-source desktop application that simplifies the process without requiring code changes or hosting a service.

Abstract

The article titled "Spring Boot Applications Monitoring with Ostara for Spring" introduces Ostara as a user-friendly and straightforward tool for managing and monitoring Spring Boot microservices. It emphasizes the ease of setup and the benefits of using Ostara, such as real-time insights into application performance and health metrics, without the need for additional coding or hosting services. The guide outlines the prerequisites for using Ostara, including Spring Boot 3, Maven 3.6.+, and Java 17 or later. It walks readers through setting up a Spring Boot application with the necessary Actuator Web API endpoints and configuring Ostara to connect to the application instance. The article concludes by highlighting the intuitive dashboards and views provided by Ostara and directs readers to the complete source code and further documentation.

Opinions

  • Ostara for Spring is presented as a modern and convenient alternative to Spring Boot Admin, with a focus on user-friendliness.
  • The article suggests that Ostara's desktop application model, which does not require hosting a service, is a significant advantage.
  • The use of Ostara is advocated for its ability to leverage Spring Boot Actuator endpoints to provide a comprehensive admin panel without any need for code changes, ensuring applications remain decoupled from the monitoring tool.
  • The guide expresses a positive view of Ostara's open-source nature and its ease of setup, making it accessible for developers looking to monitor their Spring Boot applications.
  • The inclusion of real-time data visualization and the ability to perform actions like changing log levels and evicting caches are highlighted as key features that enhance the management of Spring Boot applications.

Spring Boot Applications Monitoring with Ostara for Spring

In this story, we’re going to learn how to monitor and manage Spring Boot Applications with Ostara for Spring.

· Prerequisites · OverviewWhat is Ostara for Spring?Why use Ostara for Spring? · Getting StartedSpring boot ApplicationSetting up Ostara · Conclusion · References

Prerequisites

This is the list of all the prerequisites:

  • Spring Boot 3
  • Maven 3.6.+
  • Java 17 or later

Overview

What is Ostara for Spring?

Ostara for Spring is a modern tool for managing and monitoring actuator-enabled microservices, a Spring Boot Admin alternative, that aims to make the process more user-friendly and straightforward.

Ostara allows you to gain insights into the performance and health of your applications by providing real-time data of metrics such as CPU and memory usage, app and system properties, beans and their dependencies, and much more. In addition, the app allows you to perform actions on your applications like changing log levels and evict caches.

Why use Ostara for Spring?

  • It’s open source
  • Easy to setup
  • It’s a desktop application that monitors and manages the application (No need to host a service)
  • It utilizes all the spring boot actuator endpoints to build a simple and intuitive spring boot admin panel. Without any need for code changes, and completely decoupled from your spring boot applications.

Getting Started

Spring boot Application

We will start by creating a simple Spring Boot project from start.spring.io.

To use Ostara we must have a running and accessible Spring Boot application with Actuator Web API. By default all web endpoints are not exposed, we need to enable them.

management:
  endpoints:
    web:
      base-path: /management
      exposure:
        include: '*'
  endpoint:
    health:
      show-details: always
  info:
    env:
      enabled: true

If your Actuator endpoints are protected, you may apply these authentication settings when creating your application in Ostara.

That is all for our Spring boot API setup. In this story, actuator endpoints are available under the /management path.

Setting up Ostara

Download and install Ostara from the website based on your OS.

Once the Ostara desktop is ready, add an instance by clicking Create Instance.

  • Actuator URL: (It’s the URL for the actuator.) In this case http://localhost:8099/management
  • Alias: (Instance alias name)
  • Application Name: (application name: ostara-demo)
  • Disable SSL Verification: Yes or NO
  • Authentication Type: (if Actuator endpoints are protected)

The dashboard visualizes application instances based on their respective health states in real-time. We can add multiple instances to an application

Displaying all important information for specific instances.

Ostara provides many useful views and dashboards.

Conclusion

In this story, We have seen how to monitor easily spring boot applications using Ostara for spring.

The complete Spring boot app source code is available on GitHub.

If you enjoyed this article, please give it a few claps 👏.

Thanks for reading!

References

Spring Boot
Ostara For Spring
Maven
Java17
Monitoring
Recommended from ReadMedium