- Notifications
You must be signed in to change notification settings - Fork3
SpO₂ is oxygen saturation and is used in medical person monitoring.
License
Kerollmops/spo2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SpO₂ is a monitor for any program using the HTTP protocol. For more detail and background, see theblog post announcing the release of the project.
(In medicine, SpO₂ refers to oxygen saturation levels in blood and is used as a measure of a person's health. O₂ is the scientific designation for an oxygen atom.)
This project usessled 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 needyou can setup an Nginx server as we do.
You must haveinstalled Rust on your computer first.
# to try it in debug modecargo run# or in release modecargo run --release# you can also change the listen addrs with env variablesexport 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 variableexport SLACK_HOOK_URL='Your Slack Webhook URL'cargo run --release
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'
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'
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'
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'
About
SpO₂ is oxygen saturation and is used in medical person monitoring.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.