Commit eb985ffb by Diana Payton Committed by GitHub

Docs: Add troubleshooting content (#26871)

* added folder and moved content

* added content

* updated content

* added content

* Update troubleshoot-dashboards.md

* added content
parent 02e4c2bb
...@@ -95,8 +95,6 @@ ...@@ -95,8 +95,6 @@
link: /tutorials/ha_setup/ link: /tutorials/ha_setup/
- name: Change home dashboard - name: Change home dashboard
link: /administration/change-home-dashboard/ link: /administration/change-home-dashboard/
- name: Troubleshooting
link: /installation/troubleshooting/
- name: Manage users - name: Manage users
link: /manage-users link: /manage-users
children: children:
...@@ -435,6 +433,16 @@ ...@@ -435,6 +433,16 @@
link: /http_api/team/ link: /http_api/team/
- name: Users API - name: Users API
link: /http_api/user/ link: /http_api/user/
- name: Troubleshooting
children:
- name: Overview
link: /troubleshooting/
- name: Enable diagnostics
link: /troubleshooting/diagnostics/
- name: Troubleshoot dashboards
link: /troubleshooting/troubleshoot-dashboards/
- name: Troubleshoot queries
link: /troubleshooting/troubleshoot-queries/
- name: Developers - name: Developers
children: children:
- name: Plugins - name: Plugins
......
...@@ -48,7 +48,7 @@ View raw query results in a table. This is the data returned by the query with t ...@@ -48,7 +48,7 @@ View raw query results in a table. This is the data returned by the query with t
1. If your panel contains multiple queries or queries multiple nodes, then you have additional options. 1. If your panel contains multiple queries or queries multiple nodes, then you have additional options.
* **Select result -** Choose which result set data you want to view. * **Select result -** Choose which result set data you want to view.
* **Transform data** * **Transform data**
* **Join by time -** View raw data from all your queries at once, one result set per column. Click a column heading to reorder the data. - **Join by time -** View raw data from all your queries at once, one result set per column. Click a column heading to reorder the data.
View raw query results in a table with field options and options overrides applied: View raw query results in a table with field options and options overrides applied:
1. Open the **Data** tab in panel inspector. 1. Open the **Data** tab in panel inspector.
......
+++
title = "Troubleshooting"
description = "Guide to troubleshooting Grafana problems"
keywords = ["grafana", "troubleshooting", "documentation", "guide"]
type = "docs"
[menu.docs]
weight = 100
+++
# Troubleshooting
This page lists some tools and advice to help troubleshoot common Grafana issues.
## Troubleshoot with logs
If you encounter an error or problem, then you can check the Grafana server log. Usually located at `/var/log/grafana/grafana.log` on Unix systems or in `<grafana_install_dir>/data/log` on other platforms and manual installations.
You can enable more logging by changing log level in the Grafana configuration file.
For more information, refer to [Enable debug logging in Grafana CLI]({{< relref "../administration/cli.md#enable-debug-logging" >}}) and the [log section in Configuration]({{< relref "../administration/configuration.md#log" >}}).
## Troubleshoot transformations
Order of transformations matters. If the final data output from multiple transformations looks wrong, try changing the transformation order. Each transformation transforms data returned by the previous transformation, not the original raw data.
For more information, refer to [Debug transformations]({{< relref "../panels/transformations.md#debug-transformations" >}}).
## Text missing with server-side image rendering (RPM-based Linux)
Server-side image (png) rendering is a feature that is optional but very useful when sharing visualizations, for example in alert notifications.
If the image is missing text, then make sure you have font packages installed.
```bash
sudo yum install fontconfig
sudo yum install freetype*
sudo yum install urw-fonts
```
## FAQs
Check out the [FAQ section](https://community.grafana.com/c/howto/faq) on the Grafana Community page for answers to frequently
asked questions.
+++ +++
title = "Troubleshooting" title = "Enable diagnostics"
description = "Guide to troubleshooting Grafana problems"
keywords = ["grafana", "troubleshooting", "documentation", "guide"]
type = "docs" type = "docs"
[menu.docs] [menu.docs]
parent = "admin" weight = 200
weight = 8
+++ +++
# Enable diagnostics
# Troubleshooting You can set up the `grafana-server` process to enable certain diagnostics when it starts. This can be helpful
This page lists some useful tools to help troubleshoot common Grafana issues.
## Visualization and query issues
{{< imgbox max-width="40%" img="/img/docs/v45/query_inspector.png" caption="Query Inspector" >}}
The most common problems are related to the query and response from your data source. Even if it looks
like a bug or visualization issue in Grafana, it is almost always a problem with the data source query or
the data source response.
To check this you should use query inspector, which was added in Grafana 4.5. The query inspector shows query requests and responses. Refer to the data source page for more information.
For more on the query inspector read the Grafana Community article [Using Grafana’s Query Inspector to troubleshoot issues](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630). For older versions of Grafana, refer to the [How troubleshoot metric query issue](https://community.grafana.com/t/how-to-troubleshoot-metric-query-issues/50/2) article.
## Logging
If you encounter an error or problem, then you can check the Grafana server log. Usually located at `/var/log/grafana/grafana.log` on Unix systems or in `<grafana_install_dir>/data/log` on other platforms and manual installations.
You can enable more logging by changing log level in the Grafana configuration file.
## Diagnostics
The `grafana-server` process can be instructed to enable certain diagnostics when it starts. This can be helpful
when investigating certain performance problems. It's *not* recommended to have these enabled by default. when investigating certain performance problems. It's *not* recommended to have these enabled by default.
### Profiling ## Turn on profiling
The `grafana-server` can be started with the arguments `-profile` to enable profiling and `-profile-port` to override The `grafana-server` can be started with the arguments `-profile` to enable profiling and `-profile-port` to override
the default HTTP port (`6060`) where the pprof debugging endpoints will be available, e.g. the default HTTP port (`6060`) where the `pprof` debugging endpoints are available, for example:
```bash ```bash
./grafana-server -profile -profile-port=8080 ./grafana-server -profile -profile-port=8080
...@@ -56,19 +30,7 @@ export GF_DIAGNOSTICS_PROFILING_PORT=8080 ...@@ -56,19 +30,7 @@ export GF_DIAGNOSTICS_PROFILING_PORT=8080
Refer to [Go command pprof](https://golang.org/cmd/pprof/) for more information about how to collect and analyze profiling data. Refer to [Go command pprof](https://golang.org/cmd/pprof/) for more information about how to collect and analyze profiling data.
### Server side image rendering (RPM-based Linux) ## Use tracing
Server side image (png) rendering is a feature that is optional but very useful when sharing visualizations, for example in alert notifications.
If the image is missing text make sure you have font packages installed.
```bash
sudo yum install fontconfig
sudo yum install freetype*
sudo yum install urw-fonts
```
### Tracing
The `grafana-server` can be started with the arguments `-tracing` to enable tracing and `-tracing-file` to override the default trace file (`trace.out`) where trace result is written to. For example: The `grafana-server` can be started with the arguments `-tracing` to enable tracing and `-tracing-file` to override the default trace file (`trace.out`) where trace result is written to. For example:
...@@ -93,8 +55,3 @@ go tool trace <trace file> ...@@ -93,8 +55,3 @@ go tool trace <trace file>
``` ```
See [Go command trace](https://golang.org/cmd/trace/) for more information about how to analyze trace files. See [Go command trace](https://golang.org/cmd/trace/) for more information about how to analyze trace files.
\ No newline at end of file
## FAQs
Check out the [FAQ section](https://community.grafana.com/c/howto/faq) on the Grafana Community page for answers to frequently
asked questions.
+++
title = "Troubleshoot dashboards"
description = "Guide to troubleshooting Grafana dashboards"
keywords = ["grafana", "troubleshooting", "documentation", "dashboards"]
type = "docs"
[menu.docs]
weight = 100
+++
# Troubleshoot dashboards
This page provides information to solve common dashboard problems.
## Dashboard is slow
- Are you trying to render dozens (or hundreds or thousands) of time-series on a graph? This can cause the browser to lag and feel sluggish. Try using functions like `highestMax` (in Graphite) to reduce the returned series.
- Sometimes the series names can be very large. This causes larger response sizes. Try using `alias` to reduce the size of the returned series names.
- Are you querying many time-series or for a long range of time? Both of these can cause Grafana or your data source to pull in a lot of data, which may slow it down.
- It could be high load on your network infrastructure. If the slowness isn't consistent, this may be the problem.
## Dashboard refresh rate issues
By default, Grafana queries your data source every 30 seconds. Setting a low refresh rate on your dashboards puts unnecessary stress on the backend. In many cases, querying this frequently makes no sense, because the data isn't being sent to the system such that changes would be seen.
We recommend the following:
- Do not enable auto-refreshing on dashboards, panels, or variables unless you need it. Users can refresh their browser manually, or you can set the refresh rate for a time period that makes sense (every ten minutes, every hour, and so on).
- If it is required, then set the refresh rate to once a minute. Again, users can always refresh the dashboard manually.
- If your dashboard has a longer time period (such as a week), then you really don't need automated refreshing.
### Handling or rendering null data is wrong/confusing/weird
Some applications publish data intermittently; for example, they only post a metric when an event occurs. By
default, Grafana graphs connect lines between the data points. This can be very deceiving.
In the picture below we have enabled:
- Points and 3-point radius to highlight where data points are actually present.
- **Null value** is set to **connected**.
{{< docs-imagebox img="/img/docs/troubleshooting/grafana_null_connected.png" max-width="1200px" >}}
In this graph, we set graph to show bars instead of lines and set the **Null value** to graph **null as zero**. There is a very big different in the visuals.
{{< docs-imagebox img="/img/docs/troubleshooting/grafana_null_zero.png" max-width="1200px" >}}
+++
title = "Troubleshoot queries"
description = "Guide to troubleshooting Grafana queries"
keywords = ["grafana", "troubleshooting", "documentation", "guide", "queries"]
type = "docs"
[menu.docs]
weight = 400
+++
# Troubleshoot queries
This page provides information to solve common dashboard problems.
### I get different results when I rearrange my functions
Function order is very important. Just like in math, the order that you place your functions can affect the result.
## Inspect your query request and response
The most common problems are related to the query and response from your data source. Even if it looks
like a bug or visualization issue in Grafana, it is almost always a problem with the data source query or
the data source response. Start by inspecting your panel query and response.
For more information, refer to [Inspect a panel]({{< relref "../panels/inspect-panel.md" >}}).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment