# Worldmap with influx db

**URL:** <https://community.grafana.com/t/worldmap-with-influx-db/72492>\
**Category:** Dashboards\
**Tags:** plugins\
**Created:** [September 15, 2022, 6:19pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492 "2022-09-15T18:19:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 15, 2022, 6:19pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/1 "2022-09-15T18:19:36Z")

</div>

Hello,  
I try to use grafana world map plugin to display data from influx.  
dashboard is visible at: [http://bolge.vps.webdock.cloud:3000/d/1FHI8WnVz/tides?orgId=1](http://bolge.vps.webdock.cloud:3000/d/1FHI8WnVz/tides?orgId=1)

example data from influxdb:

> select \* from tide limit 1  
> name: tide  
> time Z0 geohash lat latitude level lon longitude referenceLevel siteName

* * *

1662854400000000000 67.9 cm u4kp6ruw3mxg 58.974339 58.974339 25.9 5.730121 5.730121 MSL (Mean Sea Level (1996-2014)) ANX

I tried to use markers, tried to customize it, but it did not worked. Documentation is not helpful in this case.  
I was trying to add geohash, lat and lot as floats, also store it under long names (latitude and longitude).

its very frustrating to use the plugin.

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 15, 2022, 7:08pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/2 "2022-09-15T19:08:11Z")

</div>

Welcome

Please post your data as inline csv  
Like so

```auto
Lon,lat
45.5,-61.2

```

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 15, 2022, 8:02pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/3 "2022-09-15T20:02:19Z")

</div>

> [@yosiasz](#):
>
> ```auto
> 45.5,-61.2
> 
> ```

it is already inline, just comma is missing, but its obvious to read, but i can even simplifiy it:

timestamp, level, geohash, lat, lon ​

​​1662854400000000000, 67.9, u4kp6ruw3mxg, 58.974339, 5.730121

or

timestamp, level, geohash, latitude, longitude ​

​​1662854400000000000, 67.9, u4kp6ruw3mxg, 58.974339, 5.730121

I tired with many combinations. That’s example just to make this plugin show any data.  
​

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 15, 2022, 8:14pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/4 "2022-09-15T20:14:12Z")

</div>

data can also be accessed by:  
[http://bolge.vps.webdock.cloud:3000/d/1FHI8WnVz/tides?orgId=1&inspect=4&inspectTab=data](http://bolge.vps.webdock.cloud:3000/d/1FHI8WnVz/tides?orgId=1&inspect=4&inspectTab=data)

as i said, not displaying any position

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 15, 2022, 11:11pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/5 "2022-09-15T23:11:10Z")

</div>

Taak. Here it is using flux query language and not influxql

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/d/b/db49ad74f27cd7ae11ccdb74c8168f408506f786.jpeg)

```auto
from(bucket: "tides")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "tides")
  |> filter(fn: (r) => r["_field"] == "lat" or r["_field"] == "level" or r["_field"] == "lon")
  |> filter(fn: (r) => r["geo"] == "S")
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
  |> group()  
  |> drop(columns: ["_start", "_stop", "_measurement"])

```

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 16, 2022, 1:59pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/6 "2022-09-16T13:59:15Z")

</div>

> [@yosiasz](#):
>
> ```auto
> from(bucket: "tides")
> |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
> |> filter(fn: (r) => r["_measurement"] == "tides")
> |> filter(fn: (r) => r["_field"] == "lat" or r["_field"] == "level" or r["_field"] == "lon")
> |> filter(fn: (r) => r["geo"] == "S")
> |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
> |> group()  
> |> drop(columns: ["_start", "_stop", "_measurement"])
> 
> ```

First of all - if it is really taking flux not querry language - the the default values are super confusing. The “brand new” querry field looks like below: (if the hint is misleading, then…)

 ![Screenshot from 2022-09-16 15-56-43](https://us1.discourse-cdn.com/grafana/original/3X/3/8/38d6ae16d7a1eb2d8ab9f7f7b60450e20ab28507.png)

second - I do not know the flux, howver if I copy (and tyr to modify) I end up with 500 internal server error anyway. I try to figure out now why…

 ![Screenshot from 2022-09-16 15-53-15](https://us1.discourse-cdn.com/grafana/original/3X/4/a/4a319c6a27955d878003f318c60532d9dece7834.jpeg)

here more details \*red)

my database is InfluxDB … i will try to figure out how to use flex to querry it and if its possible…

 ![Screenshot from 2022-09-16 16-02-18](https://us1.discourse-cdn.com/grafana/original/3X/a/c/ac04c35b8d1558e12cf42eaec3bbb968c35ee189.png)

Even after enabling Flux:

> **[Enable Flux | InfluxDB OSS v1 Documentation](https://docs.influxdata.com/influxdb/v1/flux/installation/)**
>
> Instructions for enabling Flux in your InfluxDB configuration.

and resetting influx service -

 ![Screenshot from 2022-09-16 16-12-49](https://us1.discourse-cdn.com/grafana/original/3X/f/3/f3b844615eedf2630452382a6ee687c5f38a3932.png)  
Flux querries seem not accepted - I also tried to use them in influx cli - but cli seemed to expect standard influx querry language. I try to dig through documenation agan…  
hoping to find as usual “magic” word that unless you know it you will not easily guess…  
but my whole experience with grafana is basically “hacking” ☹

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 16, 2022, 3:06pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/7 "2022-09-16T15:06:40Z")

</div>

disagree with you on “hacking”, like all things it is a matter of time to get our heads wrapped around the issue. here is the influxql query.

```auto
SELECT "lat", "lon", "level" FROM "tides"

```

![image](https://us1.discourse-cdn.com/grafana/original/3X/2/5/25c4319b92ac417b7f90cc4c372c6bf89896abb1.png)

![image](https://us1.discourse-cdn.com/grafana/original/3X/2/8/285f5661ba541c09f400cf57456860187cbcc537.png)

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 16, 2022, 4:23pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/8 "2022-09-16T16:23:00Z")

</div>

I work with grafana and influx for 4 years now. Lots of things really need to be figured out. I can go on with a list really long. i keep a page with all the “hacks” ("how to make things work).  
Devops team I work with recently decided they will try sql since they got really frustrated with influx…  
I checked up flux - and at this point - I need to stop here because I am not sure if I want to put that much time and effort into configuring the flux part (you need to add the whole data source, configure buckets and so on).  
Your examples are tiny part of screenshots out of context for me. For instance information that the plugin works with InfluxDB but spports Flux only would save me many hours that I wasted on trying to make it work with querry language.  
Thank you for help, but at this point i need to step back and evaluate if I want to spend even more time to something that should be just a simple prototype for me.

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 16, 2022, 4:30pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/9 "2022-09-16T16:30:38Z")

</div>

You are welcome and happy journey  
It took me 10 minutes to put your data into influx and geo map it

For a simple prototype I would go with infinity with your data as csv. This is just for POC though give me 5 minutes

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/a/a/aa34c908ded5bc954517002dcb7e62fc089fec37.jpeg)

> [@annawojciechowska](#):
>
> Your examples are tiny part of screenshots out of context for me

the screen shot is based on tiny example of data you provided.

Overall, it does not sound you have positive vibes about your experience with grafana. I believe it is a cool tool and the community can help you for you to have a positive experience.

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 16, 2022, 4:53pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/10 "2022-09-16T16:53:52Z")

</div>

You forgot to type how much time you took you to learn flux.  
Once when somebody knows the technology, things are easy, but especially IT ppl, living in their own bubles forget that it takes time and pain to learn things.

> > grafana is not a bad tool. But there are same problems like any other new technology. It is not really well thought trough. Its internal logic is sometimes not very consistent. Like any tools that develops too fast - it pays the price with consistency and some kind of predictable, consitent logic. In short - many technologies lack meturity and some consistent, clean “logic.”

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 16, 2022, 5:10pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/11 "2022-09-16T17:10:35Z")

</div>

> [@annawojciechowska](#):
>
> living in their own bubles forget that it takes time and pain to learn things.

Lots of truth in what you say there. Hence the reason I am taking time out to help you by coming out of my bubble.

Still learning flux but took me couple of weeks of dedicated time.

Basically I just learnt it last few months.

If you are willing happy to help you. Otherwise happy journey

---

<div class="post-metadata">

**Author:** ![wafath](https://avatars.discourse-cdn.com/v4/letter/w/35a633/32.png) [@wafath](https://community.grafana.com/u/wafath)\
**Post date:** [September 20, 2022, 7:02pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/13 "2022-09-20T19:02:28Z")

</div>

So, using your basic SQL like influx query, try changing the “Format as” selector to “Table” instead of “Time Series”.

I have been able to get things with Influx to work without having to switch to Flux.

Why does this work? Uhhhhh.

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 20, 2022, 8:01pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/14 "2022-09-20T20:01:12Z")

</div>

Hi!  
Wow it does indeed work. That what I meant by "hacking’ grafana. And it works quite nicely!

Thanks a lot!

 ![Screenshot from 2022-09-20 21-58-40](https://us1.discourse-cdn.com/grafana/original/3X/b/d/bd509d4cd6e8eb9c94aaa7269be548d64d3a5dff.png)  
[http://bolge.vps.webdock.cloud:3000/d/1FHI8WnVz/tides?orgId=1&from=now-2d&to=now&var-site1=AES&var-site2=KAB&var-site3=TOS](http://bolge.vps.webdock.cloud:3000/d/1FHI8WnVz/tides?orgId=1&from=now-2d&to=now&var-site1=AES&var-site2=KAB&var-site3=TOS)

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 20, 2022, 10:09pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/15 "2022-09-20T22:09:22Z")

</div>

Do you understand the difference between time series and table?

---

<div class="post-metadata">

**Author:** ![wafath](https://avatars.discourse-cdn.com/v4/letter/w/35a633/32.png) [@wafath](https://community.grafana.com/u/wafath)\
**Post date:** [September 20, 2022, 10:29pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/16 "2022-09-20T22:29:32Z")

</div>

No. No I do not.

Should I? Will it be on the test?

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 20, 2022, 10:42pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/17 "2022-09-20T22:42:15Z")

</div>

It will be on the final test of the human race. Very important to know

---

<div class="post-metadata">

**Author:** ![wafath](https://avatars.discourse-cdn.com/v4/letter/w/35a633/32.png) [@wafath](https://community.grafana.com/u/wafath)\
**Post date:** [September 20, 2022, 11:44pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/18 "2022-09-20T23:44:33Z")

</div>

Right. Well, I was planning on dropping out, auditing the rest of it, and then re-taking it next semester.

Frankly, I am coming to this a bit like @annawojciechowska is; I am pushing buttons at random until something works, and then moving on. (Wait, that is probably unfair to her. She is probably much more organized and smarter too.)

Frankly, the Worldmap component feels a bit un-polished. I have hoped that reporting concerns here would serve as a bug report.

But I have my own bugs to fix.

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [September 21, 2022, 12:21am UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/19 "2022-09-21T00:21:47Z")

</div>

We all learn differently and at different pace and different style.

Pressing buttons randomly is one way or you can ask people on this forum to help.

Just because you personally have a difficult time learning grafana should not be the reason you want to abandon the product.

Make the product better by making owners of the product the challenges you are facing and how to make it better.

---

<div class="post-metadata">

**Author:** ![annawojciechowska](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/annawojciechowska/32/26133_2.png) [@annawojciechowska](https://community.grafana.com/u/annawojciechowska)\
**Post date:** [September 21, 2022, 12:23pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/20 "2022-09-21T12:23:16Z")

</div>

I work with time series, and in addition I study oceanography now, lots of time series data. Grafana is for me visualisation tool, mostly for prototyping some ideas. It has some “math” to it, but very basic. I have limited time to babysit software - If “monkey pseudo randomn” pressing of buttons works, and I will have my data displayed in what I will be able to judge as correct - I will use it. If the documentation would be written in more structured way, I would use it. But I am no t willing to spend several days to dig out things from documentaitons. Most likely I would give up. use old good-bad matplotlib or implement stuff on my own. Brutal but real. We all have limited time.

Also about grafana hacking or random pressing buttons.  
There is a concept of grafana variable, usually resolved to actual value by $ eg. $myVar = my value. But it is unclear in which elements of the grafana plugins it can be used - it can be in queries, labels, panel tittles, but not as a marker in worldmap plugin. I do not know any place in documentation explicitly telling what is the scope of this variable and where I can use t. So in this case the fastest way is simply playing with it. That’s also what i refer to lack of consistency. Some grafical ui text fields accept this “variables logic” some not.

---

<div class="post-metadata">

**Author:** ![wafath](https://avatars.discourse-cdn.com/v4/letter/w/35a633/32.png) [@wafath](https://community.grafana.com/u/wafath)\
**Post date:** [September 21, 2022, 12:45pm UTC](https://community.grafana.com/t/worldmap-with-influx-db/72492/21 "2022-09-21T12:45:56Z")

</div>

> [@yosiasz](#):
>
> Make the product better by making owners of the product the challenges you are facing and how to make it better.

I apologize if my frustrations are infecting you. I really do want to help. That is why I posted in this thread in the first place. From my viewpoint, @annawojciechowska has encountered a bug that you and I first interacted on back in June:

[(discussion on Worldmap)](https://community.grafana.com/t/geomap-new-feature-requests-influx-work-arounds/67351/16)

So, @yosiasz , how do I report that bug to the owners of the product other than posting here? I honestly don’t know what the preferred way is.

[Next page](https://community.grafana.com/t/worldmap-with-influx-db/72492.md?page=2)
