# grafana-dashboard-provisioner

> Fetches grafana dashboards and replace input variables

Latest version **1.0.4** (published 2021-12-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install grafana-dashboard-provisioner
pnpm add grafana-dashboard-provisioner
yarn add grafana-dashboard-provisioner
bun add grafana-dashboard-provisioner
```

Provides the command `grafana-dashboard-provisioner`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-12-02 |
| First published | 2021-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Eric Hayes |
| Maintainers | ejhayes |

## Links

- npm: https://www.npmjs.com/package/grafana-dashboard-provisioner
- Repository: https://github.com/ejhayes/grafana-dashboard-provisioner
- Issues: https://github.com/ejhayes/grafana-dashboard-provisioner/issues
- npm.io page: https://npm.io/package/grafana-dashboard-provisioner

## Dependencies (2)

- [envalid](https://npm.io/package/envalid.md) ^7.2.2
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0

## Recent versions

- 1.0.4 (latest) — 2021-12-02
- 1.0.3 — 2021-11-18
- 1.0.2 — 2021-11-18
- 1.0.1 — 2021-11-18
- 1.0.0 — 2021-11-18

## README

# grafana-dashboard-provisioner

This aims to address: https://github.com/grafana/grafana/issues/10786 by adding the following functionality to grafana dashboard provisioners:

- Update spec to allow downloading external hosted Grafana dashboards
- Allow user to specify values of to be passed to dashboard
- Non-url types are not affected

More info about provisioners can be found at:
https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
## usage

Using an existing dashboard:

```
apiVersion: 1

providers:
- name: K6 Load Testing
  type: url
  updateIntervalSeconds: 60
  options:
    gnetId: 10660
    inputs:
      DS_INFLUXDB: my-influxdb
```

You then run this tool with:
```
# view existing dashboard provisioners
$ tree dashboards 
dashboards
└── k6.yml

# run this command
$ DEST_PATH_PREFIX='/etc/grafana/provisioning/dashboards' npx grafana-dashboard-provisioner ./dashboards ./_dashboards 
Starting...
Parsing k6.yml
Fetching dashboard: 10660
Done...

# you'll see the updated dashboard config
$ tree _dashboards 
_dashboards
├── 10660.json
└── k6.yml
```

The contents of `k6.yml` above would then look like:
```
apiVersion: 1
providers:
  - name: K6 Load Testing
    type: file
    updateIntervalSeconds: 60
    options:
      path: /etc/grafana/provisioning/dashboards/10660.json
```

If you are using this with Docker you can mount the `_dashboard` directory instead of the `dashboard` directory.

---
_Source: https://npm.io/package/grafana-dashboard-provisioner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
