| Branch | Build Status | Code Coverage |
|---|---|---|
| master | ||
| develop |
- π Service Description
- ποΈ Architecture
- π Quick Start
- βοΈ Configuration Reference
- π API Usage
- π₯ Health Monitoring
- π οΈ Troubleshooting
- π€ Contributing
- π License
Logreposit API is a unified monitoring platform for collecting and processing time-series data from various sources, including, for example:
| Source Type | Examples | Use Cases |
|---|---|---|
| Energy Systems | Photovoltaic systems | energy efficiency |
| Heating Systems | heating controllers | energy efficiency, problem debugging, proactive alerting |
| Smart Home Devices | IoT sensors, thermostats | Home automation, climate control |
| Industrial Controllers | Equipment monitoring | Multi-location device (e.g. PLC) monitoring |
- π REST API endpoints for data ingestion and device/user management
- π Real-time MQTT support for streaming data
- π Time-series storage with InfluxDB backend
where data can be then visualized e.g. with
- π Grafana dashboards for visualization and alerting
This service supports three operational modes that can be enabled independently:
graph TB
A[Client Applications] --> B[INGRESS Mode]
B --> C[Message Queue]
C --> D[PROCESSOR_MQTT Mode]
C --> E[PROCESSOR_INFLUX Mode]
D --> F[MQTT Broker]
E --> G[InfluxDB]
| Mode | Description | Purpose |
|---|---|---|
| π INGRESS | REST API endpoints | Data collection and device management |
| π‘ PROCESSOR_MQTT | MQTT message processing | Real-time data streaming |
| ποΈ PROCESSOR_INFLUX | Time-series storage | InfluxDB data persistence |
For production-grade setups, you should run different modes in separate deployments.
The logreposit-api per default has all modes enabled, but using the APP_MODES_ENABLED environment variable,
you can specifically control which components are loaded on startup.
See the βοΈ Configuration Reference section below.
The logreposit-api software ships as a docker image. You need some container orchestration system such as docker or Kubernetes to run it.
| Requirement | Version | Purpose |
|---|---|---|
| π³ Container Orchestration Engine | - | Container orchestration engine such as docker-compose or k8s |
| β Java | 25+ |
Configure which components to enable:
| Environment Variable | Default | Description |
|---|---|---|
APP_MODES_ENABLED |
ingress,processor_mqtt,processor_influx |
Comma-separated list of modes to enable |
Available modes:
ingress- REST API endpoints for data collection and user/device managementprocessor_mqtt- MQTT message processingprocessor_influx- InfluxDB integration
| Environment Variable | Default | Description |
|---|---|---|
SPRING_MONGODB_HOST |
localhost |
MongoDB hostname |
SPRING_MONGODB_PORT |
27017 |
MongoDB port |
SPRING_MONGODB_DATABASE |
logrepositapi |
MongoDB database name |
SPRING_RABBITMQ_HOST |
localhost |
RabbitMQ hostname |
SPRING_RABBITMQ_PORT |
5672 |
RabbitMQ port |
SPRING_RABBITMQ_USERNAME |
guest |
RabbitMQ username |
SPRING_RABBITMQ_PASSWORD |
guest |
RabbitMQ password |
| Environment Variable | Default | Description |
|---|---|---|
INFLUXDB_URL |
http://localhost:8086 |
InfluxDB URL |
INFLUXDB_USERNAME |
admin |
InfluxDB username |
INFLUXDB_PASSWORD |
admin |
InfluxDB password |
Currently, only the EMQX MQTT broker is supported.
| Environment Variable | Default | Description |
|---|---|---|
MQTT_ENABLED |
true |
Enable MQTT functionality |
MQTT_HOST |
127.0.0.1 |
MQTT broker hostname |
MQTT_PORT |
1883 |
MQTT broker port |
MQTT_USERNAME |
administrator |
MQTT broker username |
MQTT_PASSWORD |
administrator1 |
MQTT broker password |
MQTT_EMQX_MANAGEMENTENDPOINT |
http://127.0.0.1:18083 |
EMQX management API endpoint |
| Environment Variable | Default | Description |
|---|---|---|
SERVER_PORT |
8080 |
HTTP server port |
LOGGING_FILE_NAME |
logs/logreposit-api.log |
Log file location |
After startup you can access the OpenAPI Swagger documentation at http://<host>:<port>/reference/index.html.
The service exposes health and metrics endpoints:
| Endpoint | URL | Purpose |
|---|---|---|
| π Health | http://localhost:8080/actuator/health |
Service health status |
| π Metrics | http://localhost:8080/actuator/prometheus |
Prometheus metrics |
| βΉοΈ Info | http://localhost:8080/actuator/info |
Application information |
Adjust log levels via environment variables:
| Component | Environment Variable | Recommended Level |
|---|---|---|
| Application | LOGGING_LEVEL_COM_LOGREPOSIT |
DEBUG (dev), INFO (prod) |
| Spring Framework | LOGGING_LEVEL_ORG_SPRINGFRAMEWORK |
WARN |
LOGGING_LEVEL_COM_LOGREPOSIT=DEBUG
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK=WARNContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
Note: Please ensure your code follows the existing style and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.