From 8e36676379ce9359978d387465ed34e14b83e203 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Thu, 15 Jul 2021 11:12:52 +0200 Subject: [PATCH] docs: add 'no data' troubleshooting guide --- docs/refs.rst | 1 + docs/troubleshooting.rst | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/refs.rst b/docs/refs.rst index 31e7a1e9..58361e02 100644 --- a/docs/refs.rst +++ b/docs/refs.rst @@ -1,3 +1,4 @@ +.. _pmlogger: https://man7.org/linux/man-pages/man1/pmlogger.1.html .. _pmproxy: https://man7.org/linux/man-pages/man1/pmproxy.1.html .. _pmseries: https://man7.org/linux/man-pages/man1/pmseries.1.html .. _pmwebapi: https://man7.org/linux/man-pages/man3/pmwebapi.3.html diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index cb6c4488..64234bfb 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -1,11 +1,30 @@ Troubleshooting =============== +.. include:: refs.rst + Common Problems --------------- -**When I try to add a datasource in Grafana, I get:** +HTTP Error 502: Bad Gateway, please check the datasource and pmproxy settings +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**When I try to add a datasource in Grafana, I get the following error:** **"HTTP Error 502: Bad Gateway, please check the datasource and pmproxy settings. To use this data source, please configure the URL in the query editor."** -- check if pmproxy is running: ``systemctl status pmproxy`` -- make sure that pmproxy was built with time-series (libuv) support enabled. You can find out if so in *$PCP_LOG_DIR/pmproxy/pmproxy.log* +* check if pmproxy is running: ``systemctl status pmproxy`` +* make sure that pmproxy was built with time-series (libuv) support enabled. You can verify that by reading the logfile in ``/var/log/pcp/pmproxy/pmproxy.log`` + + +PCP Redis +--------- + +Grafana doesn't show any data +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* Make sure that `pmlogger`_ is up and running, and writing archives to the disk (``/var/log/pcp/pmlogger//*``) +* Verify that `pmproxy`_ is running, time series support is enabled and a connection to Redis is established: check the logfile at ``/var/log/pcp/pmproxy/pmproxy.log`` and make sure that it contains the following text: ``Info: Redis slots, command keys, schema version setup`` +* Check if the Redis database contains any keys: ``redis-cli dbsize`` +* Check if any PCP metrics are in the Redis database: ``pmseries disk.dev.read`` +* Check if PCP metric values are in the Redis database: ``pmseries 'disk.dev.read[count:10]'`` +* Check the Grafana logs: ``journalctl -e -u grafana-server``