Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
povilasv committed Apr 26, 2019
1 parent 0c29d75 commit d57b379
Show file tree
Hide file tree
Showing 9 changed files with 5,900 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
@@ -0,0 +1,6 @@
language: generic
dist: xenial
install: make setup_all
before_script:
- export PATH=$PATH:$PWD
script: make
8 changes: 8 additions & 0 deletions Makefile
Expand Up @@ -2,6 +2,14 @@ JSONNET_FMT := jsonnet fmt -n 2 --max-blank-lines 2 --string-style s --comment-s

all: fmt dashboards_out

setup_jsonnet:
bash setup_jsonnet.sh

setup:
go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb

setup_all: setup_jsonnet setup

fmt:
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNET_FMT) -i
Expand Down
50 changes: 50 additions & 0 deletions README.md
@@ -0,0 +1,50 @@
# Kubernetes Grafana mixin

A set of Grafana dashboards for Kubernetes Administrators.

Currently works on 1.12 clusters. I plan to add git branches for `1.13` and `1.14` in future :)

## How to use

This mixin is designed to be vendored into the repo with your infrastructure config.
To do this, use [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler):

1) Recommended. Generate the grafana .json files and deploy them yourself.

2) If you want to just try them out the generated `.json` files are commited in [dashboards_out]() directory, just download them and import them via [Grafana](https://grafana.com/docs/reference/export_import/#importing-a-dashboard).

## Generate config files

You can manually generate the grafana .json files, but first you must install some tools:

```
$ make setup
```

Mac:
```
$ brew install jsonnet
```

Linux:
```
sudo snap install jsonnet
```

Then, grab the mixin and its dependencies:

```
$ git clone https://github.com/povilasv/kubernetes-grafana-mixin
$ cd kubernetes-grafana-mixin
$ jb install
```

Finally, build the mixin:

```
$ make dashboards_out
```

The files in `dashboards_out` directory can then be passed to your Grafana server, via [file provisioning](https://grafana.com/docs/administration/provisioning/#dashboards)

You can also import them via Grafana UI, but it's not recommeneded as you will have to update them manually.

0 comments on commit d57b379

Please sign in to comment.