Sample Grafana dashboard JSON code

The following JSON code is an example metrics dashboard. Copy and save it to a .json file to reuse it.

For details, see Sample Grafana dashboard graphs
{
  "title": "master",
  "services": {
    "filter": {
      "list": [],
      "time": {
        "from": "now-15m",
        "to": "now"
      }
    }
  },
  "rows": [
    {
      "title": "Puppet Master Requests",
      "height": "300px",
      "editable": true,
      "collapse": false,
      "collapsable": true,
      "panels": [
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "short",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.num-cpus,'num cpus')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.active-requests.count,'active requests')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.active-histo.mean,'average')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "Active Requests"
        },
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "ms",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.http.puppet-v3-catalog-.*.-requests.mean,'catalog')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.puppet-v3-report-.*.-requests.mean,'report')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.puppet-v3-node-.*.-requests.mean,'node')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.puppet-v3-file_metadatas-.*.-requests.mean,'file_metadatas')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.puppet-v3-file_metadata-.*.-requests.mean,'file_metadata')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.puppet-v3-file_content-.*.-requests.mean,'file_content')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.other-requests.mean,'other')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.http.total-requests.mean,'all')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "Request Durations"
        },
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "short",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)",
            "thresholdLine": false
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": true,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "individual",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(scale(puppetlabs.master.example.com.http.puppet-v3-catalog-.*.-percentage,100),'catalog')",
              "hide": false
            },
            {
              "target": "alias(scale(puppetlabs.master.example.com.http.puppet-v3-report-.*.-percentage,100),'report')"
            },
            {
              "target": "alias(scale(puppetlabs.master.example.com.http.puppet-v3-node-.*.-percentage,100),'node')"
            },
            {
              "target": "alias(scale(puppetlabs.master.example.com.http.puppet-v3-file_metadatas-.*.-percentage,100),'file_metadatas')"
            },
            {
              "target": "alias(scale(puppetlabs.master.example.com.http.puppet-v3-file_metadata-.*.-percentage,100),'file_metadata')"
            },
            {
              "target": "alias(scale(puppetlabs.master.example.com.http.puppet-v3-file_content-.*.-percentage,100),'file_content')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "Request Ratios",
          "leftYAxisLabel": "Percentage of Requests",
          "rightYAxisLabel": ""
        }
      ],
      "notice": false
    },
    {
      "title": "Catalog Compilation",
      "height": "300px",
      "editable": true,
      "collapse": false,
      "collapsable": true,
      "panels": [
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "ms",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.compiler.compile.mean,'compile')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.functions.mean,'function calls')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.compiler.find_node.mean,'find_node')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.compiler.static_compile.mean,'static compile')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.compiler.static_compile_postprocessing.mean,'static compile postprocessing')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.compiler.find_facts.mean,'find_facts')"
            }
          ],
          "aliasColors": {
            "create scope": "#BADFF4"
          },
          "aliasYAxis": {},
          "title": "Compilation"
        },
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "ms",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.puppetdb.catalog.save.mean,'catalog save')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.puppetdb.command.submit.mean,'command submit')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.puppetdb.report.process.mean,'report process')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.puppetdb.facts.find.mean,'facts find')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "Communications with PuppetDB"
        },
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "ms",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.file-sync-storage.commit-timer.mean,'commit')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.file-sync-client.clone-timer.mean,'client clone')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.file-sync-client.fetch-timer.mean,'client fetch')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.file-sync-client.sync-timer.mean,'client sync')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "File Sync"
        }
      ],
      "notice": false
    },
    {
      "title": "JRuby Metrics",
      "height": "300px",
      "editable": true,
      "collapse": false,
      "collapsable": true,
      "panels": [
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "short",
            "short"
          ],
          "grid": {
            "max": null,
            "min": 0,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.jruby.num-jrubies,'num jrubies')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.jruby.num-free-jrubies,'num free jrubies')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.jruby.free-jrubies-histo.mean,'average free jrubies')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.jruby.requested-jrubies-histo.mean,'average requested jrubies')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "JRubies"
        },
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "ms",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.jruby.borrow-timer.mean,'borrow time')",
              "hide": false
            },
            {
              "target": "alias(puppetlabs.master.example.com.jruby.wait-timer.mean,'wait time')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.jruby.lock-held-timer.mean,'lock held time')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.jruby.lock-wait-timer.mean,'lock wait time')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "JRuby Timers"
        },
        {
          "span": 4,
          "editable": true,
          "type": "graphite",
          "loadingEditor": false,
          "datasource": null,
          "renderer": "flot",
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_formats": [
            "bytes",
            "short"
          ],
          "grid": {
            "max": null,
            "min": null,
            "threshold1": null,
            "threshold2": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "annotate": {
            "enable": false
          },
          "resolution": 100,
          "lines": true,
          "fill": 0,
          "linewidth": 1,
          "points": false,
          "pointradius": 5,
          "bars": false,
          "stack": false,
          "legend": {
            "show": true,
            "values": false,
            "min": false,
            "max": false,
            "current": false,
            "total": false,
            "avg": false
          },
          "percentage": false,
          "zerofill": true,
          "nullPointMode": "connected",
          "steppedLine": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "targets": [
            {
              "target": "alias(puppetlabs.master.example.com.memory.heap.used,'heap used')"
            },
            {
              "target": "alias(puppetlabs.master.example.com.memory.non-heap.used,'non-heap used')"
            }
          ],
          "aliasColors": {},
          "aliasYAxis": {},
          "title": "Memory Usage",
          "leftYAxisLabel": ""
        }
      ],
      "notice": false
    }
  ],
  "editable": true,
  "failover": false,
  "panel_hints": true,
  "style": "dark",
  "pulldowns": [
    {
      "type": "filtering",
      "collapse": false,
      "notice": false,
      "enable": false
    },
    {
      "type": "annotations",
      "enable": false
    }
  ],
  "nav": [
    {
      "type": "timepicker",
      "collapse": false,
      "notice": false,
      "enable": true,
      "status": "Stable",
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ],
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "now": true
    }
  ],
  "loader": {
    "save_gist": false,
    "save_elasticsearch": true,
    "save_local": true,
    "save_default": true,
    "save_temp": true,
    "save_temp_ttl_enable": true,
    "save_temp_ttl": "30d",
    "load_gist": false,
    "load_elasticsearch": true,
    "load_elasticsearch_size": 20,
    "load_local": false,
    "hide": false
  },
  "refresh": "10s",
  "tags": [],
  "timezone": "browser"
}