A Spring Boot application written in Kotlin that demonstrates advanced logging capabilities with integration to OpenSearch for log aggregation and visualization.
- Spring Boot application with Kotlin
- Structured logging using SLF4J and Logback
- Log shipping with Fluent Bit
- Log visualization with OpenSearch and OpenSearch Dashboards
- Docker Compose setup for easy deployment
- Health monitoring via Spring Boot Actuator
- Docker and Docker Compose
- Java 17 or later (for local development)
- Gradle (optional, wrapper included)
-
Clone the repository:
git clone https://github.com/mjrgr/loggingtestapp.git cd loggingtestapp -
Start the application stack using Docker Compose:
cd docker docker-compose up -d
This will start:
- The Spring Boot application on port 8080
- OpenSearch on port 9200
- OpenSearch Dashboards on port 5601
- Fluent Bit for log shipping
You can build the application using the included Gradle wrapper:
./gradlew buildTo run the application locally:
./gradlew bootRunThe application will start on http://localhost:8080.
- Spring Boot application containerized using Gradle image
- Exposes port 8080
- Health check endpoint at
/actuator/health
- Running on port 9200
- Single-node configuration for development
- Secured with default admin credentials
- Available at
http://localhost:5601 - Provides visualization and analysis of logs
- Default credentials: admin/M3i7s/Mh1Dou
- Monitors log files in
/tmp/la/*.log - Ships logs to OpenSearch
- Configurable via
docker/fluentbit/fluent-bit.conf
- Main configuration in
src/main/resources/application.yml - Logging configuration in
src/main/resources/logback.xml
- Configuration file:
docker/fluentbit/fluent-bit.conf - Customizable input paths and output settings
- Current refresh interval: 5 seconds
├── src/main/
│ ├── kotlin/ # Kotlin source files
│ └── resources/ # Application resources
├── docker/
│ ├── compose.yml # Docker Compose configuration
│ └── fluentbit/ # Fluent Bit configuration
└── build.gradle # Gradle build configuration
This project is licensed under the terms of the LICENSE file included in the repository.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request