https://github.com/namshi/stackdriver-pushgateway
https://github.com/namshi/stackdriver-pushgateway
monitoring nodejs stackdriver stackdriver-monitoring
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/namshi/stackdriver-pushgateway
- Owner: namshi
- Created: 2018-06-24T08:14:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T11:22:44.000Z (over 4 years ago)
- Last Synced: 2025-03-24T13:21:21.744Z (about 1 year ago)
- Topics: monitoring, nodejs, stackdriver, stackdriver-monitoring
- Language: JavaScript
- Size: 50.8 KB
- Stars: 7
- Watchers: 29
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stackdriver-pushgateway
The Stackdriver Pushgateway exists to allow jobs to expose their metrics to Stackdriver.
It is compatible with the [prometheus gateway](https://github.com/prometheus/pushgateway#command-line):
```
echo "some_metric 3.14" | curl --data-binary @- http://stackgateway.domain.com/metrics/label1/value1/label2/value2
```
> only pushing metrics is really compatible to prometheus (not deleting etc)
# healthcheckio-integration
We faced some issues triggerring alerts when stackdriver time series metrics is absent for morethan 24 hours and added support for healthchecks.io api.
Currently we are adding healthchecks.io only for last_run metrics when interval is daily, which can be extended later if needed
you can customize alerting thresholds for a particular job by adding an entry in the config.js file under node `healthcheckio.alertConfig.thresholds` (replaces with name of the job in the push url)
```
"": {
"timeOut": 300, // 5 minutes - minimum 60 (one minute), maximum: 2592000 (30 days).
"grace": 60 // 1 minutes - Minimum: 60 (one minute), maximum: 2592000 (30 days)
}
```
## Installation
We provide a bare Dockerfile to run the pushgateway, but it essentially simply does
and `npm install` and run the `index.js`, so feel free to run this however you prefer :)
The environment variables needed by the pushgateway are:
* `PROJECT_ID`: name of the GCP project you want to send metrics to
* `HTTP_PORT`: port the server is going to listen on (default is `8080`)
* `GOOGLE_APPLICATION_CREDENTIALS`: path to your Google application credentials (default `/credentials/credentials.json`)
...start the app and have fun monitoring on StackDriver!