prometheus-collector/mixins/node
Vishwanath 5c0e04cdb1
Sync dashboards from Grafana repo to our repo (#980)
[comment]: # (Note that your PR title should follow the conventional
commit format: https://conventionalcommits.org/en/v1.0.0/#summary)
# Syncing the final changes (that includes dashboard ids) from Grafana
repo to our repo.

[comment]: # (The below checklist is for PRs adding new features. If a
box is not checked, add a reason why it's not needed.)
# New Feature Checklist

- [ ] List telemetry added about the feature.
- [ ] Link to the one-pager about the feature.
- [ ] List any tasks necessary for release (3P docs, AKS RP chart
changes, etc.) after merging the PR.
- [ ] Attach results of scale and perf testing.

[comment]: # (The below checklist is for code changes. Not all boxes
necessarily need to be checked. Build, doc, and template changes do not
need to fill out the checklist.)
# Tests Checklist

- [ ] Have end-to-end Ginkgo tests been run on your cluster and passed?
To bootstrap your cluster to run the tests, follow [these
instructions](/otelcollector/test/README.md#bootstrap-a-dev-cluster-to-run-ginkgo-tests).
  - Labels used when running the tests on your cluster:
    - [ ] `operator`
    - [ ] `windows`
    - [ ] `arm64`
    - [ ] `arc-extension`
    - [ ] `fips`
- [ ] Have new tests been added? For features, have tests been added for
this feature? For fixes, is there a test that could have caught this
issue and could validate that the fix works?
  - [ ] Is a new scrape job needed?
- [ ] The scrape job was added to the folder
[test-cluster-yamls](/otelcollector/test/test-cluster-yamls/) in the
correct configmap or as a CR.
  - [ ] Was a new test label added?
- [ ] A string constant for the label was added to
[constants.go](/otelcollector/test/utils/constants.go).
- [ ] The label and description was added to the [test
README](/otelcollector/test/README.md).
- [ ] The label was added to this [PR
checklist](/.github/pull_request_template).
- [ ] The label was added as needed to
[testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml).
  - [ ] Are additional API server permissions needed for the new tests?
- [ ] These permissions have been added to
[api-server-permissions.yaml](/otelcollector/test/testkube/api-server-permissions.yaml).
  - [ ] Was a new test suite (a new folder under `/tests`) added?
- [ ] The new test suite is included in
[testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml).
2024-10-12 15:27:46 +00:00
..
alerts Add default dashboards , rec rules & alerting rules (#236) 2022-08-16 15:44:05 -07:00
dashboards Sync dashboards from Grafana repo to our repo (#980) 2024-10-12 15:27:46 +00:00
lib Fix dashboard issues (#284) 2022-09-21 18:06:14 -07:00
rules Build mixins (manually thru a GH action) (#108) 2021-11-19 15:18:36 -08:00
.gitignore Build mixins (manually thru a GH action) (#108) 2021-11-19 15:18:36 -08:00
Makefile Add default dashboards , rec rules & alerting rules (#236) 2022-08-16 15:44:05 -07:00
README.md Add default dashboards , rec rules & alerting rules (#236) 2022-08-16 15:44:05 -07:00
alerts.jsonnet Build mixins (manually thru a GH action) (#108) 2021-11-19 15:18:36 -08:00
config.libsonnet Enable remaining non-default dashboards & rec.rules (#341) 2022-12-07 23:20:17 +00:00
dashboards.jsonnet Build mixins (manually thru a GH action) (#108) 2021-11-19 15:18:36 -08:00
jsonnetfile.json Add default dashboards , rec rules & alerting rules (#236) 2022-08-16 15:44:05 -07:00
mixin.libsonnet Build mixins (manually thru a GH action) (#108) 2021-11-19 15:18:36 -08:00
rules.jsonnet Build mixins (manually thru a GH action) (#108) 2021-11-19 15:18:36 -08:00

README.md

Node Mixin

Last synced on 07/28/2022 to commit - 7519830a8a

This is a work in progress. We aim for it to become a good role model for alerts and dashboards eventually, but it is not quite there yet.

The Node Mixin is a set of configurable, reusable, and extensible alerts and dashboards based on the metrics exported by the Node Exporter. The mixin creates recording and alerting rules for Prometheus and suitable dashboard descriptions for Grafana.

To use them, you need to have jsonnet (v0.16+) and jb installed. If you have a working Go development environment, it's easiest to run the following:

go install github.com/google/go-jsonnet/cmd/jsonnet@latest
go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest

Next, install the dependencies by running the following command in this directory:

jb install

You can then build the Prometheus rules files node_alerts.yaml and node_rules.yaml:

make node_alerts.yaml node_rules.yaml

You can also build a directory dashboard_out with the JSON dashboard files for Grafana:

make dashboards_out

Note that some of the generated dashboards require recording rules specified in the previously generated node_rules.yaml.

For more advanced uses of mixins, see https://github.com/monitoring-mixins/docs.