Commit c4326c01 authored by Agustín Houlgrave's avatar Agustín Houlgrave

Merge branch 'issue-1' into 'master'

Add license

Closes #1

See merge request !1
parents c860d33f 2e1c1497
MIT License
Copyright (c) 2018 Agustín Houlgrave
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -2,13 +2,13 @@
# Status Check API
[![pipeline status](https://gitlab.com/skyvet/health-check-monitor/badges/master/pipeline.svg)](https://gitlab.com/skyvet/health-check-monitor/commits/master)
## What is this?
This program will constantly check for one or more http endpoints and notify you whenever something goes down and also when it goes up again!
This program will constantly check for one or more http endpoints and notify you
whenever something goes down and also when it goes up again!
It will additionally expose an api with the current statuses of every endpoint configured.
It will additionally expose an api with the current statuses of every endpoint
configured.
## Configuration
......@@ -31,7 +31,7 @@ You can also specify the config file path with the `-config` flag. For example:
health-check-monitor -config my/custom/dir/my_config.json
```
Check more configuration options in the conf.json [distribution file](https://gitlab.com/skyvet/health-check-monitor/raw/master/config.json.dist)
Check more configuration options in the conf.json [distribution file]
## Run locally
......@@ -45,12 +45,31 @@ health-check-monitor
## Run with docker
### Download a basic config file
```bash
curl https://gitlab.com/skyvet/health-check-monitor/raw/master/config.json.dist -o config.json
```
### Look up latest version and run it
You can do this with [jq] and [gitlab tags api]
```bash
LATEST_TAG=$(curl -s https://gitlab.com/api/v4/projects/10061516/repository/tags |jq -r '.[0].name')
docker run -d \
-v "$(pwd)/config.json:/config.json" \
-p "8001:8001" \
registry.gitlab.com/skyvet/health-check-monitor:0.1.0 -config /config.json
registry.gitlab.com/skyvet/health-check-monitor:$LATEST_TAG -config /config.json
```
Or just go [check manually the list] and then run docker
```bash
docker run -d \
-v "$(pwd)/config.json:/config.json" \
-p "8001:8001" \
registry.gitlab.com/skyvet/health-check-monitor:<insert here latest tag> -config /config.json
```
## Ping it!
......@@ -58,3 +77,13 @@ registry.gitlab.com/skyvet/health-check-monitor:0.1.0 -config /config.json
```bash
curl http://localhost:8001/status
```
## Licensing
Check [LICENSE.md]
[distribution file]: https://gitlab.com/skyvet/health-check-monitor/raw/master/config.json.dist
[jq]: https://stedolan.github.io/jq/
[check manually the list]: https://gitlab.com/skyvet/health-check-monitor/tags
[gitlab tags api]: https://docs.gitlab.com/ce/api/tags.html
[LICENSE.md]: (https://gitlab.com/skyvet/health-check-monitor/blob/master/LICENSE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment