Giter Club home page Giter Club logo

couchbase-query-grafana's Introduction

Couchbase Query Grafana Dashboards

Collection of Grafana Dashboards for the Couchbase Query Service.

The dashboards leverage the Grafana plugin JSON API Datasource from Marcus Olsson by calling the Query Service REST API

Data Source Setup

Once the JSON API is installed, a datasource will need to be configured for each of the Couchbase Nodes running the Query Service.

  1. In Grafana, navigate to Data Sources and select Add data source
  2. From the list of data-sources select JSON API
  3. Enter a name for the datasource, this can be whatever you prefer. A suggestion for multiple clusters might be Name of Cluster - node hostname
  4. In the URL field enter http://HOSTNAME:8093
  • If you are using SSL, enter https://HOSTNAME:18093
  • Replace HOSTNAME with the configured hostname or IP address
  1. In the "Auth" section check Basic Auth and With Credentials
  • If using SSL, check Skip TLS Verify
  1. Enter an RBAC Username and Password. Note that the RBAC user must have access to Query System Catalogs
  2. Select the Save & Test button, note that you will get an error that says JSON API: Not Found, this can be ignored as the datasource is saved. This is due to no endpoints being configured as they are configured in the dashboards themselves.

Repeat this process for each query node that you wish to configure. By default each of the dashboards is setup with variable for the $datasource that will automatically show a list of each datasource configured using the JSON API Datasource plugin.


Dashboards

The dashboards can be imported into Grafana, by navigating to Manage Dashboards and selecting the Import option. The dashboard json can be copied and pasted directly into the UI or uploaded.


Slow Queries Dashboard

The slow queries dashboard will query and display information from the system:completed_requests keyspace. Many of these queries are adapted from the Couchbase Connect Online: Identifying and Tuning Slow Queries Presentation. While the system:completed_requests keyspace is global, the N1QL queries performed by the dashboard are limited in scope to a single query node for minimal impact and performance.

Filters
  • Datasource
  • User (default: All)
  • Limit (default: 25)
Charts/Stats
  • Count of Slow Queries
  • Sum of Slow Query Fetches
  • Sum of Slow Query Response Bytes
  • Total Queries by User
  • Query Selectivity Percentile Breakdown
  • Elapsed Time Percentile Breakdown
  • Count of Slow Queries using Primary Index
  • Count of Slow Queries with Errors
Tables
  • Recent Slow Queries
  • Most Common Slow Queries
  • Low Selectivity Queries
  • Longest Running Queries
  • Highest Cost Queries
  • Primary Index Queries
  • Queries with Errors

Prepared Statements Dashboard

The prepared statements dashboard will query and display information from the system:prepareds keyspace. While the system:prepareds keyspace is global, the N1QL queries performed by the dashboard are limited in scope to a single query node for minimal impact and performance.

Filters
  • Datasource
  • Limit (default: 100)
Charts/Stats
  • Count of Prepared Statements
  • Count of Un-Used Prepared Statements
  • Avg. # of Uses per Prepared
  • Avg. Elapsed Time for Prepared Execution
Tables
  • Slowest Prepared Statements
  • Most Used Prepared Statements
  • Most Recently Used Prepared Statements
  • Un-Used Prepared Statements

couchbase-query-grafana's People

Contributors

bentonam avatar sahnianuj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

couchbase-query-grafana's Issues

The Grafana datasource JSON API does not connect to the datasource JSON API of the couchbase node.

Hello. Grafana does not connect to the couchbase JSON API.
I installed the marcusolsson-json-datasource plugin for grafana, I create a datasource, specify the URL http://<my_couchbase_domain>:8093, turn on the Basic auth and with credentials checkboxes and enter the Administrator login and password <my_password>, I get an error:

JSON API: Cannot connect to API

There is nothing in the grafana logs on this issue. Locally, curl to the couchbase API works fine from the grafana pod too. Grafana is installed on a Kubernetes cluster.
The only thing you can catch on is that in the Chrome developer tools there is:

GET https://<my_grafana_domain>/api/datasources/proxy/7 404

Can you please tell me what could be the problem here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.