mackerel-client-scala - Mackerel Scala API Client
mackerel-client-scala is Scala Client for Mackerel API.
libraryDependencies += "com.krrrr38" %% "mackerel-client-scala" % "0.3.0"or SNAPSHOT version
resolvers += Opts.resolver.sonatypeSnapshots
libraryDependencies += "com.krrrr38" %% "mackerel-client-scala" % "0.3.1-SNAPSHOT"import com.krrrr38.mackerel4s.MackerelClient
import com.krrrr38.mackerel4s.model.MackereResponseError
val mackerel = new MackerelClient("api-key", "user-agent")
mackerel.listHosts.setService("service-name").run onComplete {
case Success(res) => ...
case Failure(ex: MackereResponseError) => s.statusCode ...
case Failure(ex) => ...
}| category | api | action | status |
|---|---|---|---|
| Services | List of Services | GET /api/v0/services | ✅ |
| Roles | List of Roles | GET /api/v0/services/<serviceName>/roles | ✅ |
| Hosts | Registering host information | POST /api/v0/hosts | ✅ |
| Getting host information | GET /api/v0/hosts/<hostId> | ✅ | |
| Updating host information | PUT /api/v0/hosts/<hostId> | ✅ | |
| Updating host status | POST /api/v0/hosts/<hostId>/status | ✅ | |
| Retiring a host | POST /api/v0/hosts/<hostId>/retire | ✅ | |
| List of hosts | GET /api/v0/hosts | ✅ | |
| Metrics | Posting metrics | POST /api/v0/tsdb | ✅ |
| Getting host metrics | GET /api/v0/hosts/<hostId>/metrics | ✅ | |
| Getting latest metrics | GET /api/v0/tsdb/latest | ✅ | |
| Posting graph definitions | POST /api/v0/graph-defs/create | ✅ | |
| Posting service metrics | POST /api/v0/services/<serviceName>/tsdb | ✅ | |
| Getting service metrics | GET /api/v0/services/<serviceName>/metrics | ✅ | |
| Posting monitoring check results | POST /api/v0/monitoring/checks/report | ✅ | |
| Monitors | Register monitor configurations | POST /api/v0/monitors | ✅ |
| Get monitor configurations | GET /api/v0/monitors | ✅ | |
| Update monitor configurations | PUT /api/v0/monitors/<monitorId> | ✅ | |
| Delete monitor configurations | DELETE /api/v0/monitors/<monitorId> | ✅ | |
| Alerts | Getting Alerts | GET /api/v0/alerts | ✅ |
| Closing Alerts | POST /api/v0/alerts/<alertId>/close | ✅ | |
| Dashboards | Creating Dashboards | POST /api/v0/dashboards | 🚫 |
| Getting Dashboards | GET /api/v0/dashboards/<dashboardId> | 🚫 | |
| Updating Dashboards | PUT /api/v0/dashboards/<dashboardId> | 🚫 | |
| Deleting Dashboards | DELETE /api/v0/dashboards/<dashboardId> | 🚫 | |
| List of Dashboards | GET /api/v0/dashboards | 🚫 | |
| Users | List of users | GET /api/v0/users | 🚫 |
| Delete users | DELETE /api/v0/users/<userId> | 🚫 |
- Fork (https://github.com/krrrr38/mackerel-client-scala)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test with
sbt test(sbt clean coverage test) and confirm that it passes - Create new Pull Request