zingorn / monitoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UrlMonitoring

This project is job scheduling application where you can implement any job to verify your service state. At this moment implemented only Http Job to check site availability but you can add a Database checker or something else.

Application design details

Requirements

  • Maven 3.x
  • Make GNU
  • Java 8
  • Docker

Dependencies

Name Description
Dropwizard 1.3.11 Application skeleton framework
Dager 2.24 Dependency injection framework
Quartz 2.3.1

Build and run

Build project:

make test

This command builds project and Docker image with jar file.

Local project run

Note: local port 8080 should be free for local run.

  • Run in Docker container
make local-run
  • If you don't have Docker locally then you can build the project (with error, but application standalone jar file will be created) and run following command to run application server locally (then push config in separate console).
make local-run-jar

Run Docker container with the application inside. Now application API available by http://localhost:8080/api/. Logs available in docker_logs folder.

  GET     /api/health (com.zingorn.monitoring.resources.HealthResource)
  GET     /api/v1.0/scheduler/last-runs (com.zingorn.monitoring.resources.SchedulerResource)
  PUT     /api/v1.0/scheduler/update-jobs (com.zingorn.monitoring.resources.SchedulerResource)

Admin UI available by http://localhost:8080/.

Application API

URL Description
GET /api/v1.0/scheduler/last-runs Returns the last job's result reports. Each job report has at least job verdict, job elapsed time and the last run time.
PUT /api/v1.0/scheduler/update-jobs You can update jobs list without application restarting. Just send JSON config in following format.

About


Languages

Language:Java 86.0%Language:HTML 11.8%Language:Makefile 1.5%Language:Dockerfile 0.5%Language:Shell 0.1%