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

InfluxDB: InfluxQL: adds tags to timeseries data #36702

Merged
merged 2 commits into from Jul 14, 2021

Conversation

gabor
Copy link
Contributor

@gabor gabor commented Jul 13, 2021

when the InfluxDB data source in InfluxQL mode returns data, it returns it in the TimeSeries[] format. but it does not return the tags. this pull request fixes this.

how to test it works:

  • make devenv sources=influxdb
  • (wait 1 minute for influxdb to get some data stored)
  • create a dashboard-panel
  • choose gdev-influxdb-influxql
    • select cpu in FROM
    • select usage_idle in the SELECT field
    • in the GROUP BY row click on [+] and add tag(cpu)
  • you should see 5 lines right now
  • go to the settings of the timeseries panel, choose "standard options > display name", and set it to ${__field.labels.cpu}
  • [save]
  • now check the legend in the graph, it should say : "cpu-total", "cpu0", "cpu1", "cpu2", "cpu3"
  • (for comparison, without this fix on the main branch it says: "${__field.labels.cpu}", "${__field.labels.cpu}", "${__field.labels.cpu}", "${__field.labels.cpu}", "${__field.labels.cpu}"

@gabor gabor requested review from aocenas, torkelo, ifrost and Elfo404 and removed request for ifrost July 14, 2021 11:23
@gabor gabor marked this pull request as ready for review July 14, 2021 11:23
@gabor gabor requested a review from a team as a code owner July 14, 2021 11:23
@gabor gabor removed the request for review from a team July 14, 2021 12:44
@gabor gabor changed the title influxdb: influxql: return tags in timeseries InfluxDB: InfluxQL: adds tags to timeseries data Jul 14, 2021
@gabor gabor added this to the 8.0.7 milestone Jul 14, 2021
@gabor gabor added the old backport v8.0.x Mark PR for automatic backport to v8.0.x label Jul 14, 2021
@gabor gabor merged commit 815f9a7 into main Jul 14, 2021
@gabor gabor deleted the gabor/influxql-dataframe-fix branch July 14, 2021 14:06
grafanabot pushed a commit that referenced this pull request Jul 14, 2021
* influxdb: influxql: return tags in timeseries

* influxdb: influxql: added tests

(cherry picked from commit 815f9a7)
@gabor gabor removed the type/bug label Jul 14, 2021
cinaglia added a commit to cinaglia/grafana that referenced this pull request Jul 15, 2021
* main: (85 commits)
  Chore: Ease the migration of always using context.Context when interacting with the bus (grafana#36733)
  Datasource: Improve default timeout settings for HTTP client provider (grafana#36621)
  Expand the value of math and reduce expressions in annotations and labels (grafana#36611)
  User analytics: Use user email as Rudderstack id (grafana#36788)
  Select: Block scroll on select instead of trying to hide the menu (grafana#36783)
  Chore: Upgrade grafana-plugin-sdk-go to v0.110.0 (grafana#36763)
  Plugins: Use plugin.pluginDir as source of truth for plugin location (grafana#36711)
  switch to json resp for errors (grafana#36743)
  Docs: New index page with list of all visualizations and panels  (grafana#36756)
  OptionsUI: add standard field name picker (grafana#36732)
  Docs:Adjust azuread.md for Powershell UUID command (grafana#27323)
  Update _index.md (grafana#35595)
  AzureMonitor: Improve Azure Resource Graph docs (grafana#34450)
  Update queries.md (grafana#31941)
  Update configuration.md (grafana#30695)
  Remove verify-drone for Windows (grafana#36759)
  Modal: Force modal content to overflow with scroll (grafana#36754)
  InfluxDB: InfluxQL: adds tags to timeseries data (grafana#36702)
  Add AGPL license update to 8.0 changelog, release notes, What's New (grafana#36742)
  Select: Portal select menu to document.body (grafana#36398)
  ...
gabor added a commit that referenced this pull request Jul 15, 2021
* influxdb: influxql: return tags in timeseries

* influxdb: influxql: added tests

(cherry picked from commit 815f9a7)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
@zserge zserge modified the milestones: 8.0.7, 8.1.0-beta1 Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants