Snowflake grafana datasource plugin allows Snowflake data to be visually represented in Grafana dashboards.

Snowflake Grafana Data Source

Build

With the Snowflake plugin, you can visualize your Snowflake data in Grafana and build awesome chart.

Get started with the plugin

Set up the Snowflake Data Source

Install the Data Source

  1. Install the plugin into the grafana plugin folder:
grafana-cli --pluginUrl https://github.com/michelin/snowflake-grafana-datasource/releases/latest/download/snowflake-grafana-datasource.zip plugins install michelin-snowflake-datasource

or

cd /var/lib/grafana/plugins/
wget https://github.com/michelin/snowflake-grafana-datasource/releases/latest/download/snowflake-grafana-datasource.zip
unzip snowflake-grafana-datasource.zip
  1. Edit the grafana configuration file to allow unsigned plugins:
  • Linux:/etc/grafana/grafana.ini
  • macOS:/usr/local/etc/grafana/grafana.ini
[plugins]
allow_loading_unsigned_plugins = michelin-snowflake-datasource

Or with docker

docker run -d \
-p 3000:3000 \
-v "$(pwd)"/grafana-plugins:/var/lib/grafana/plugins \
--name=grafana \
-e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=michelin-snowflake-datasource" \
grafana/grafana
  1. Restart grafana

Configure the Datasource

  • Open the side menu by clicking the Grafana icon in the top header.
  • In the side menu under the Configuration icon you should find a link named Data Sources.
  • Click the + Add data source button in the top header.
  • Select Snowflake.

Add your authentication and configuration details.

Setting datasources

Available configuration fields are as follows:

Name Description
Account Name Specifies the full name of your account (provided by Snowflake)
Username Specifies the login name of the user for the connection.
Password Specifies the password for the specified user.
Role (Optional) Specifies the default access control role to use in the Snowflake session initiated by Grafana.
Warehouse (Optional) Specifies the virtual warehouse to use once connected.
Database (Optional) Specifies the default database to use once connected.
Schema (Optional) Specifies the default schema to use for the specified database once connected.
Extra Options (Optional) Specifies a series of one or more parameters, in the form of <param>=<value>, with each parameter separated by the ampersand character (&), and no spaces anywhere in the connection string.

Supported Macros

Macros can be used within a query to simplify syntax and allow for dynamic parts.

Macro example Description
$__time(dateColumn) Will be replaced by an expression to convert to a UNIX timestamp and rename the column to time. For example, TRY_TO_TIMESTAMP(dateColumn) as time
$__timeEpoch(dateColumn) Will be replaced by an expression to convert to a UNIX timestamp and rename the column to time.
$__timeFilter(dateColumn) Will be replaced by a time range filter using the specified column name. For example, dateColumn BETWEEN 1494410783 AND 1494410983
$__timeFrom() Will be replaced by the start of the currently active time selection. For example, 1494410783
$__timeTo() Will be replaced by the end of the currently active time selection. For example, 1494410983
$__timeGroup(dateColumn,'5m') Will be replaced by an expression usable in GROUP BY clause. For example, *floor(extract(epoch from dateColumn)/120)120
$__timeGroup(dateColumn,'5m', 0) Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value.
$__timeGroup(dateColumn,'5m', NULL) Same as above but NULL will be used as value for missing points.
$__timeGroup(dateColumn,'5m', previous) Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used (only available in Grafana 5.3+).
$__timeGroupAlias(dateColumn,'5m') Will be replaced identical to $__timeGroup but with an added column alias time (only available in Grafana 5.3+).
$__unixEpochFilter(dateColumn) Will be replaced by a time range filter using the specified column name with times represented as Unix timestamp. For example, dateColumn > 1494410783 AND dateColumn < 1494497183
$__unixEpochNanoFilter(dateColumn) Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamp. For example, dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872
$__unixEpochNanoFrom() Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, 1494410783152415214
$__unixEpochNanoTo() Will be replaced by the end of the currently active time selection as nanosecond timestamp. For example, 1494497183142514872
$__unixEpochGroup(dateColumn,'5m', [fillmode]) Same as $__timeGroup but for times stored as Unix timestamp (only available in Grafana 5.3+).
$__unixEpochGroupAlias(dateColumn,'5m', [fillmode]) Same as above but also adds a column alias (only available in Grafana 5.3+).

Write Queries

Create a panel in a dashboard and select a Snowflake Data Source to start using the query editor.

Select a query type 'Time Series' or 'Table'.

For Time series query:

  • Date / time column can appear anywhere in the query as long as it is included (you must define the time formatted columns name)
  • A numerical column must be included.

Query editor

Layout of a query

Simple query

SELECT
  <time_column> as time,
  <numerical_column>
FROM
  <table>
WHERE
  $__timeFilter(<time_column>) 
  AND $<variable> = 'xxxxx' -- custom grafana variables start with dollar sign

SQL Query Group By Interval

SELECT
  $__timeGroup(<time_column>, $__interval), -- group time by interval
  <numerical_column>
FROM
  <table>
WHERE
  $__timeFilter(<time_column>)
  AND $<variable> = 'xxxxx'
GROUP BY 
  <time_column>

Create an annotation

Annotations allow you to overlay events on a graph. To create an annotation, in the dashboard settings click "Annotations", and "New".

Development

The snowflake datasource is a data source backend plugin composed of both frontend and backend components.

Frontend

  1. Install dependencies

    yarn install
  2. Build plugin in development mode or run in watch mode

    yarn dev

    or

    yarn watch
  3. Build plugin in production mode

    yarn build

Backend

  1. Build backend plugin binaries for Linux, Windows and Darwin:

    mage -v
  2. List all available Mage targets for additional commands:

    mage -l

License

Snowflake grafana plugin has been released under Apache License 2.0. Please, refer to the LICENSE file for further information.

Owner
Michelin
Michelin Open Source Platform
Michelin
Comments
  • No data in response.

    No data in response.

    Hi,

    I installed this on a test grafana instance at work and hooked it up to snowflake.

    I can see the query going out to snowflake and returning results, but there's no data being plotted on the graph.

    I've attached the panel JSON and the query JSON from the query inspector.

    panel.txt query.txt

  • GROUP BY 2 columns results column name with field name + label

    GROUP BY 2 columns results column name with field name + label

    Grafana Version: 9.1.1 Plugin version: v1.2.0

    Executed Query:

    SELECT $__timeGroup(DATETIME,$__interval) as Time, HOST as metric, (max(USED/10241024)/max(TOTAL/10241024)*100) AS used_percent FROM SERVER_MEMORY WHERE $__timeFilter(DATETIMEUTC,$__interval) GROUP BY 1,2 ORDER BY 1

    Everything looks good except data comes like below

    image image

    USED_PERCENT is appended with HOST (included with a space). Using flowchart plugin which grabs the field name always displays as "USED_PERCENT" for all the hosts

    image

    Expected Behavior:

    We should see labels as field names i.e., each HOST should displayed as column name instead of "USED_PERCENT {HOST}" it should be just "HOST"

  • Add support for variables

    Add support for variables

    Hello!

    I'm adding support for variables.

    https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-variables/

    To fix issue #3

    Thanks!

  • Error when adding

    Error when adding "LIMIT" keyword to time-series

    When I try to add "LIMIT" keyword to queries of time-series panel, it always reports error "001003 (42000): SQL compilation error: syntax error line 7 at position 9 unexpected 'LIMIT'."

    Query:

    SELECT TIME_SLICE(TO_TIMESTAMP(CONVERT_TIMEZONE('UTC', flowEndSeconds)), 60, 'SECOND', 'START') as time, 
    count(*) as count,
    sourceNodeName
    FROM flows
    WHERE $__timeFilter(time)
    GROUP BY time, sourceNodeName
    ORDER BY time
    LIMIT 10
    

    Error msg: image

    Query config: image

    From the error message we can tell it applies both the default max data points 1526 and the limit 10 defined in the query, which leads to error.

    When looking at the code, I have trouble to understand these line: https://github.com/michelin/snowflake-grafana-datasource/blob/7d3541024c6aaa0c90c2c15e77b1e48773eae273/pkg/query.go#L215-L216 It will automatically append "LIMIT maxDataPoints" to the end of the query, which always cause error.

    The purpose for me to add "LIMIT 10" to the query is to limit the number of series it returns. While the definition of maxDataPoints is "sets the maximum numbers of data points for EACH series returned." I don't think the code is correctly supporting maxDataPoints.

  • queryresultmeta object comes as custom object

    queryresultmeta object comes as custom object

    When I run timeseries query to fetch server memory utilized in group or hosts or all hosts, grafana queryresult meta always show as custom object with rowCount: 1; Because of this flowcharting-panel couldn't pickup the right metric; It always returns "Apply to column" as return table metadata instead of host column values.

    image image

    Where as using mysql connector shows timeseries-Wide

    image
  • %*p characters in password causing problem

    %*p characters in password causing problem

    Our Snowflake password looks like xxxxxxx%*pxxxxxxxxx

    If we try to authenticate using this password - we get an error: Validation query error : invalid URL escape "%*p"

  • Dashboard variables and annotations lack ability to enter a Query

    Dashboard variables and annotations lack ability to enter a Query

    Both dashboard variables and the annotations are missing the option to add a Query. Unable to add variables and annotations to the dashboards. Is this something meant to be supported by the plugin?

  • Bump loader-utils from 2.0.2 to 2.0.3

    Bump loader-utils from 2.0.2 to 2.0.3

    Bumps loader-utils from 2.0.2 to 2.0.3.

    Release notes

    Sourced from loader-utils's releases.

    v2.0.3

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Changelog

    Sourced from loader-utils's changelog.

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Convert long frame to wide frame

    Convert long frame to wide frame

    This PR adds the support to convert a Long formatted time series Frame to a Wide format. The main functionality is done by calling function LongToWide() from "github.com/grafana/grafana-plugin-sdk-go/data" package. For the full description of this function, check the function description in the package source code.

    One of the major purpose of this PR is to adding field labels to frame, which is required when apply "Labels to fields" transformation.

    Fixes: #15, fixes: #19

  • Bump terser from 4.8.0 to 4.8.1

    Bump terser from 4.8.0 to 4.8.1

    Bumps terser from 4.8.0 to 4.8.1.

    Changelog

    Sourced from terser's changelog.

    v4.8.1 (backport)

    • Security fix for RegExps that should not be evaluated (regexp DDOS)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump postcss from 7.0.35 to 7.0.39

    Bump postcss from 7.0.35 to 7.0.39

    Bumps postcss from 7.0.35 to 7.0.39.

    Release notes

    Sourced from postcss's releases.

    7.0.39

    • Reduce package size.
    • Backport nanocolors to picocolors migration.

    7.0.38

    • Update Processor#version.

    7.0.37

    • Backport chalk to nanocolors migration.

    7.0.36

    • Backport ReDoS vulnerabilities from PostCSS 8.
    Changelog

    Sourced from postcss's changelog.

    7.0.39

    • Reduce package size.
    • Backport nanocolors to picocolors migration.

    7.0.38

    • Update Processor#version.

    7.0.37

    • Backport chalk to nanocolors migration.

    7.0.36

    • Backport ReDoS vulnerabilities from PostCSS 8.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump simple-git from 3.14.1 to 3.15.1

    Bump simple-git from 3.14.1 to 3.15.1

    Bumps simple-git from 3.14.1 to 3.15.1.

    Release notes

    Sourced from simple-git's releases.

    [email protected]

    Patch Changes

    • de570ac: Resolves an issue whereby non-strings can be passed into the config switch detector.

    [email protected]

    Minor Changes

    • 7746480: Disables the use of inline configuration arguments to prevent unitentionally allowing non-standard remote protocols without explicitly opting in to this practice with the new allowUnsafeProtocolOverride property having been enabled.

    Patch Changes

    • 7746480: - Upgrade repo dependencies - lerna and jest
      • Include node@19 in the test matrix
    Changelog

    Sourced from simple-git's changelog.

    3.15.1

    Patch Changes

    • de570ac: Resolves an issue whereby non-strings can be passed into the config switch detector.

    3.15.0

    Minor Changes

    • 7746480: Disables the use of inline configuration arguments to prevent unitentionally allowing non-standard remote protocols without explicitly opting in to this practice with the new allowUnsafeProtocolOverride property having been enabled.

    Patch Changes

    • 7746480: - Upgrade repo dependencies - lerna and jest
      • Include node@19 in the test matrix
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump loader-utils from 2.0.2 to 2.0.4

    Bump loader-utils from 2.0.2 to 2.0.4

    Bumps loader-utils from 2.0.2 to 2.0.4.

    Release notes

    Sourced from loader-utils's releases.

    v2.0.4

    2.0.4 (2022-11-11)

    Bug Fixes

    v2.0.3

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Changelog

    Sourced from loader-utils's changelog.

    2.0.4 (2022-11-11)

    Bug Fixes

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Query Data Error on some queries

    Query Data Error on some queries

    We're seeing "Query Data Error" appearing in the Grafana UI for some queries on our instance of Snowflake, most interestingly when we run SHOW TABLES;, but not SHOW TERSE TABLES;.

    I ran these queries directly from the Go backend, and it looks like they're caused by a missing nil check at https://github.com/michelin/snowflake-grafana-datasource/blob/master/pkg/query.go#L153.

    Happy to submit a PR for this with some unit tests.

  • TypeError: t.map is not a function

    TypeError: t.map is not a function

    With plugin version 1.3.0 running on Grafana v9.2.2 once I've created some Snowflake dashboards I started to get similar errors:

    An unexpected error happened
    Details
    TypeError: t.map is not a function
    
        at Io (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:363:1276)
        at div
        at div
        at https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:2941:48
        at div
        at https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:426:1562
        at div
        at div
        at n (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:99:6538)
        at div
        at n (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:99:8487)
        at div
        at n (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:99:6538)
        at div
        at n (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:99:8487)
        at Zt (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:99:14074)
        at div
        at div
        at div
        at b (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:5742:1111)
        at Si (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:443:1519)
        at g (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:999564)
        at WithTheme(Connect(Si))
        at Na (https://ds-dashboards.example.com/public/build/DashboardPage.addf7c66abb17ffa5168.js:566:7310)
        at DashboardPage
        at g (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:999564)
        at Suspense
        at c (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:1194:301)
        at fc (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:8749:362)
        at t (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:1014882)
        at t (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:1016903)
        at main
        at Ql (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:8710:13067)
        at t (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:1011500)
        at div
        at o (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:2035:4306)
        at t.KBarProvider (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:261503)
        at l (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:6088:19180)
        at c (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:1194:301)
        at u (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:1194:855)
        at y (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:2892432)
        at tc (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:8746:21930)
        at l (https://ds-dashboards.example.com/public/build/4713.9debbfba7033186a58bf.js:2:997609)
        at qc (https://ds-dashboards.example.com/public/build/3593.50eee21d2f7b3f7d0151.js:8762:115)
    

    I've already tried to delete the dashboard and recreate, but I still get these. Before creating/using the plugin I can't observe similar behaviour, so I suspect the problem can be related to that?

  • Metric Request Error on simple recursive query

    Metric Request Error on simple recursive query

    Grafana Version: v7.5.5 (b5190ee547) Plugin Version: 1.2.0

    I have the following query

    WITH RECURSIVE recurseruns AS (
     SELECT p.id as pr, p.created_at as pr_create, runs.upstream_run_id, runs.run_id, runs.job_name, runs.started, runs.completed
     FROM "FIVETRAN_DATABASE"."FB_CI_METRICS_PUBLIC".runs
     JOIN "FIVETRAN_DATABASE"."FB_CI_METRICS_PUBLIC".premerge_stats p
     ON p.run_id = runs.run_id
      WHERE p.run_id IS NOT NULL
      AND CONVERT_TIMEZONE('UTC', 'UTC', p.created_at::TIMESTAMP_NTZ) < '2022-10-11T17:18:15.49Z' AND CONVERT_TIMEZONE('UTC', 'UTC', p.created_at::TIMESTAMP_NTZ) > '2022-10-11T11:18:15.49Z'
      UNION ALL
        SELECT rt.pr as pr, rt.pr_create as pr_create, r.upstream_run_id, r.run_id, r.job_name, r.started, r.completed
        FROM "FIVETRAN_DATABASE"."FB_CI_METRICS_PUBLIC".runs r
        JOIN recurseruns rt ON rt.run_id = r.upstream_run_id
      )
    SELECT
      rr.pr_create as "time",
      SUM(CASE WHEN (rr.job_name LIKE 's3_%') THEN TIMEDIFF('seconds', rr.started, rr.completed) END) as s3_machine_time
    FROM recurseruns rr
    group by (rr.pr, "time")
    order by "time";
    

    The error

    {
      "request": {
        "url": "api/ds/query",
        "method": "POST",
        "data": {
          "queries": [
            {
              "refId": "A",
              "key": "Q-56419b51-e0d2-40db-8641-8828c213e003-0",
              "queryText": "WITH RECURSIVE recurseruns AS (\n SELECT p.id as pr, p.created_at as pr_create, runs.upstream_run_id, runs.run_id, runs.job_name, runs.started, runs.completed\n FROM \"FIVETRAN_DATABASE\".\"FB_CI_METRICS_PUBLIC\".runs\n JOIN \"FIVETRAN_DATABASE\".\"FB_CI_METRICS_PUBLIC\".premerge_stats p\n ON p.run_id = runs.run_id\n  WHERE p.run_id IS NOT NULL\n  AND CONVERT_TIMEZONE('UTC', 'UTC', p.created_at::TIMESTAMP_NTZ) < '2022-10-11T17:18:15.49Z' AND CONVERT_TIMEZONE('UTC', 'UTC', p.created_at::TIMESTAMP_NTZ) > '2022-10-11T11:18:15.49Z'\n  UNION ALL\n    SELECT rt.pr as pr, rt.pr_create as pr_create, r.upstream_run_id, r.run_id, r.job_name, r.started, r.completed\n    FROM \"FIVETRAN_DATABASE\".\"FB_CI_METRICS_PUBLIC\".runs r\n    JOIN recurseruns rt ON rt.run_id = r.upstream_run_id\n  )\nSELECT\n  rr.pr_create as \"time\",\n  SUM(CASE WHEN (rr.job_name LIKE 's3_%') THEN TIMEDIFF('seconds', rr.started, rr.completed) END) as s3_machine_time\nFROM recurseruns rr\ngroup by (rr.pr, \"time\")\norder by \"time\";",
              "queryType": "table",
              "timeColumns": [
                "time"
              ],
              "datasourceId": 78,
              "intervalMs": 1000,
              "maxDataPoints": 3778
            }
          ],
          "range": {
            "from": "2022-10-11T18:27:59.275Z",
            "to": "2022-10-11T19:27:59.275Z",
            "raw": {
              "from": "now-1h",
              "to": "now"
            }
          },
          "from": "1665512879275",
          "to": "1665516479275"
        },
        "hideFromInspector": false
      },
      "response": {
        "message": "Metric request error"
      }
    }```
Cole - Cole can use his sixth sense to give you metrics about your Grafana dashboards

Cole Cole can use his sixth sense to give you metrics about your Grafana dashboa

Nov 9, 2022
A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instances.

Grafana Dashboard Synchronization Backend Plugin A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instance

Dec 23, 2022
Grafana DB2 Data Source Backend Plugin

Grafana DB2 Data Source Backend Plugin This template is a starting point for building Grafana Data Source Backend Plugins What is Grafana Data Source

Dec 13, 2021
Grafana Data Source Backend Plugin Template

Grafana Data Source Backend Plugin Template This template is a starting point for building Grafana Data Source Backend Plugins What is Grafana Data So

Jan 16, 2022
Grafana Data Source Backend Plugin
Grafana Data Source Backend Plugin

Grafana Data Source Backend Plugin This plugin allows you to receive telemetry i

Sep 18, 2022
Terraform-grafana-dashboard - Grafana dashboard Terraform module

terraform-grafana-dashboard terraform-grafana-dashboard for project Requirements

May 2, 2022
Grafana-threema-forwarder - Alert forwarder from Grafana webhooks to Threema wire messages

Grafana to Threema alert forwarder Although Grafana has built in support for pus

Nov 11, 2022
Mattermost outline plugin allows you to search your teams documents.
Mattermost outline plugin allows you to search your teams documents.

mattermost-plugin-outline Mattermost Outline plugin allows you to search your teams documents. Installation In Mattermost 5.16 and later, this plugin

Dec 7, 2022
Graph and alert on '.rrd' data using grafana, RRDTool and RRDSrv.

Grafana RRD Datasource A grafana datasource for reading '.rrd' files via RRDTool and RRDsrv. With this datasource you will be able to create grafana d

Oct 12, 2022
Kubectl Locality Plugin - A plugin to get the locality of pods

Kubectl Locality Plugin - A plugin to get the locality of pods

Nov 18, 2021
A block parser tool that allows extraction of various data types on DAS

das-database A block parser tool that allows extraction of various data types on DAS (register, edit, sell, transfer, ...) from CKB Prerequisites Ubun

Nov 11, 2022
A kubectl plugin for finding decoded secret data with productive search flags.

kubectl-secret-data What is it? This is a kubectl plugin for finding decoded secret data. Since kubectl only outputs base64-encoded secrets, it makes

Dec 2, 2022
A kubectl plugin for finding decoded secret data with productive search flags.

kubectl-secret-data What is it? This is a kubectl plugin for finding decoded secret data. Since kubectl outputs base64-encoded secrets basically, it m

Dec 2, 2022
Grafana Tempo is a high volume, minimal dependency distributed tracing backend.
Grafana Tempo is a high volume, minimal dependency distributed tracing backend.

Grafana Tempo is an open source, easy-to-use and high-scale distributed tracing backend. Tempo is cost-efficient, requiring only object storage to ope

Jan 8, 2023
Grafana Dashboard Manager

Grafana dash-n-grab Grafana Dash-n-Grab (GDG) -- Dashboard/DataSource Manager. The purpose of this project is to provide an easy to use CLI to interac

Dec 31, 2022
Download your Fitbit weight history and connect to InfluxDB and Grafana

WemonFit Weight monitoring for Fitbit, using InfluxDB and Grafana Generating a new certificate openssl req -new -newkey rsa:2048 -nodes -keyout lo

Oct 22, 2022
PoC for Grafana 8.x Local File Inclusion (Pre-Auth)

Grafana 8.x Local File Inclusion (Pre-Auth) CVE: Pending All credits go to j0v and his tweet https://twitter.com/j0v0x0/status/1466845212626542607 Dis

Nov 9, 2022
Grafana Unauthorized arbitrary file reading vulnerability
Grafana Unauthorized arbitrary file reading vulnerability

CVE-2021-43798 Grafana Unauthorized arbitrary file reading vulnerability 8.3.1 (2021-12-07) Security: Fixes CVE-2021-43798 . For more information, see

Dec 25, 2022
Otus prometheus grafana for golang

HW Prometheus. Grafana Clone the repo: git clone https://github.com/alikhanmurzayev/otus_kuber_part_3.git && cd otus_kuber_part_3 Prepare workspace: m

Dec 17, 2021