https://github.com/gwolf3/kuberhealthy-client
🩺 a simple asynchronous javascript client for kuberhealthy
https://github.com/gwolf3/kuberhealthy-client
healthchecks kubernetes monitoring
Last synced: about 2 months ago
JSON representation
🩺 a simple asynchronous javascript client for kuberhealthy
- Host: GitHub
- URL: https://github.com/gwolf3/kuberhealthy-client
- Owner: gWOLF3
- Created: 2020-05-13T23:51:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T04:07:49.000Z (over 1 year ago)
- Last Synced: 2025-01-13T06:09:28.672Z (3 months ago)
- Topics: healthchecks, kubernetes, monitoring
- Language: JavaScript
- Homepage:
- Size: 128 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## kuberhealthy-client 🩺
[](https://badge.fury.io/js/kuberhealthy)a simple, asynchronous javascript client for [kuberhealthy](https://github.com/Comcast/kuberhealthy) synthetic checks.
#### install
```
npm i --save kuberhealthy
```#### use:
```javascript
const kh = require('kuberhealthy')// Report failure. Returns Promise.
kh.ReportFailure(['example failure message'])// Report success. Returns Promise.
kh.ReportSuccess()```
> _NOTE: KH_REPORTING_URL must be set in your env. This is usually done automatically if running as 'khcheck' on kubernetes._
#### example:
```javascript
const report = async () => {
try {
await kh.ReportSuccess()
} catch (e) {
console.error(e)
process.exit(1)
}
process.exit(0)
}report()
```
---#### credit:
- this client was inspired and based from [kuberhealthy client js](https://github.com/Comcast/kuberhealthy/blob/master/clients/js/README.md)