Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query with join change dataframe structure, and the chart display #191

Closed
Stephane-Thales opened this issue Jun 8, 2020 · 7 comments
Closed
Assignees

Comments

@Stephane-Thales
Copy link

Hi,

A query that return exactly the same result is not dislayed the same way in Grafana

this first query work well for pie chart, and bar Graph in series mode. It display a pie or a bar per value in the field platform.

SELECT min(date) as time, platform, count() as CNT
FROM $table
WHERE $timeFilter GROUP BY platform ORDER BY CNT desc

This second query, that return exactly the same result don't work. There is a bar for platform and CNT.

SELECT min(date) as time, platform, count() as CNT
FROM $table
left join PLATFORM ON platform_key = platform
WHERE $timeFilter GROUP BY platform ORDER BY CNT desc

When using Query Inspector of Grafana panel, I can see that the JSON of the "Dataframe structure" is different.

The result from Clickhouse is the same (adding FORMAT JSON in the query return the same for both in clickhouse client, doing the query in http also return the same).

So the interpretation of the JSON is done on Grafana side.

==> Why is it not the same, and how to make it work with joins ?

@hyberdk
Copy link

hyberdk commented Jun 22, 2020

I have the same issue and #156 seems to be a duplicate of the issue..

I cannot fix it, but I do have an environment where I can replicate the fault, so if any input is needed please just reach out.

@Slach
Copy link
Collaborator

Slach commented Jun 25, 2020

@Stephane-Thales could you check the latest master branch and check your issue?
Looks like #206 should fix it

@Slach Slach self-assigned this Jun 25, 2020
@Stephane-Thales
Copy link
Author

Hi @Slach
I tried to replace the official pluggin installed with grafana-cli plugins install vertamedia-clickhouse-datasource using the one from Git, but it did'nt work, the Git one is not reconised.

I've done as root:

cd /var/lib/grafana/plugins
git clone https://github.com/Vertamedia/clickhouse-grafana.git
rm -rf vertamedia-clickhouse-datasource
service grafana-server restart

But Grafana can't find a clickhouse plugin.
I restored by re-doing

grafana-cli plugins install vertamedia-clickhouse-datasource
service grafana-server restart

Any idea how to deploy the last version of clickhouse-grafana ?

Thanks

@hyberdk
Copy link

hyberdk commented Jun 26, 2020

Hi @Stephane-Thales,

your problem is likely that your Grafana install does now allow unsigned plugins..

If you are like me and run Grafana in docker, you need to add this environment variable:

"GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=vertamedia-clickhouse-datasource"

See this if you are not running docker: https://grafana.com/docs/grafana/latest/plugins/plugin-signature-verification/

Esben

@Slach
Copy link
Collaborator

Slach commented Jun 26, 2020

Hi @Stephane-Thales, also you can look to https://grafana.com/docs/grafana/latest/administration/configuration/#allow-loading-unsigned-plugins
and add

[plugins]
allow_loading_unsigned_plugins=vertamedia-clickhouse-datasource

unfortunately at the current time no proper method to sign plugin which not signed by "grafana team"
https://grafana.com/docs/grafana/latest/developers/plugins/sign-a-plugin/

@Stephane-Thales
Copy link
Author

Thanks all,

Do you know the frequency of update from this Github to the grafana-cli repository ? It's still the 1.9.5 over there.

@Slach
Copy link
Collaborator

Slach commented Jun 29, 2020

please subscribe to grafana/grafana-plugin-repository#656

this ticked closed by #206

@Slach Slach closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants