forked from grafana/jsonnet-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,661 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/alerts.yaml | ||
/rules.yaml | ||
dashboards_out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Node.js Mixin | ||
|
||
The Node.js Mixin is a set of configurable, reusable, and extensible alerts and dashboards based on the default metrics exported by the [prom-client](https://github.com/siimon/prom-client). The mixin creates alerting rules for Prometheus and suitable dashboard descriptions for Grafana. | ||
|
||
To use them, you need to have `mixtool` and `jsonnetfmt` installed. If you have a working Go development environment, it's easiest to run the following: | ||
|
||
```bash | ||
$ go get github.com/monitoring-mixins/mixtool/cmd/mixtool | ||
$ go get github.com/google/go-jsonnet/cmd/jsonnetfmt | ||
``` | ||
|
||
You can then build the Prometheus rules file `alerts.yaml` and a directory `dashboard_out` with the JSON dashboard files for Grafana: | ||
|
||
```bash | ||
$ make build | ||
``` | ||
|
||
For more advanced uses of mixins, see [Prometheus Monitoring Mixins docs](https://github.com/monitoring-mixins/docs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
groups: | ||
- name: NodejsAlerts | ||
rules: | ||
- alert: NodejsDown | ||
expr: process_start_time_seconds != 1 | ||
for: 5m | ||
labels: | ||
severity: critical | ||
annotations: | ||
description: 'Node.js {{$labels.job}} on {{$labels.instance}} is not up.' | ||
summary: Node.js not up |
Oops, something went wrong.