Geomap lookup query keep disappearing

I have a geomap panel on my Grafana Cloud dashboard showing my visitors’ country from Apache access log using goeip_country_code. I am able to display bubbles on the map using lookup mode with data set to my query:

sum by (geoip_country_code) (
count_over_time({job="apache_access", geoip_country_code!=""} | __error__=``[24h])

Somehow when I revisit my dashboard later, the bubbles are not showing and I found that the Data input field in Layer 1 is empty, I need to re-select my query again.

Any thoughts?

Hi @wallacelee ,
Just checking in—did this solution resolve your issue, or are you still facing the same problem?

Hi @infofcc3 ,

My setup is similar, data source is Apache logs from AWS EC2 via Alloy, with geoip_country_code from MaxMind GeoLite2-Country database.

The query I used to retrieve the country code:

sum by (geoip_country_code) (

count_over_time({job=“apache_access”, geoip_country_code!=“”} | _error_=`` [6h])

)

I also have 2 transformation to get the query to work with geomap:

Like I said, the bubbles on the Geomap works fine after I select the query as the data in the map layer, or refresh the dashboard. But when I revisit my dashboard later (it’s random, maybe an hour or two), the bubbles are gone. To resolve I have to edit the geomap panel and re-select my query.

What does your refresh setting look like

Refresh is off and time range is last 6 hours.

I’ve run into a similar issue before when working with the Geomap panel in Grafana Cloud. Sometimes the query selection in Layer 1 → Data input doesn’t persist after saving, especially if the dashboard JSON wasn’t fully updated. A couple of things you can try:

  • After selecting your query in Layer 1, click Apply and then re-save the entire dashboard.

  • Check the panel JSON to see if the dataLayer field is actually storing your query. If it’s empty there, Grafana won’t reload it properly.

  • Make sure you’re on the latest version of the Geomap panel, since some earlier builds had persistence bugs with lookup queries.

If it keeps resetting, it might be worth opening a bug report on GitHub so the team can track it.

1 Like

Maybe try a reasonable refresh rate and see it fixes the issue? You can also try the orchestra cities geomap plugin, or try out the mapgl plug-in as well and see if there is a similar issue there. if so then the issue might be grafana itself

Thanks for all the suggestions, I am pretty sure the query selection is saved (verified in the panel json), and no matter what refresh rate I choose, the geomap markers just disappear after sometime and I have to edit the dashboard to put them back, so seems to me this is a bug.

1 Like

I’m hitting this as well. Frustrating.

Same issue here. Data field is empty every time i open dashboard

Maybe there is a way to pass query through variable ?

Hi krdian, my issue with heatmap had been fixed months ago after they released the pr and now the heatmap is showing the bubbles fine on my dashboard.

You can see the details of the pr:

Hi @wallacelee yeah, it works! Thanks!

1 Like