Sign inSign up

bondanthony/status-service

By bondanthony

•Updated over 9 years ago

Status Service is a small node js app that stores up/down information about remote services.

Image
0

246

bondanthony/status-service repository overview

⁠Service-Status Microservice

This service accepts json requests sent to /api/status by a service or application on a remote host. Results are grouped by hostnames of the sending host. The root document will return a single page app with the current reporting services.

BranchBuild StatusTest Coverage
Master:Build StatusCoverage Status

For questions or contributions join us on Slack #general⁠ or pick up an outstanding issue from Github Issues⁠.

⁠Container

Node js service running on top of node:argon⁠. The node service runs on port 80 within the container. All http routes can be found within the project docs on GitHub.

⁠Run the Container

  1. Build the container: docker build -t $REPO/status-service .
  2. Start the container: docker run -d -p 8081:80 bondanthony/status-service
  3. Access the endpoint: http://dockerhost:8081/⁠
  4. Post some data to http://dockerhost:8081/api/status⁠

⁠Example Usages

⁠POST request: GUI debuggers (i.e. Postman)

You would be submitting json objects in the body of the text. You also need to indicate in the headers that the Content-type is of "application/json". POST - http://dockerhost:8081/api/status⁠

{
  "host": "nyc010.domain.com",
  "services": [
    {
      "name": "brickyard api",
      "is_online": 1,
      "update_at": "2014-11-14T16:36:31Z",
      "mesg": "System Online: Average response 200ms"
    },
    {
      "name": "ords",
      "is_online": 1,
      "update_at": "2014-11-14T16:36:31Z",
      "mesg": "Oracle REST is open for business"
    }
  ]
}

⁠POST request: Commandline debuggers (i.e. curl)


curl -H "Content-Type: application/json" -d '{"host": "nyc010.domain.com","services": [{"name": "brickyard api","is_online": 1,"update_at": "2014-11-14T16:36:31Z","mesg": "System Online: Average response 200ms"},{"name": "ords","is_online": 1,"update_at": "2014-11-14T16:36:31Z","mesg":"Oracle REST is open for business"}]}' http://localhost:3000/api/status

⁠Live Tests

You can run live tests against our development version HERE⁠. Commits pushed to master will be deployed to this instance.

⁠Contribute

Please feel free to contribute to the project. All we ask is you follow our standards when developing against this project, visit the contributing⁠ page.

Tag summary

Content type

Image

Digest

Size

255.8 MB

Last updated

over 9 years ago

docker pull bondanthony/status-service