Comments (8)
Hi @Akint
Indeed, plugin add quotes to variables with multi-value
or include-all
options.
Are you trying to build a panel with multiple columns or dashboard?
If second, you might try to use repeated panels/rows (http://docs.grafana.org/reference/templating/#repeating-panels)
from clickhouse-grafana.
I tried to use repeated panels and rows and it did't work out of the box since it tried to select string instead of column:
SELECT (intDiv(toUInt32(datetime), 1) * 1) * 1000 as t, 'metric1' FROM default.stats WHERE date BETWEEN toDate(1520396817) AND toDate(1520396831) AND datetime BETWEEN toDateTime(1520396817) AND toDateTime(1520396831) GROUP BY t ORDER BY t
That's why I had to write the function I mentioned before.
Or have I got your suggestion wrong?
from clickhouse-grafana.
No, you are totally right. It seems like adding a new macros like unescape
is the best solution, because we can't change variables create form(add some new checkbox etc). If you have time and desire, I'll be glad to accept a pr. Otherwise you will have to wait till the end of week for this macros
from clickhouse-grafana.
@hagen1778, sorry, I am not skilled enough to implement it right, so I'll wait.
from clickhouse-grafana.
Hi @Akint
Plz check branch https://github.com/Vertamedia/clickhouse-grafana/tree/unescape for new macros unescape
. Documentation and richeditor autocompletion updated with info about new macros.
How to test it:
- download source code from branch
- put it into Grafana's plugin directory
- restart Grafana
- test it
Do not forget to remove application cache for Grafana in your browser or simply use browser's
incognito
mode
from clickhouse-grafana.
@hagen1778, it works like a charm, thank you! I have even managed to create a graph contained of all metrics:
SELECT
t,
arrayMap(lambda((x, y), (x, y)), [$metric], metric)
FROM
(
SELECT
$timeSeries as t,
sumForEach([$unescape($metric)]) as metric
FROM $table
WHERE $timeFilter
GROUP BY t
)
ORDER BY t
By the way, the plugin breaks ->
operator (lambda function): from query x, y -> (x,y)
it generates query x, y - >(x, y)
. So I had to use uglier version lambda((x, y), (x, y))
. Should I submit another issue here? Or should it go to tabix issue tracker instead?
Documentation and richeditor autocompletion updated with info about new macros.
I haven't found docs for unescape
under 'Show Help' button. Autocompletion worked, though.
from clickhouse-grafana.
x, y - >(x, y)
yes, submit the issue plz
I haven't found docs for unescape
I meant the autocompletion help - when you type the name of the func/macros, richeditor
should give some additional info about it.
from clickhouse-grafana.
Hi @Akint
Lambda issue was solved at https://github.com/Vertamedia/clickhouse-grafana/releases/tag/1.4.1
from clickhouse-grafana.
Related Issues (20)
- Clickhouse Group Statistics Alarm Bug HOT 4
- alert metric name problem HOT 2
- check `lttb` function application for work HOT 1
- Ad-hoc filters - error when evaluating varchar field with numeric value HOT 2
- WHERE field IN ('value1','value2') vs WHERE field IN ['value1','value2'] have side effects
- Support TRACE and Flamegraph formats HOT 7
- auto-complete for field names and table names
- Write e2e tests + coverage for coveralls in github actions
- Update screenshots to Grafana 10
- Explore format "as table" work different with old version of plugin HOT 1
- Grafana Cloud Support HOT 12
- Issue with plugin on grafana cloud HOT 2
- Annotations setup page don't contain Query textfield
- `Reformat Query` button do nothing, need return it nad fix wrong formatting
- Support for multiple grouping columns for calculations like increaseColumns HOT 1
- Unexpected error when using $conditionalTest macro HOT 11
- The 'Format As' feature is not working. HOT 1
- No longer possible to specify custom timestamp column value in 3.0.0 HOT 1
- golang part of plugin ignore tlsSkipVerify oprtion from datasource settings
- Broken table with specific query in 3.0.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse-grafana.