Worldmap with location information outside data source

Hi,
I am trying to build a Grafana dashboard with the Worldmap Panel with data from Instana as data source.
The Instana data has no direct information about the location, but I would like to assign a specific set of data (filtered by e.g. host.name) a fix location.
Ideally I would even add multiple queries with a filter (host.name) and enter the location manually (i.e. not a column out of the data) in the panel configuration (longitude + latitude) but it seem that this is not supported, right?
My work around idea is using a json file that assigns a key (host.name) to a location that is defined in the json file. Is that the correct way of doing this? If so, has anyone experience with using a second data source (json file) with a dictionary that assigns keys in another data source (Instana) to a location? Is that even possible?
Thank you very much for your help!
Best,
Anna

  1. Don’t use worldmap (obsolete plugin), but geomap panel.
  2. Add 2nd query to panel - TestData DB datasource, where you create suitable geo detail structure, e. g. hostname, lat, lot
  3. Use Transformation to join results from these 2 queries (for example join by hostname), so final result can be used by geomap panel.

Hi Jangaraj,

thank you for your response!
Unfortunately, I have not yet managed to get it work:

I have created a .csv file with the information about location and host ip address:

In order to join (under transformation) I would need the ip address as entry in a column.
I have tried to make a “label to field” transformation to get the ip address (out of the label, see image) as entry in a column.
Unfortunately, I cannot choose a label:

Do you have any idea what I could do?
Is this possibly an issue using Instana as data source?

Thank you for your help!
Best,
Anna

Welcome,

This approach of carving up a json or csv file manually might be a quick work around to get things going but does not sound sustainable.

Does Instana not provide feature to capture lon, lat ?

But anyways you can use not the join transformation but the merge

image

Hi yosiasz,

thank you very much for your fast response and the proposed solution!

I just tried it out, but I can’t manage to combine multiple dataframes.

Let’s assume I start with my Instana datasource only (i.e. not yet with CSV datasource) and the query you can see in my previous post. Then I get N dataframes with the format:

time | $label ($application) - $key
Timestamp | Number

I can obtain the IP-address (or hostname etc., depends on the tag I group upon) through the $label variable (see screenshot of my original answer).
I suppose I would however need one single dataframe (not multiple, i.e. N) in the following format to perform a successful merge:

time | My Metric | IP-address
Timestamp | Number | xx.xx.xx.xx

How can I combine all the dataframes into one, and inject the value of the $label variable as a column for each row?

I assume, the problem seems to be, that the Instana datadource does not deliver distinct labels for my query for which I could use the “Labels to fields” transformation. I would rather need a “legend”/ $label variable to fields transformation.

I would be very grateful if you could give me another hint on how to do this.

Thank you,
Anna

What is you tried to merge first without counting and count only after merge?
So that you have

Host, lon,lat,count

Your other questions are related to instana which I am not familiar with

Hi yosiasz,

thank you for responding again so fast!

With the help of a series to row transformation I managed to get the table above.

I want to merge this result now with the dataframe from the csv but as soon as I add csv as a second data source the series to row transformation is not applied anymore.

Any chance you have another idea for a workaround?

Thank you very much for your help!
Best
Anna

Did you even try what I recommended? Does your csv have metric column for the ip.addresses?