add health endpoint
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m21s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m21s
This commit is contained in:
parent
1408cecee3
commit
4d0ae5286d
7
influx-commands.md
Normal file
7
influx-commands.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Useful InfluxDB commands
|
||||
|
||||
## Delete data from bucket
|
||||
|
||||
```bash
|
||||
influx delete --bucket mcutils --start 2024-01-01T00:00:00Z --stop 2025-01-05T00:00:00Z --org mcutils --token setme --predicate '_measurement="requests_per_route"
|
||||
```
|
@ -0,0 +1,22 @@
|
||||
package xyz.mcutils.backend.controller;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import xyz.mcutils.backend.config.Config;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "/")
|
||||
public class HealthController {
|
||||
|
||||
@GetMapping(value = "/health")
|
||||
public ResponseEntity<?> home() {
|
||||
return ResponseEntity.ok(Map.of(
|
||||
"status", "OK"
|
||||
));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user