https://github.com/felipebonezi/play-actuator
Actuator routes for Play! applications.
https://github.com/felipebonezi/play-actuator
actuator health-check play-actuator play-framework playframework scala
Last synced: 10 months ago
JSON representation
Actuator routes for Play! applications.
- Host: GitHub
- URL: https://github.com/felipebonezi/play-actuator
- Owner: felipebonezi
- License: mit
- Created: 2022-07-08T16:40:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-05T02:07:50.000Z (10 months ago)
- Last Synced: 2025-04-17T04:18:59.673Z (10 months ago)
- Topics: actuator, health-check, play-actuator, play-framework, playframework, scala
- Language: Scala
- Homepage:
- Size: 81.1 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# play-actuator
[](https://github.com/felipebonezi/play-actuator/actions/workflows/continouos-integration.yml)
[](https://renovatebot.com)
[](https://github.com/felipebonezi/play-actuator/blob/main/LICENSE)
Play! Framework plugin with actuator routes that gives you infos about application uptime.
You may consider some indicators to define what is `Up` or `Down` for your (check more info at `Health endpoint details`).
This project is inspired by `Spring Boot Actuator` architecture
([Check this post to know more about it](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator))
.
## How to use?
[](https://github.com/felipebonezi/play-actuator/releases)
You can import as a project dependency in your `build.sbt` file.
```sbt
libraryDependencies ++= "io.github.felipebonezi" %% "play-actuator" % "(version)"
```
After that, you need to configure `play.actuator.ActuatorRouter` into project `conf/routes` file.
```scala
-> /actuator play.actuator.ActuatorRouter
```
Run your project and check Actuators endpoints - e.g. `/actuator/health`.
## Actuator endpoints
Below we have all project endpoints available on this project.
| Endpoint ID | Description | Path | Ready to use? |
|-------------|----------------------------------------------|---------------------|---------------|
| health | Displays your application’s health status. | `/actuator/health` | ✔️ |
| info | Displays information about your application. | `/actuator/info` | ✔️ |
| logfile | Returns the contents of the log file. | `/actuator/logfile` | ✖️ |
## Health endpoint details
You can check all health indicators by simple activating each configuration.
### Disk Space Indicator
Show to you the total, free and usable disk space.
**No need of any extra dependency, it's under the hood.**
`play.actuator.health.indicators.diskSpace = true`
### Database Indicator
Show to you information about your database using JDBC or Slick connection.
`play.actuator.health.indicators.database = true`
It depends on which dependency indicator you'll use.
**You need to choose only one dependency to work with!**
#### JDBC
```sbt
libraryDependencies ++= "io.github.felipebonezi" %% "play-actuator-jdbc-indicator" % "(version)"
```
#### Slick
```sbt
libraryDependencies ++= "io.github.felipebonezi" %% "play-actuator-slick-indicator" % "(version)"
```
### Redis Indicator
Show to you information about your Redis connection.
**For now, it only works with [play-redis](https://github.com/KarelCemus/play-redis) as your connector.**
`play.actuator.health.indicators.redis = true`
```sbt
libraryDependencies ++= "io.github.felipebonezi" %% "play-actuator-redis-indicator" % "(version)"
```
## Info endpoint details
You can enable to get all operational system info
inside the JSON return by `/actuator/info` route. Default is disabled.
`play.actuator.info.system.enabled = true`
## Scala compatibility
This project is compatible with Scala `2.12` and `2.13`, so you need to use the right version.
Be aware that we're considering to drop `2.12` compatibility, so, we advise you to use `2.13` as your preferred version.
## Sponsors & Backers
If you find Play Actuator useful to you, please consider [become a backer](https://github.com/sponsors/felipebonezi).
If your company seems to feel the same, please consider [become a sponsor](https://github.com/sponsors/felipebonezi).
### Thank you to all our backers on OpenCollective!