Giter Site home page Giter Site logo

spo2's Introduction

SpO₂

SpO₂ is oxygen saturation and is used in medical person monitoring.

This project uses sled to permanently save the health checked URLs. It provides a websocket API that returns the changing status of the health checked URLs.

SpO₂ doesn't support SSL out of the box, if you need you can setup an Nginx server as we do.

SpO2 dashboard screenshot

Usage

You must have installed Rust on your computer first.

# to try it in debug mode
cargo run

# or in release mode
cargo run --release

# you can also change the listen addrs with env variables
export HTTP_LISTEN_ADDR='127.0.0.1:8000'
export WS_LISTEN_ADDR='127.0.0.1:8001'
cargo run --release

# with the previous settings the HTTP and the WebSocket server will be
# available on http://127.0.0.1:8000/ and ws://127.0.0.1:8001/ respectively

# to enable the slack notifier you must set the corresponding env variable
export SLACK_HOOK_URL='Your Slack Webhook URL'
cargo run --release

Add or Update a new URL to health check

Calling this route is "kind of" idenpotent, it means that it will not run another health checker on this URL but the custom json data will be updated.

curl -i -X PUT 'http://127.0.0.1:8000/?url=http%3A%2F%2Flocalhost%2Fhealth' -d '"your custom json data"'

# Note that 'http%3A%2F%2Flocalhost%2Fhealth' is the url to health check
# but it is url encoded and correspond to 'http://localhost/health'

Remove an health checked URL

Calling this route will remove the URL from the health check pool and return you the custom json data associated with it.

curl -i -X DELETE 'http://127.0.0.1:8000/?url=http%3A%2F%2Flocalhost%2Fhealth'

Get an health checked URL data

Will return the associated data of an already health checked URL.

curl -i -X GET 'http://127.0.0.1:8000/?url=http%3A%2F%2Flocalhost%2Fhealth'

Get all the health checked URLs

Will return the list of all the health checked URLs aloang with the data associated with them.

curl -i -X GET 'http://127.0.0.1:8000/all'

spo2's People

Contributors

kerollmops avatar qdequele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.