diff --git a/docs/sources/dashboards/_index.md b/docs/sources/dashboards/_index.md index 23bd4880877..83bad923220 100644 --- a/docs/sources/dashboards/_index.md +++ b/docs/sources/dashboards/_index.md @@ -45,7 +45,7 @@ Dashboards can use [templating]({{< relref "../variables/templates-and-variables Dashboards can use [annotations]({{< relref "annotations.md" >}}) to display event data across panels. This can help correlate the time series data in the panel with other events. -Dashboards can be [shared]({{< relref "../reference/share_dashboard.md" >}}) easily in a variety of ways. +Dashboards can be [shared]({{< relref "share-dashboard.md" >}}) easily in a variety of ways. Dashboards can be tagged, and the dashboard picker provides quick, searchable access to all dashboards in a particular organization. diff --git a/docs/sources/reference/export_import.md b/docs/sources/dashboards/export-import.md similarity index 97% rename from docs/sources/reference/export_import.md rename to docs/sources/dashboards/export-import.md index 3bbda6f018f..b37a5077840 100644 --- a/docs/sources/reference/export_import.md +++ b/docs/sources/dashboards/export-import.md @@ -1,13 +1,14 @@ +++ -title = "Export and Import" +title = "Export and import" keywords = ["grafana", "dashboard", "documentation", "export", "import"] type = "docs" +aliases = ["/docs/grafana/latest/reference/export_import/"] [menu.docs] parent = "dashboard_features" -weight = 8 +weight = 800 +++ -# Export and Import +# Export and import Grafana Dashboards can easily be exported and imported, either from the UI or from the [HTTP API]({{< relref "../http_api/dashboard.md#create-update-dashboard" >}}). diff --git a/docs/sources/reference/dashboard.md b/docs/sources/dashboards/json-model.md similarity index 98% rename from docs/sources/reference/dashboard.md rename to docs/sources/dashboards/json-model.md index c9dec9e1dc7..f7807b2dce9 100644 --- a/docs/sources/reference/dashboard.md +++ b/docs/sources/dashboards/json-model.md @@ -1,14 +1,15 @@ +++ -title = "JSON Model" +title = "JSON model" keywords = ["grafana", "dashboard", "documentation", "json", "model"] type = "docs" +aliases = ["/docs/grafana/latest/reference/dashboard/"] [menu.docs] name = "JSON Model" parent = "dashboard_features" -weight = 100 +weight = 1200 +++ -# Dashboard JSON +# Dashboard JSON model A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, panel queries, etc. diff --git a/docs/sources/reference/scripting.md b/docs/sources/dashboards/scripted-dashboards.md similarity index 86% rename from docs/sources/reference/scripting.md rename to docs/sources/dashboards/scripted-dashboards.md index 8a8ea8ee7ef..7ebf7e8851c 100644 --- a/docs/sources/reference/scripting.md +++ b/docs/sources/dashboards/scripted-dashboards.md @@ -1,15 +1,16 @@ +++ -title = "Scripted Dashboards" +title = "Scripted dashboards" keywords = ["grafana", "dashboard", "documentation", "scripted"] type = "docs" +aliases = ["/docs/grafana/latest/reference/scripting/"] [menu.docs] parent = "dashboard_features" -weight = 9 +weight = 1500 +++ -> This feature is deprecated and will be removed in a future release +# Scripted dashboards -# Scripted Dashboards +> **Warning:** This feature is deprecated and will be removed in a future release. If you have lots of metric names that change (new servers etc) in a defined pattern it is irritating to constantly have to create new dashboards. diff --git a/docs/sources/reference/share_dashboard.md b/docs/sources/dashboards/share-dashboard.md similarity index 93% rename from docs/sources/reference/share_dashboard.md rename to docs/sources/dashboards/share-dashboard.md index c324c68cc54..d606353da6c 100644 --- a/docs/sources/reference/share_dashboard.md +++ b/docs/sources/dashboards/share-dashboard.md @@ -1,10 +1,11 @@ +++ -title = "Sharing a Dashboard" +title = "Share dashboard" keywords = ["grafana", "dashboard", "documentation", "sharing"] type = "docs" +aliases = ["/docs/grafana/latest/reference/share_dashboard/"] [menu.docs] parent = "dashboard_features" -weight = 6 +weight = 500 +++ # Share dashboard diff --git a/docs/sources/reference/share_panel.md b/docs/sources/dashboards/share-panel.md similarity index 96% rename from docs/sources/reference/share_panel.md rename to docs/sources/dashboards/share-panel.md index e46142ccc7a..9f7bfd50cb8 100644 --- a/docs/sources/reference/share_panel.md +++ b/docs/sources/dashboards/share-panel.md @@ -1,13 +1,14 @@ +++ -title = "Sharing a Panel" +title = "Share panel" keywords = ["grafana", "dashboard", "documentation", "sharing"] type = "docs" +aliases = ["/docs/grafana/latest/reference/share_panel/"] [menu.docs] parent = "dashboard_features" -weight = 6 +weight = 600 +++ -# Share Panel +# Share a panel Click a panel title to open the panel menu, then click share in the panel menu to open the Share Panel dialog. Here you have access to a link that will take you to exactly this panel with the current time range and selected template variables. Below are ways to share a panel. diff --git a/docs/sources/developers/plugins/legacy/snapshot-mode.md b/docs/sources/developers/plugins/legacy/snapshot-mode.md index aec1a449967..5e41963de65 100644 --- a/docs/sources/developers/plugins/legacy/snapshot-mode.md +++ b/docs/sources/developers/plugins/legacy/snapshot-mode.md @@ -8,7 +8,7 @@ aliases = ["/docs/grafana/latest/plugins/developing/snapshot-mode/"] {{< imgbox img="/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}} -Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../reference/share_dashboard.md" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](http://snapshot.raintank.io/) if you want to send the snapshot to someone who does not have access to your Grafana server. +Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/json-model.md" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](http://snapshot.raintank.io/) if you want to send the snapshot to someone who does not have access to your Grafana server. {{< imgbox img="/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}} diff --git a/docs/sources/installation/upgrading.md b/docs/sources/installation/upgrading.md index d9090b150c0..ee08f785898 100755 --- a/docs/sources/installation/upgrading.md +++ b/docs/sources/installation/upgrading.md @@ -125,7 +125,7 @@ grafana-cli plugins update-all The dashboard grid layout engine has changed. All dashboards will be automatically upgraded to new positioning system when you load them in v5. Dashboards saved in v5 will not work in older versions of Grafana. Some external panel plugins might need to be updated to work properly. -For more details on the new panel positioning system, [click here]({{< relref "../reference/dashboard.md#panel-size-position" >}}) +For more details on the new panel positioning system, [click here]({{< relref "../dashboards/json-model.md#panel-size-position" >}}) ## Upgrading to v5.2 diff --git a/docs/sources/menu.yaml b/docs/sources/menu.yaml index acc7fff6d2b..2731e5263de 100644 --- a/docs/sources/menu.yaml +++ b/docs/sources/menu.yaml @@ -238,13 +238,13 @@ name: Playlist - link: /dashboards/search/ name: Search - - link: /reference/share_dashboard/ - name: Sharing a dashboard - - link: /reference/share_panel/ - name: Sharing a panel + - link: /dashboards/share-dashboard/ + name: Share dashboard + - link: /dashboards/share-panel/ + name: Share a panel - link: /dashboards/time-range-controls/ name: Time range controls - - link: /reference/export_import/ + - link: /dashboards/export-import/ name: Export and import - link: /dashboards/dashboard_history/ name: Dashboard version history @@ -252,9 +252,9 @@ link: /dashboards/shortcuts/ - name: Reporting link: /dashboards/reporting/ - - link: /reference/dashboard/ - name: JSON Model - - link: /reference/scripting/ + - link: /dashboards/json-model/ + name: JSON model + - link: /dashboards/scripted-dashboards/ name: Scripted dashboards - name: Explore link: /explore/ diff --git a/docs/sources/reference/_index.md b/docs/sources/reference/_index.md deleted file mode 100644 index d6edbafa14d..00000000000 --- a/docs/sources/reference/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Reference Index -description: Grafana docs reference -type: docs ---- - -# References - -This section contains reference pages for Grafana features. diff --git a/docs/sources/tutorials/stack_guide_graphite.md b/docs/sources/tutorials/stack_guide_graphite.md deleted file mode 100644 index db42ca674e3..00000000000 --- a/docs/sources/tutorials/stack_guide_graphite.md +++ /dev/null @@ -1,263 +0,0 @@ ---- -page_title: Graphite + Grafana + StatsD - Stack Setup Guide -page_description: Installation and configuration guide and how to for Grafana, Graphite and StatsD -page_keywords: grafana, tutorials, graphite, statsd, setup, configuration, howto, installation -author: Torkel Ödegaard ---- - -# Stack Setup and Config Guide: Graphite + Grafana + StatsD - -This lengthy article will guide you through installation, configuration and getting started with the amazing metric -stack that is composed of Graphite, Grafana and StatsD. - -Graphite is still king when it comes to time series databases due to its simple data model, ingestion -with integrated aggregation and rollups, amazing query features and speed. No other time series -database has yet to match Graphite's query flexibility and analytics potential. - -Graphite has a reputation for being tricky to install and scale. This guide aims to show -that is not really the case, or, at least, that it is a lot better than you expect. - -> This is an install guide that also teaches you -> of the mechanics of metric collection, aggregation and querying. How Graphite -> stores and aggregates data is very important to understand in order to not -> get mislead by graphs. - -## Installation - Ubuntu - -To begin with we are going to install the 3 main components that define our metric stack. Later in the guide we will -install StatsD, but that is optional. - -- Carbon is the graphite ingestion daemon responsible for -receiving metrics and storing them. -- Graphite-api is light weight version of graphite-web with only the HTTP API and is -responsible for executing metric queries. -- Grafana as the frontend to visualize metrics and the tool to help you build metric -queries that will make the most out of your collected metrics. - -### Carbon - -Graphite and Carbon are written in python, so we will start by installing python packages. - -``` -apt-get install \ - git \ - build-essential \ - libffi-dev libcairo2-dev \ - python-django \ - python-django-tagging \ - python-simplejson \ - python-memcache \ - python-ldap \ - python-cairo \ - python-twisted \ - python-pysqlite2 \ - python-support \ - python-dev \ - python-pip -``` - -Next we will clone carbon and whisper and install these components. Whisper is just a lib used -by carbon to write metrics to disk. - - cd /usr/local/src - git clone --depth 1 https://github.com/graphite-project/carbon.git - git clone --depth 1 https://github.com/graphite-project/whisper.git - - cd whisper && python setup.py install && cd .. - cd carbon && python setup.py install && cd .. - -### Configure carbon.conf - -Copy example carbon config: -``` -cp /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf -``` - -Edit the config file `/opt/graphite/conf/carbon.conf`, find line `ENABLE_UDP_LISTENER` and -change this setting to `True`. - -### Configure storage-schemas.conf - -Create a new file at `/opt/graphite/conf/storage-schemas.conf` with the following content: - -``` -[carbon] -pattern = ^carbon\..* -retentions = 1m:30d,10m:1y,1h:5y - -[default] -pattern = .* -retentions = 10s:1d,1m:7d,10m:1y -``` - -This config specifies the resolution of metrics and the retention periods. For example for all metrics beginning with the word `carbon` receive metrics every minute and store for 30 days, then -roll them up into 10 minute buckets and store those for 1 year, then roll those up into 1 hour buckets and store those for 5 years. For all other metrics -the default rule will be applied with other retention periods. - -This configuration is very important, as the first retention period must match the rate at which you send metrics. The default rule has 10 seconds -as its first resolution so when configuring StatsD we should configure it to send metrics every 10 seconds. - -> If you send values more frequently than the highest resolution, for example if you send data every second but -> the storage schema rules defines the highest resolution to be 10 seconds, then the values you send will just -> overwrite each other and the last value sent during every 10 second period will be saved. StatsD can work around this -> problem. - -### Configure storage-aggregation.conf - -Copy the default config and open it in an editor. -``` -cp /opt/graphite/conf/storage-aggregation.conf.example /opt/graphite/conf/storage-aggregation.conf -``` - -Example config: -``` -[min] -pattern = \.min$ -xFilesFactor = 0.1 -aggregationMethod = min - -[max] -pattern = \.max$ -xFilesFactor = 0.1 -aggregationMethod = max - -[sum] -pattern = \.count$ -xFilesFactor = 0 -aggregationMethod = sum - -[default_average] -pattern = .* -xFilesFactor = 0.5 -aggregationMethod = average -``` - -You do not really need to change the default config, but is very important to -understand what the config controls and what implications that it has. Graphite -does rollups as part of the metric ingestion according to the rules defined in -`storage-schemas.conf`. For example, given storage schema rule `10s:1d,1m:7d`, -when aggregating 6 values (each representing 10 seconds) into a 1min bucket graphite -will use an `aggregationMethod` like for example `average`. What method to use -will be determined by the rules specified in `storage-aggregation.conf`. - -The default rules all look at the metric path ending. Does it end with `.count` then use `sum` when doing rollups, does it end with `max` then use `max` function, and if it does not -end with max, min or count then use average. This means that naming metrics is very important! But don't worry if you use StatsD it will send the correct names to graphite. - -### Start carbon -Lets install supervisord and let it start carbon. - -`apt-get install supervisor` - -Create a new file in `/etc/supervisor/conf.d/carbon.conf` with the following: - -``` -[program:carbon-cache] -command = /opt/graphite/bin/carbon-cache.py --debug start -stdout_logfile = /var/log/supervisor/%(program_name)s.log -stderr_logfile = /var/log/supervisor/%(program_name)s.log -autorestart = true -stopsignal = QUIT -``` - -``` -supervisorctl reload -``` - -### Graphite-api - -Graphite api is a light weight version of graphite-web with only the API component (no web ui). It is dead simple -to install. - -``` -pip install gunicorn graphite-api -``` - -You should now have a graphite-api daemon running with an open HTTP API port of 8888. - -### Configuring Graphite-api - -Create a file `/etc/graphite-api.yaml` with an editor and set it's content to: - -``` -search_index: /opt/graphite/storage/index -finders: - - graphite_api.finders.whisper.WhisperFinder -functions: - - graphite_api.functions.SeriesFunctions - - graphite_api.functions.PieFunctions -whisper: - directories: - - /opt/graphite/storage/whisper -time_zone: UTC -``` - -Lets create a supervisor file for graphite-api at `/etc/supervisor/graphite-api.conf` - -``` -[program:graphite-api] -command = gunicorn -b 0.0.0.0:8888 -w 2 --log-level info graphite_api.app:app -stdout_logfile = /var/log/supervisor/%(program_name)s.log -stderr_logfile = /var/log/supervisor/%(program_name)s.log -autorestart = true -stopsignal = QUIT -``` - -Reload supervisor - - supervisorctl reload - -A carbon-cache daemon and graphite-api should now be running. Type `supervisorctl status` to verify that they are running. You can -also open `http://your_server_ip:8888/metrics/find?query?*` in your browser. You should see a json snippet. - - -### Install Grafana - - cd /tmp/ - wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.1.1_amd64.deb - sudo dpkg -i grafana_2.1.1_amd64.deb - sudo service grafana-server start - -Grafana should now be running with default config on port 3000. - -## Grafana - first steps - -### Add data source - -Open http://your_server_ip:3000 in your browser and login with the default user and password (`admin/admin`). - -- Click on `Data Sources` on the side menu. -- Click on `Add new` in the top menu -- Specify name `graphite` and check the `Default ` checkbox -- Specify URL `http://localhost:8888` and Access `proxy` -- Click `Add ` button - -### Your first dashboard - -- Click on `Dashboards` -- Click on `Home` button in the top menu, this should open the dashboard search dropdown -- Click on `New` button in the bottom of this dropdown - -### Add a graph - -- Click on the green icon to the left to open the row menu -- Select `Add Panel` > `Graph` from the row menu -- An empty graph panel should appear with title `no title (click here)`. Click on this title and then `Edit` -- This will open the graph in edit mode and take you to the metrics tab. -- There is one query already added (assigned letter A) but it is empty. -- Click on `select metric` to pick the first graphite metric node. A new `select metric` link will appear until you reached a leaf node. -- Try picking the metric paths for `carbon.agents..cpuUsage`, you should now see a line appear in the graph! - -## Writing metrics to Graphite -Graphite has the simplest metric write protocol imaginable. Something that has surely contributed to its wide adoption by metric -frameworks and numerous integrations. - - prod.server1.requests.count 10 1398969187 - - - -There are hundreds of tools and instrumentation frameworks that can send metrics using this protocol. - -### Installing StatsD -StatsD is a metrics aggregation daemon that makes it easy for apps on many machines to send measurements like timings and counters and have them aggregated or percentiles calculated. - -### Sending metrics to StatsD