Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mconf/kurento-health-monitor
Node.js service for notifying Kurento Media Server UP/DOWN state to a webhook URL
https://github.com/mconf/kurento-health-monitor
Last synced: 20 days ago
JSON representation
Node.js service for notifying Kurento Media Server UP/DOWN state to a webhook URL
- Host: GitHub
- URL: https://github.com/mconf/kurento-health-monitor
- Owner: mconf
- License: lgpl-3.0
- Created: 2019-08-16T17:57:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:45:47.000Z (almost 2 years ago)
- Last Synced: 2024-05-15T22:55:11.141Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 53.7 KB
- Stars: 5
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Running
This was tested from Node.js 8.x to 12.x.
There is an example configuration file in `./config/default.example.yml`. The
file which the app looks for must be `./config/default.yml`, so be sure to copy
it over and configure it to your wish.
All the configuratin options have environment variables for them as well. Look
for the mapping in `./config/custom-environment-variables.yml`.And then, to run:
- `npm install`
- `npm start` or `node server.js`The application can also be run with docker. Look for the `Dockerfile` in the root
dir and have fun with it.## Configuration
- `kurento`: an array of objects consisting of `kurento.ip` (Kurento's host IP) and `kurento.url` (Kurento WS URL).
```
kurento:
- ip: ""
url: ws://HOST/kurento
```
- `kurentoStartupRetries`: Integer. number of initial connection tries. Defaults to `Infinity`.
- `enableConnHealthcheck`: Boolean. Enables a periodic health check (run every `connHealthCheckInterval`) which opens a WS connection with Kurento and then closes it. Defaults to `true`.
- `connHealthCheckInterval`: Integer. Connection healthchecker interval, in ms. Defaults to `30000`.
- `kurentoStartupRetries`: Integer. Number of initial connection tries. Defaults to `Infinity`.
- `webhookURL`: String. URL where the service will send `POST` requests notifying the media server's state.
- `hostAddress`: String. this service's host identifier. Can be anything, it's just appended to the event strings.## Events
- `hostAddress` triggered MEDIA_SERVER_OFFLINE for Kurento `kurento.url` `kurento.ip`
- `hostAddress` triggered MEDIA_SERVER_ONLINE for Kurento `kurento.url` `kurento.ip` (triggered only after `MEDIA_SERVER_OFFLINE`)
- `hostAddress` triggered STARTUP_CONNECT_FAILURE for Kurento `kurento.url` `kurento.ip`
- `hostAddress` triggered STARTUP_CONNECT_SUCCESS for Kurento `kurento.url` `kurento.ip` (triggered only after `STARTUP_CONNECT_FAILURE`)
- `hostAddress` triggered WS_CONN_UNHEALTHY for Kurento `kurento.url` `kurento.ip` (triggered only if `enableConnHealthcheck` = `true`)
- `hostAddress` triggered WS_CONN_HEALTHY for Kurento `kurento.url` `kurento.ip` (triggered only if `enableConnHealthcheck` = `true` and after `WS_CONN_UNHEALTHY`)