Error 'Fetching tags failed: undefined'

Setup
Using Grafana 8.0.6 with graphite backend, data provided by telegraf. Both Grafana and graphite are running in docker.

The issue
When modifying or creating a new Panel with graphite as my backend, as soon as I click on ‘Select metric’, I receive the message ‘Fetching tags failed: undefined’. This does not seem to affect the functioning of the dashboard, but I wonder where it’s coming from, and how to fix this message.
This message appears only once. When I close it, and click on ‘select metric’ again, it does not appear. Switching to another datasource, and then back to Graphite makes it appear again, though.

In pictures
Click on ‘select metric’
image

Error message in top right corner
image

Some more background
I might have caused this problem by manually removing some data from the graphite system, by manually removing whisper data files, as per instructions found here.
Restoring the data files did not fix the problem, though.

The question
What causes this message, and how can I get rid of it?

Hi @jaapjanswijnenburg

When you trigger that error, do you see any:

  • errors in the browser’s dev console?
  • errors or interesting output in the network tab of your browser’s dev tools?
  • error in the grafana-server logs?

Thanks for the lead! That brings up some more information, indeed:
Trying to pull data from https://hidden-hostname/api/datasources/proxy/3/tags/autoComplete/tags results in a 500 error.
The content gives even more details:

data: Object { error: "no such table: tags_tag", message: "no such table: tags_tag" }
​status: 500
​statusText: "Internal Server Error"


So, it appears that Grafana is missing the table tags_tag? Do I need to re-run a migration script?

Finally got around to looking at this problem again.
First, I have found a workaround, by telling Grafana that Graphite was at version 1.0.x. This makes Grafana skip the tagging step.
image

Secondly, I used an sqlite client to peer into the graphite internal DB, and it appears there is indeed no table tags_tag. But there ARE other tables that are like it: tagging_tag and tagging_taggeditem
image

Does anybody have an idea what to do now? Can somebody peek into their graphite database and tell me their version and the tables that are in their graphite.db file?

I was able to inspect a graphite.db database from a fresh installation, and it showed that quite a few tables were missing in my live installation

  • dashboard_template
  • dashboard_template_owners
  • tags_series
  • tags_seriestag
  • tags_tag
  • tags_tagvalue

I recreated these tables in my live system. For those interested:

  • Show tables in the database file on the ‘fresh’ installation.
    .tables
  • Show table structure from a specific table (in this case the tags_tag table).
    .schema tags_tag
  • Copy the output and execute it on the live database

After that, In Grafana I set my Graphite version back to 1.1.x. Now, it did not complain anymore! Yay!