Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mjpitz/jsonnet-monitoring-starter
A quick start repository helping folks get started with jsonnet, prometheus, and grafana.
https://github.com/mjpitz/jsonnet-monitoring-starter
grafana jsonnet monitoring open-source operations prometheus reliability starter-template
Last synced: 17 days ago
JSON representation
A quick start repository helping folks get started with jsonnet, prometheus, and grafana.
- Host: GitHub
- URL: https://github.com/mjpitz/jsonnet-monitoring-starter
- Owner: mjpitz
- License: apache-2.0
- Created: 2020-10-10T04:01:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-10T07:46:28.000Z (about 4 years ago)
- Last Synced: 2024-10-31T22:42:34.381Z (2 months ago)
- Topics: grafana, jsonnet, monitoring, open-source, operations, prometheus, reliability, starter-template
- Language: Jsonnet
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonnet-monitoring-starter
This project is a [Jsonnet] starter kit used to scaffold monitoring with [Prometheus] and [Grafana].
I put this reference together after spending several days trying to wrap my head around projects using Jsonnet.
It aims to simplify the development of monitoring for open source projects.
The current starter supports generating:* [Prometheus Rules]
* [Prometheus Alerts]
* [Grafana Dashboards][Jsonnet]: http://jsonnet.org/
[Prometheus]: https://prometheus.io/
[Grafana]: https://grafana.com/[Prometheus Rules]: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
[Prometheus Alerts]: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
[Grafana Dashboards]: https://prometheus.io/docs/visualization/grafana/## How to use
1. Fork and clone the project
2. Copy `service-template` for each application in your system
3. Update `mixin.libsonnet` to import your applications
4. Add dashboards, rules, and alerts for each application_Some quick tips:_
* Don't try and knock it all out at once.
It's intended to be an iterative process.
So start small, and build up.* If you're looking for idea's, start by digging into a few of the projects below.
While jsonnet solves the problem, troubleshooting it can be difficult.
Building from existing examples really helps.## Generating configuration files
You can easily generate the configuration files, but first you'll need a few tools.
```sh
$ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
$ brew install jsonnet
```Once you have the proper tooling, you'll want to install the project dependencies.
```sh
$ jb install
```Finally, run `make` to generate the configuration files.
Files will be written to the `out` directory.```sh
$ tree out
out
├── dashboard-template-grafana.json
├── prometheus_alerts.yaml
└── prometheus_rules.yaml1 directory, 3 files
```To simplify the process, this project comes with a pre-built [GitHub action](./.github/workflows/branch.yaml).
When you push a branch or pull request, changes are automatically lint, built, and test.
When you push a tag, the contents of `out` are uploaded as assets to the release.## Inspiration / References
* [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin/)
* Largely initial inspiration.
While the layout was simple, it didn't have the composition I was looking for.
* My updates to [deps.cloud](https://github.com/depscloud/deploy/pull/39/files)
* Follows the pattern described herein.
Was my first hands on with jsonnet.
Blog post to come soon!
* [GitLab](https://gitlab.com/gitlab-com/runbooks)![](https://www.google-analytics.com/collect?v=1&tid=UA-172921913-1&cid=555&t=pageview&ec=repo&ea=open&dp=%2Fjsonnet-monitoring-starter&dt=%2Fjsonnet-monitoring-starter)