crate / crate/cratedb-guide

Feedback on /integrate/grafana: How to efficiently query Grafana when using CrateDB as time series database

Open
#557 2 comments 0 reactions 1 assignee Claimed by @florinutz View on GitHub
help wanted pitch question
Dominant language
No language data
Stars
3
Forks
4
Avg merge
3d 18h
Merged PRs (30d)
1

Description

### Documentation feedback


- Page title: Grafana
- Page URL: https://cratedb.com/docs/guide/integrate/grafana/index.html
- Source: https://github.com/crate/cratedb-guide/blob/main/docs/integrate/grafana/index.md

---

### Problem
Hi. It looks like no resource is educating about how to use Grafana with CrateDB properly, by applying the `$__timeGroupAlias` and `$__timeFilter` macros correspondingly, like in [that canonical example](https://github.com/crate/cratedb-examples/blob/main/application/grafana/example-weather.py#L107-L114).

```sql
SELECT
$__timeGroupAlias("timestamp", $__interval),
"location",
MEAN("{column_name}") AS "{column_name}"
FROM "example"."weather_data"
WHERE $__timeFilter("timestamp")
GROUP BY "time", "location"
ORDER BY "time"
```

I can't find them being mentioned on the following resources contrary to [being guided effectively](https://github.com/daq-tools/kotori/pull/148#issuecomment-1595873753) by @hammerhead and @seut on a patch conceived the other day. Do I miss any?

- https://cratedb.com/blog/time-series-cratedb-cloud-sql-examples
- https://cratedb.com/blog/visualizing-time-series-data-with-grafana-and-cratedb
- https://medium.com/@drishtinishchhal/unlock-the-power-of-time-series-with-cratedb-an-overview-4995f10ad35d

### Evaluation
**No wonder users will overload CrateDB with dashboarding** when using Grafana without applying those querying essentials by including the relevant macros into their SQL queries?

### References
- https://github.com/crate/c-vatvalve/issues/11
- https://github.com/crate/tech-content/issues/72

### Outlook
If you are still reading, please educate yourself about how cool a native LTTB implementation would be.
- https://community.cratedb.com/t/advanced-downsampling-with-the-lttb-algorithm/1287
- https://community.cratedb.com/t/lttb-downsampling-to-work-around-grafana-sql-limits/1596

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.