Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janikvonrotz/heartbeat-watcher
Heartbeat Watcher is a simple server that repeatedly checks the heartbeat index of an elasticsearch node and reports unavailable sites.
https://github.com/janikvonrotz/heartbeat-watcher
Last synced: 3 days ago
JSON representation
Heartbeat Watcher is a simple server that repeatedly checks the heartbeat index of an elasticsearch node and reports unavailable sites.
- Host: GitHub
- URL: https://github.com/janikvonrotz/heartbeat-watcher
- Owner: janikvonrotz
- Created: 2019-10-09T15:36:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T08:47:48.000Z (about 2 years ago)
- Last Synced: 2024-11-21T09:37:55.293Z (2 months ago)
- Language: JavaScript
- Size: 126 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heartbeat Watcher
Heartbeat Watcher is a simple server that repeatedly checks the heartbeat index of an elasticsearch node and reports unavailable sites.
## Config
Heartbeat Watcher loads configuration from the `heartbeatwatcher.yml` file.
```bash
SERVER:
HOST: "0.0.0.0"
PORT: 3000
ELASTICSEARCH:
HOST: "https://HOSTNAME:9200"
USERNAME: "USERNAME"
PASSWORD: "PASSWORD"
SCHEDULE:
MINUTES: 5
SMTP:
HOST: "HOSTNAME"
PORT: 587
USERNAME: "[email protected]"
PASSWORD: "PASSWORD"
MAIL:
FROM: "\"DISPLAYNAME" "
TO: "[email protected]"
KIBANA:
URL: "https://HOSTNAME/app/uptime"
```or from environment variables.
```bash
SERVER_HOST: "0.0.0.0"
SERVER_PORT: 3000
ELASTICSEARCH_HOST: "https://HOSTNAME:9200"
ELASTICSEARCH_USERNAME: "USERNAME"
ELASTICSEARCH_PASSWORD: "PASSWORD"
SCHEDULE_MINUTES: 5
SMTP_HOST: "HOSTNAME"
SMTP_PORT: 587
SMTP_USERNAME: "[email protected]"
SMTP_PASSWORD: "PASSWORD"
MAIL_FROM: "\"DISPLAYNAME\" "
MAIL_TO: "[email protected]"
MAIL_KIBANA_URL: "https://HOSTNAME/app/uptime"
```If both options are configured, it will merge the configurations.
## Docker
Heartbeat Watcher is available as docker image. Mount the configuration file in order to run the application.
`docker run -i -p 3000:3000 -v ${PWD}/heartbeatwatcher.yml:/usr/src/app/heartbeatwatcher.yml heartbeat-watcher:$BUILDNUMER`
### Build
Build docker container with the following command.
`docker build -t heartbeat-watcher:$BUILDNUMBER .`
### Publish
Tag the docker image and publish to the target repo.
```bash
docker tag heartbeat-watcher:$BUILDNUMBER HOSTNAME:PORT/heartbeat-watcher:$BUILDNUMBER
docker push HOSTNAME:PORT/heartbeat-watcher:$BUILDNUMBER
```