grafana-dashboards
v1.2.3
Published
A quick way to generate helpful, pre-canned grafana dashboards for Cloudwatch and Graphite.
Downloads
31
Keywords
Readme
A quick way to generate helpful, pre-canned grafana dashboards for Cloudwatch and Graphite.
Setup
- Run
npm install -g grafana-dashboards
- Edit
dashboards.js
with your dashboard changes. See this package'sdashboards.example.js
for a starter.
Uploading new dashboards
- Run
grafana_dashboards
- Enter your Grafana username/dashboard path/password.
- Done
Customization
By default, the grafana dashboard creator will iterate through the dashboardsByEnvironment
exposed in the dashboard.js file and run the generateEnvironmentDashboard
function that has a set of default dashboards depending on the configurations in the dashboardsByEnvironment
.
Your dashboards.js file should have at least the dashboardsByEnvironment
object exported. If you want to generate the dashboards differently than the default, you can export the generateEnvironmentDashboard
function in your dashboard.js
file and it'll use that one instead of the one specified in index.js
.
See the dashboards.examples.js
as an example dashboard configuration.
Environment variables
Grafana Dashboard Creator uses dotenv to allow for a .env
file to have locally defined environment variables.
If you want to define these, they can bypass the prompts:
GRAFANA_USERNAME=my_user_name
GRAFANA_URL=https://grafana.example.com
GRAFANA_DASHBOARD_JS=./dashboards