GithubHelp home page GithubHelp logo

grafana-wizzy / wizzy Goto Github PK

View Code? Open in Web Editor NEW
468.0 35.0 61.0 780 KB

Manage & automate Grafana with easy wizzy

Home Page: https://grafana-wizzy.com

License: Apache License 2.0

JavaScript 98.10% Shell 1.79% Dockerfile 0.12%
grafana influxdb prometheus graphite opentsdb dashboards

wizzy's Introduction

Wizzy

npm version Coverage Status

Status Update: Unmaintained, we suggest you use grafana-dashboard-manager

wizzy is a rich user-friendly command line tool written in node.js to manage Grafana entities. It can save you hundreds of clicks in a day when editing and managing your Grafana dashboards. It can also be used to store dashboards in a Github repo making Grafana dashboards version controlled.

Contributors

wizzy's People

Contributors

dancech avatar dependabot[bot] avatar dideler avatar geekdave avatar hensur avatar jessestuart avatar john-scalingo avatar meshuamam avatar miketwenty1 avatar nielsole avatar quadriq avatar sstarcher avatar sytten avatar tclh123 avatar udayrakesh avatar utkarshcmu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wizzy's Issues

Wizzy 0.5.3 error

I'm getting this with 0.5.3 and 0.5.2. Working fine with 0.5.1

 wizzy export datasources
/usr/local/lib/node_modules/wizzy/src/commands.js:76
			grafana.export(_.drop(commands));
			       ^

TypeError: Cannot read property 'export' of undefined
    at Commands.instructions (/usr/local/lib/node_modules/wizzy/src/commands.js:76:11)
    at Command.listener (/usr/local/lib/node_modules/wizzy/node_modules/commander/index.js:301:8)
    at emitOne (events.js:96:13)
    at Command.emit (events.js:188:7)
    at Command.parseArgs (/usr/local/lib/node_modules/wizzy/node_modules/commander/index.js:617:12)
    at Command.parse (/usr/local/lib/node_modules/wizzy/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/wizzy/src/index.js:14:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)

Feature Request: Delete row/panel in a dashboard

I'd like to submit a feature request for deleting a row or panel.

wizzy delete row 3
wizzy delete panel 1.1

Context:

Love the tool - it is great for updating dashboards in a Grafana app. The order of the attributes changes every time a dashboard is exported from Grafana which makes it hard to see what has changed in git diffs. Copying rows and panels with Wizzy minimizes that. After copying a row/panel from a dashboard into my app dashboard I often want to remove/replace a row or panel.

FR: Add Context commands

Context Commands

These commands set wizzy's context.

$ wizzy use org ORG_NAME - sets the context to use an org for all future commands
$ wizzy use dashboard DASHBOARD_NAME - sets the context to use a dashboard for all future commands

Dashboard clips

Create a 5 second video for a grafana dashboard from now to now-24

Upload all dashboards to s3....

wizzy s3upload dashboards - copies local dashboards directory to s3
wizzy s3upload dashboard dashboard-slug - copies a dashboard from local dashboards directory to s3 dashboards directoy

Export of multiple dashboards at once fails the first time

If the dashboards are not created in sequential order they will fail. I attempted to create 4 dashboards at once.

wizzy export datasources
Output:
{
  "id": 1,
  "message": "Datasource added"
}
✔ Datasource export successful.
Output:
Grafana API response status code = 500
No error body from Grafana API.
✘ Datasource export failed.
Output:
Grafana API response status code = 500
No error body from Grafana API.
✘ Datasource export failed.
Output:
{
  "id": 2,
  "message": "Datasource added"
}
✔ Datasource export successful.

FR: Add Local Execution Commands

$ wizzy create dashboard DASHBOARD_NAME - creates a new json dashboard under dashboards directory
$ wizzy add row ROW_NAME - adds a row in a dashboard
$ wizzy add panel PANEL_TITLE --type graph --width 250 - adds a panel in a row

Invalid URI error handling

If you specify a GRAFANA_URL and it does not begin with http or https you will see a bad error message.

/wizzy/src/grafana.js:609
		output += 'Grafana API response status code = ' + response.statusCode;

TypeError: Cannot read property 'statusCode' of undefined
    at Request.printResponse [as _callback] (/wizzy/src/grafana.js:609:61)
    at self.callback (/wizzy/node_modules/request/request.js:186:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.init (/wizzy/node_modules/request/request.js:274:17)
    at new Request (/wizzy/node_modules/request/request.js:128:8)
    at request (/wizzy/node_modules/request/index.js:54:10)
    at Function.put (/wizzy/node_modules/request/index.js:62:12)
    at sendRequest (/wizzy/src/grafana.js:592:11)
    at Grafana.export (/wizzy/src/grafana.js:330:3)```

This is an issue with the code for printResponse
                output += 'Grafana API response status code = ' + response.statusCode;
response can be null in the printResponse so it should be guarded against

Cut Release

Could you cut a release the current master has a ton of changes in it.

TypeError: Cannot read property 'statusCode' of undefined

I get the issue below when trying to connect to grafana simply do a wizzy show orgs.
Grafana is behind https with ldap. I'm running wizzy using npm 3.10.8, node 5.4.1 on windows...

$ wizzy show orgs
C:\Users\<user>\AppData\Roaming\npm\node_modules\wizzy\src\grafana.js:409
                output += 'Grafana API response status code = ' + response.statusCode;
                                                                          ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.printResponse [as _callback] (C:\Users\<user>\AppData\Roaming\npm\node_modules\wizzy\src\grafana.js:409:63)
    at self.callback (C:\Users\<user>\AppData\Roaming\npm\node_modules\wizzy\node_modules\request\request.js:186:22)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at Request.onRequestError (C:\Users\<user>\AppData\Roaming\npm\node_modules\wizzy\node_modules\request\request.js:845:8)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at TLSSocket.socketErrorListener (_http_client.js:262:9)
    at emitOne (events.js:77:13)
    at TLSSocket.emit (events.js:169:7)

Export of multiple datasources returns with exit code 0 when some fail

wizzy export datasources
Output:
{
  "id": 1,
  "message": "Datasource added"
}
✔ Datasource export successful.
Output:
Grafana API response status code = 500
No error body from Grafana API.
✘ Datasource export failed.
Output:
Grafana API response status code = 500
No error body from Grafana API.
✘ Datasource export failed.
Output:
{
  "id": 2,
  "message": "Datasource added"
}
✔ Datasource export successful.

Add dashboard-list commands

wizzy create dash-list list_name
wizzy add to-dash-list dash-list-name dashboard_slug
wizzy remove from-dash-list dash-list-name dashboard_slug
wizzy show dash-list list_name
wizzy clear dash-list list_name
wizzy delete dash-list list_name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.