-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xml
801 lines (537 loc) · 33.2 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>wizzy - cli for Grafana</title>
<link>https://grafana-wizzy.com/index.xml</link>
<description>Recent content on wizzy - cli for Grafana</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://grafana-wizzy.com/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>External Commands</title>
<link>https://grafana-wizzy.com/external-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/external-commands/</guid>
<description>
<h1 id="external-commands">External Commands</h1>
<p>These commands interacts with external platforms such as Grafana.net, S3, etc. You can upload, store and download Grafana dashboards from AWS S3. Also, you can use these commands to search and download dashboards from Grafana.net community.</p>
</description>
</item>
<item>
<title>General Commands</title>
<link>https://grafana-wizzy.com/general-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/general-commands/</guid>
<description>
<h3 id="help-commands">Help Commands</h3>
<p>Help commands lets you explore wizzy&rsquo;s info, health, configuration.</p>
<ul>
<li><p><strong>conf</strong> - Shows wizzy configuration</p>
<pre><code>$ wizzy conf
</code></pre></li>
<li><p><strong>init</strong> - Only to be used while setting up wizzy for the first time or upgrading wizzy. It creates all the required directories needed for wizzy.</p>
<pre><code>$ wizzy init
</code></pre></li>
<li><p><strong>status</strong> - Shows wizzy status.</p>
<pre><code>$ wizzy status
</code></pre></li>
<li><p><strong>help</strong> - Shows wizzy help.</p>
<pre><code>$ wizzy help
</code></pre></li>
<li><p><strong>version</strong> - Shows wizzy version.</p>
<pre><code>$ wizzy version
</code></pre></li>
</ul>
<h3 id="configuration-commands">Configuration commands</h3>
<p>wizzy properties can be set in wizzy by running following commands, if you have not set already:</p>
<h3 id="grafana-properties">Grafana properties:</h3>
<pre><code>$ wizzy set grafana url GRAFANA_URL
$ wizzy set grafana username USERNAME
$ wizzy set grafana password PASSWORD
$ wizzy set grafana headers HEADER_NAME HEADER_VALUE
$ wizzy set grafana authorization false
$ wizzy set grafana debug_api true
$ wizzy set grafana envs ENV_NAME url GRAFANA_URL'
$ wizzy unset grafana username'
$ wizzy unset grafana envs ENV_NAME url'
</code></pre>
<p><em>Note: There is an optional setting to debug Grafana API calls, <code>false</code> by default.</em></p>
<h3 id="dashboard-context">Dashboard context:</h3>
<pre><code>$ wizzy set context dashboard DASHBOARD_SLUG
$ wizzy set context grafana GRAFANA_INSTALLATION
</code></pre>
<h3 id="clip-command-properties">Clip command properties:</h3>
<pre><code>$ wizzy set clip render_height 600
$ wizzy set clip render_width 600
$ wizzy set clip render_timeout 10
$ wizzy set clip canvas_width 800
$ wizzy set clip canvas_height 600
$ wizzy set clip delay 500
</code></pre>
<h3 id="s3-properties">S3 properties:</h3>
<pre><code>$ wizzy set s3 bucket_name
$ wizzy set s3 path
</code></pre>
</description>
</item>
<item>
<title>Local Commands</title>
<link>https://grafana-wizzy.com/local-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/local-commands/</guid>
<description>
<h1 id="local-commands">Local commands</h1>
<p>These commands operates on local json files representing dashboards, orgs, datasources, panels, rows, template-variable, etc and support Dashboard Context. Commands for moving rows and panels from one dashboard to another are part of this set of commands. These are the most powerful commands of wizzy. Commands such as <code>summarize, move, copy, remove, change</code> are examples of local commands.</p>
<h2 id="dashboard-context">Dashboard context</h2>
<p>A user can set the dashboard context in wizzy by the following command so that the wizzy cli is aware about the local dashboard on which it should operate. This is an optional setting for some commands and mandatory for other commands, which makes wizzy cli more intuitive and user-friendly.</p>
<pre><code>$ wizzy set context dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy set context dashboard cpu-stats
</code></pre>
<p><em>Note: Once dashboard context is set, wizzy will use this dashboard as default if no dashboard is supplied. It will be mentioned in the documentation where setting dashboard context is required.</em></p>
</description>
</item>
<item>
<title>Remote Commands</title>
<link>https://grafana-wizzy.com/remote-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/remote-commands/</guid>
<description>
<h1 id="remote-commands">Remote Commands</h1>
<p>These commands operates directly on your Grafana installation via API, so please use them carefully. Commands for importing, listing, exporting and deleting dashboards, orgs, datasources are part of this set of commands.These commands are usually used when you have completed local changes and now the changes are ready to be pushed to your Grafana installation. Commands such as <code>import,export,list,show,delete</code> are examples of remote commands.</p>
<p>Dashboard Context(which is explained in local commands section) is not supported by these commands currently.</p>
</description>
</item>
<item>
<title>Use cases</title>
<link>https://grafana-wizzy.com/home/use-cases/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/home/use-cases/</guid>
<description><p>There can be a lot of use cases where wizzy can be used and some of them which I can think of right now are listed below. If you would like to do any of the following tasks in Grafana, then <code>wizzy</code> can help you accomplish them with its easy command line interface:</p>
<ol>
<li><p><strong>Copy, move Grafana dashboards from one installation of Grafana to another. For example, from your dev installtion to prod.</strong></p></li>
<li><p><strong>Store Grafana dashboards, rows, panels, datasources, orgs and even template variables, etc. in Git.</strong></p></li>
<li><p><strong>Copy, move, remove, edit rows and panels either within a dashboard or between two dashboards.</strong></p></li>
<li><p><strong>Upload/Store/Download Grafana dashboards from and to AWS S3 respectively.</strong></p></li>
<li><p><strong>Search/Download Grafana.net community dashboards in a single command.</strong></p></li>
<li><p><strong>Generate 8 second GIFs for any Grafana dashboard with last 24 hours of data for your presentations.</strong></p></li>
</ol>
<p>Feel free to add more use cases of <code>wizzy</code>.</p>
</description>
</item>
<item>
<title>AWS S3 Commands</title>
<link>https://grafana-wizzy.com/external-commands/s3-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/external-commands/s3-commands/</guid>
<description><p>To use wizzy with AWS S3, there are couple of steps to follow. Please note that these external commands does not support Dashboard context as they interact with external systems.</p>
<ol>
<li>Have your aws config file under ~/.aws/config (standard aws config location).</li>
<li>Set Bucket name and path (optional) using <code>wizzy set s3 bucket_name</code> and <code>wizzy set s3 path</code> commands. Please check <a href="https://grafana-wizzy.com/general-commands">General commands</a> to see examples.</li>
</ol>
<p>And then you can use the following commands to upload and download your dashboards to and from S3.</p>
<ul>
<li><p><strong>upload</strong> - Uploads dashboards to AWS S3.
For uploading all dashboards:</p>
<pre><code>$ wizzy upload to-s3 dashboards
</code></pre>
<p>For uploading only 1 dashboard:</p>
<pre><code>$ wizzy upload to-s3 dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy upload to-s3 dashboard cpu-stats
</code></pre></li>
<li><p><strong>download</strong> - Downloads dashboards from AWS S3.
For downloading all dashboards:</p>
<pre><code>$ wizzy download from-s3 dashboards
</code></pre>
<p>For downloading only 1 dashboard:</p>
<pre><code>$ wizzy download from-s3 dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy download from-s3 dashboard cpu-stats
</code></pre></li>
</ul>
</description>
</item>
<item>
<title>Dashboard Commands</title>
<link>https://grafana-wizzy.com/local-commands/dashboard-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/local-commands/dashboard-commands/</guid>
<description><p>Following commands are used to interact with json files stored locally under dashboards directory.</p>
<ul>
<li><p><strong>summarize</strong> - Prints a summarized view of a local dashboard. <code>DASHBOARD_SLUG</code> is optional as the local commands support dashboard context. So, if you have saved dashboard context, you do not need to specifiy the SLUG for the dashboard to use the following command.</p>
<pre><code>$ wizzy summarize dashboard &lt;DASHBOARD_SLUG&gt;
</code></pre>
<p>For example:</p>
<pre><code>$ wizzy summarize dashboard
$ wizzy summarize dashboard cpu-stats
</code></pre></li>
<li><p><strong>list</strong> - Lists panels on a dashboard with a particular datasource. This commands needs dashboard context as it will operate on the dashboard which is set in the context.</p>
<pre><code>$ wizzy list panels datasource DATASOURCE
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy change panels datasource old-graphite new-graphite
</code></pre></li>
<li><p><strong>change</strong> - Changes a datasource name in all the panels on a dashboard. This commands needs dashboard context as it will operate on the dashboard which is set in the context.</p>
<pre><code>$ wizzy change panels datasource OLD_DATASOURCE NEW_DATASOURCE
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy change panels datasource old-graphite new-graphite
</code></pre></li>
</ul>
</description>
</item>
<item>
<title>Dashboard Commands</title>
<link>https://grafana-wizzy.com/remote-commands/dashboard-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/remote-commands/dashboard-commands/</guid>
<description><p>Following commands are used to interact with Grafana dashboards.</p>
<ul>
<li><p><strong>list</strong> - Prints the list of dashboards/dashboard-tags from Grafana in a tabular format</p>
<pre><code>$ wizzy list dashboards
$ wizzy list dash-tags
</code></pre></li>
<li><p><strong>show</strong> - Prints remote dashboard json from Grafana</p>
<pre><code>$ wizzy show dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy show dashboard cpu-stats
</code></pre></li>
<li><p><strong>import</strong> - Imports remote dashboards json objects into your local dashboards directory. This command creates a new file if the dashboard does not exist or replaces an existing file if the dashboard exists locally.
For importing all dashboards from Grafana, use following command:</p>
<pre><code>$ wizzy import dashboards
</code></pre>
<p>If you want to import only one remote dashboard, please use the following command:</p>
<pre><code>$ wizzy import dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy import dashboard cpu-stats
</code></pre>
<p><em>Note: wizzy removes <code>version</code> field from the imported dashboard before saving it to the disk as version is something what Grafana takes care of for a dashboard.</em></p></li>
<li><p><strong>export</strong> - Exports local dashboards to be saved as a remote dashboard and go live in your Grafana installation. This will replace an existing dashboard or creates a new dashboard in Grafana. Please use this carefully.
For exporting all local dashboards to Grafana, use the following command:</p>
<pre><code>$ wizzy export dashboards
</code></pre>
<p>If you want to export only one local dashboard, please use the following command:</p>
<pre><code>$ wizzy export dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy export dashboard cpu-stats
</code></pre></li>
<li><p><strong>delete</strong> - Deletes a remote dashboard from your Grafana installation. Use carefully.</p>
<pre><code>$ wizzy delete dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy delete dashboard cpu-stats
</code></pre></li>
<li><p><strong>clip</strong> - Generate a gif image for Grafana dashboards. Please set all 6 clip configuration properties otherwise this command will not work. To know how to set properties, please look at <a href="https://grafana-wizzy.com/general-commands/">General commands</a>. Generated clip will be under clips directory.
Makes a clip of a dashboard&rsquo;s last 24 hours of data:</p>
<pre><code>$ wizzy clip dashboard DASHBOARD_SLUG
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy clip dashboard cpu-stats
</code></pre>
<p>Makes a clip of dashboards having a specific dashboard tag:</p>
<pre><code>$ wizzy clip dashboards-by-tag DASHBOARD_TAG_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy clip dashboards-by-tag graphite
</code></pre>
<p>Makes a clip of dashboards from a custom dashboard list:</p>
<pre><code>$ wizzy clip dash-list DASH_LIST_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy clip dash-list cassandra-dashbaords
</code></pre>
<p><em>Note:</em> Please delete the <code>temp</code> directory created locally as it contains intermediate images to create the clip.</p></li>
</ul>
</description>
</item>
<item>
<title>Datasource Commands</title>
<link>https://grafana-wizzy.com/remote-commands/datasource-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/remote-commands/datasource-commands/</guid>
<description><p>Following commands are used to interact with Grafana datasources.</p>
<ul>
<li><p><strong>show</strong> - Shows you all the Grafana datasources in JSON format.
To see all datasources, use the following command:</p>
<pre><code>$ wizzy show datasources
</code></pre>
<p>To see a single datasource, use the following command:</p>
<pre><code>$ wizzy show datasource DATASOURCE_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy show datasource my-graphite
</code></pre></li>
<li><p><strong>import</strong> - Imports datasources in JSON format and store under datasources directory
For importing all datasourcources, use the following command:</p>
<pre><code>$ wizzy import datasources
</code></pre>
<p>And for importing only 1 datasource, use the following command:</p>
<pre><code>$ wizzy import datasource DATASOURCE_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy import datasource my-graphite
</code></pre></li>
<li><p><strong>export</strong> - Export datasources from local to Grafana installation
For exporting all datasources:</p>
<pre><code>$ wizzy export datasources
</code></pre>
<p>For exporting a single datasource:</p>
<pre><code>$ wizzy export datasource DATASOURCE_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy export datasource my-graphite
</code></pre></li>
</ul>
</description>
</item>
<item>
<title>Grafana.net Commands</title>
<link>https://grafana-wizzy.com/external-commands/gnet-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/external-commands/gnet-commands/</guid>
<description><p>For listing/downloading dashboards from Grafana.net community following commands can be used. There is no extra configurations needed for these commands.</p>
<ul>
<li><p><strong>list</strong> - Lists all the dashboards and if filter is present then filters out the dashboards according to it.</p>
<pre><code>$ wizzy list gnet dashboards &lt;FILTER&gt;
</code></pre>
<p><em>For example, for listing all Grafana.net dashboards, use:</em></p>
<pre><code>$ wizzy list gnet dashboards
</code></pre>
<p><em>For example, for listing all Grafana.net dashboards with prometheus as datasource, use:</em></p>
<pre><code>$ wizzy list gnet dashboards ds=prometheus
</code></pre></li>
<li><p><strong>download</strong> - Downloads a dashbord json from Grafana.net and stores under dashboards directory.</p>
<pre><code>$ wizzy download from-gnet dashboard DASHBOARD_ID REVISION_ID
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy download from-gnet dashboard 328 3
</code></pre></li>
</ul>
</description>
</item>
<item>
<title>Org Commands</title>
<link>https://grafana-wizzy.com/remote-commands/org-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/remote-commands/org-commands/</guid>
<description><p>Following commands are used to interact with Grafana organizations.</p>
<ul>
<li><p><strong>import</strong> - Import orgs from Grafana to local orgs directory.
For importing all orgs:</p>
<pre><code>$ wizzy import orgs
</code></pre>
<p>For importing one org</p>
<pre><code>$ wizzy import org ORG_ID
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy import org 2
</code></pre></li>
<li><p><strong>create</strong> - Creates an org in Grafana</p>
<pre><code>$ wizzy create org ORG_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy create org my-new-org
</code></pre></li>
<li><p><strong>show</strong> - Shows org json object.
Shows all orgs:</p>
<pre><code>$ wizzy show orgs
</code></pre>
<p>Shows only 1 org:</p>
<pre><code>$ wizzy show org ORG_ID
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy show org 3
</code></pre></li>
<li><p><strong>delete</strong> - Deletes an org in Grafana.</p>
<pre><code>$ wizzy delete org ORG_ID
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy delete org 3
</code></pre></li>
<li><p><strong>export</strong> - Exports an org from your local directory into Grafana.</p>
<pre><code>$ wizzy export org ORG_ID
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy export org 3
</code></pre></li>
<li><p><strong>switch</strong> - Switched Grafana org to another org</p>
<pre><code>$ wizzy switch org ORG_ID
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy switch org 3
</code></pre></li>
</ul>
</description>
</item>
<item>
<title>Store Dashboards in Git</title>
<link>https://grafana-wizzy.com/examples/store-dashboards-in-git/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/examples/store-dashboards-in-git/</guid>
<description><ol>
<li><p>Download wizzy and initialize the directory with git as specified in the instructions. Instructions are here - <a href="https://grafana-wizzy.com/home/getting-started">Installation</a></p></li>
<li><p>Set Grafana properties if not set already:</p>
<pre><code>$ wizzy set grafana url http://localhost:3000
$ wizzy set grafana username admin
$ wizzy set grafana password password
</code></pre></li>
<li><p>Import all dashboards from Grafana to your local directory</p>
<pre><code>$ wizzy import dashboards
</code></pre></li>
<li><p>Check into Git the dashboards directory</p>
<pre><code>$ git add dashboards
$ git commit -m &quot;Initial dashboards commit&quot;
</code></pre></li>
</ol>
<p>Your dashboards are stored in local Git repo. You may now choose to push it to any remote branch!</p>
</description>
</item>
<item>
<title>Getting Started</title>
<link>https://grafana-wizzy.com/home/getting-started/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/home/getting-started/</guid>
<description>
<h2 id="prerequisites">Prerequisites</h2>
<p>Install nodejs by downloading it from nodejs.org. (<a href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a>). After installing nodejs, run following commands:</p>
<pre><code>$ node -v
$ npm -v
</code></pre>
<p><em>Note: Please make sure node version is above 5.10.1.</em></p>
<h2 id="installation">Installation</h2>
<p>There are 3 different ways you can install wizzy:</p>
<ol>
<li><p>Using docker. Pull the latest docker image <a href="https://github.com/grafana-wizzy/wizzy-docker">wizzy-docker</a></p>
<pre><code>$ docker run --rm -it grafana-wizzy/wizzy wizzy version
</code></pre></li>
<li><p>Using npm (Stable release):</p>
<pre><code>$ npm install -g wizzy
</code></pre>
<p><em>Node: - Use sudo if needed or permission was denied</em></p></li>
<li><p>Using Github (from source):</p>
<pre><code>$ git clone https://github.com/grafana-wizzy/wizzy.git
$ cd wizzy
$ npm install
$ npm link
</code></pre></li>
</ol>
<h2 id="initialization">Initialization</h2>
<p>Once <code>wizzy</code> is installed, it needs to be initialized to serve you with the awesome commands it has. These are the most important steps to setup wizzy.</p>
<ol>
<li><p>Check wizzy version</p>
<pre><code>$ wizzy version
</code></pre></li>
<li><p>Create a local directory for storing Grafana entities.</p>
<pre><code>$ mkdir DIRECTORY_NAME
$ cd DIRECTORY_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ mkdir grafana-entities
$ cd grafana-entities
</code></pre></li>
<li><p>Best practice - Initialize git repo in your grafana-entities directory. Its an optional step and should be used if you need version control for your Grafana entities such as dashboards, datasources, etc.</p>
<pre><code>$ git init
</code></pre></li>
<li><p>Initialize wizzy</p>
<pre><code>$ wizzy init
</code></pre></li>
<li><p>Connect to Grafana by setting Grafana properties in wizzy&rsquo;s config. Please set your Grafana username and password if anonymous access to Grafana is disabled.</p>
<pre><code>$ wizzy set grafana url GRAFANA_URL
$ wizzy set grafana username YOUR_USERNAME
$ wizzy set grafana password YOUR_PASSWORD
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy set grafana url http://localhost:3000
$ wizzy set grafana username admin
$ wizzy set grafana password admin
</code></pre>
<p><em>Note: Add <code>conf</code> directory to .gitignore to avoid checking in your credentials into git repo.</em></p></li>
<li><p>Test wizzy setup</p>
<pre><code>$ wizzy status
</code></pre></li>
</ol>
<p>You are ready to use wizzy. Check out <a href="https://grafana-wizzy.com/examples">examples</a>!</p>
</description>
</item>
<item>
<title>Row Commands</title>
<link>https://grafana-wizzy.com/local-commands/row-commands/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/local-commands/row-commands/</guid>
<description><p>Following commands are used to operate on rows in json files stored locally under dashboards/rows directory. These commands need Dashboard Context. Please set Dashboard Context before using them.</p>
<ul>
<li><p><strong>copy</strong> - Copies a row from one position to another. This command can be used to copy a row on the same dashboard and as well as to copy a row to other dashboards.</p>
<pre><code>$ wizzy copy row SOURCE DESTINATION
</code></pre>
<p><em><code>SOURCE</code></em> represents row number on the dashboard in context. Should be a <code>ROW_NUMBER</code>.
<em><code>DESTINATION</code></em> can represent a row number on the same dashboard or on a different dashboard. Can be a <code>ROW_NUMBER</code> or <code>DASHBOARD_SLUG.ROW_NUMBER</code>.
<em>For example, If you want to copy 2nd row as 4th row in the context dashboard, use:</em></p>
<pre><code>$ wizzy copy row 2 4
</code></pre>
<p><em>For example, If you want to copy 2nd row from the context dashboard as 1st row in some other dashboard, use:</em></p>
<pre><code>$ wizzy copy row 2 cpu-stats.1
</code></pre></li>
<li><p><strong>move</strong> - Moves a row from one position to another. This command can be used to move a row on the same dashboard and as well as to move a row to other dashboards.</p>
<pre><code>$ wizzy move row SOURCE DESTINATION
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy move row 2 4
$ wizzy move row 2 cpu-stats.1
</code></pre></li>
<li><p><strong>remove</strong> - Removes a row from the context dashboard</p>
<pre><code>$ wizzy remove row ROW_NUMBER
</code></pre>
<p><em><code>ROW_NUMBER</code></em> represents row number on the dashboard in context.
<em>For example, to delete 2nd row from your local json:</em></p>
<pre><code>$ wizzy remove row 2
</code></pre></li>
<li><p><strong>extract</strong> - Copies row json object and saves it as a separate file under rows directory. This command is useful if you want to re-use this row in many dashboards. Later you can use <code>insert</code> command to insert this row into any dashboard. Needs dashboard context to be set.</p>
<pre><code>$ wizzy extract row ROW_NUMBER ROW_NAME
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy extract row 2 memory-stats-row
</code></pre></li>
<li><p><strong>insert</strong> - Inserts an extracted row from rows directory into a dashboard. If <code>DASHBOARD_SLUG</code> is not specified then this command will insert the row in context dashboard.</p>
<pre><code>$ wizzy insert row ROW_NAME &lt;DESTINATION_SLUG&gt;
</code></pre>
<p><em>For example:</em></p>
<pre><code>$ wizzy insert row memory-stats-row
$ wizzy insert row memory-stats-row cassandra-stats
</code></pre></li>
</ul>
<p>_Note: ROW<em>NUMBER starts from 1.</em></p>
</description>
</item>
<item>
<title>Store Dashboards in AWS S3</title>
<link>https://grafana-wizzy.com/examples/store-dashboards-in-aws-s3/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://grafana-wizzy.com/examples/store-dashboards-in-aws-s3/</guid>
<description><ol>
<li><p>Download wizzy and initialize the directory with git as specified in the instructions. Instructions are here - <a href="https://grafana-wizzy.com/home/getting-started">Installation</a></p></li>
<li><p>Set Grafana properties if not set already:</p>
<pre><code>$ wizzy set grafana url http://localhost:3000
$ wizzy set grafana username admin
$ wizzy set grafana password password
</code></pre></li>
<li><p>Import all Grafana dashboards:</p>
<pre><code>$ wizzy import dashboards
</code></pre></li>
<li><p>Have you aws config stored at its standard location ~/.aws/config</p></li>
<li><p>Set S3 Bucket name.</p>
<pre><code>$ wizzy set s3 bucket_name grafana-setup
$ wizzy upload to-s3 dashboards
</code></pre></li>
</ol>
<p>You dashboards are stored have been uploaded to AWS S3 now!</p>
</description>
</item>
</channel>
</rss>