Kibana 5.5.0 Can't get region map to work

Hi,

I'm trying to visualize my own geojson layer in the new region map visualization, I've tried for quite a while now but no luck.

I am hosting my geojson file from my own local nginx webserver. I can reach and download the file using curl on the kibana machine.

This is the geojson file:

{"name":"test","type":"FeatureCollection"
,"features":[
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[20.8979600411144,62.8089611849282],[20.5529737049032,58.9602616564856],[20.5529737049032,58.9602616564856],[13.9261395703638,58.9786035686896],[13.5238205488445,62.8525899907285],[20.8979600411144,62.8089611849282]]]},"properties":{"name":"testsquare","id":"0"}}
]}

Which is basically just one square.

This is the entry in my config file:

regionmap:
layers:
- name: "test"
url: "http:///geometries/test.geojson"
fields:
- name: "name"
description: "name"

I have an index with a name-attribute that matches the name "testsquare" but nothing is shown in the map. When i switch to the example "US States" map I can see those boundaries.

I have also tried using "file:///usr/share/kibana/geometries/..." and "/usr/share/kibana/geometries/..." as the url value but no luck. The kibana user have permission to use the geometries folder and all files in it.

What am I missing? :confused:

1 Like

@Rikkemannen,
I just got this configured correctly.

  • I created a simple webserver using superstatic
    • Created the a file called bigfunger.geojson and pasted the geojson file that you provided above.
    • Created a superstatic.json file to configure superstatic to allow CORS, and to allow the kbn-version header that kibana sends with its request (shown below)
    • started up the superstatic server.

superstatic.json

{
  "headers": [
    {
      "source" : "**/*.@(geojson)",
      "headers" : [{
        "key" : "Access-Control-Allow-Origin",
        "value" : "*"
      },
      {
        "key": "Access-Control-Allow-Headers",
        "value": "kbn-version"
      }]
    }
  ]
}
  • Configured kibana to access that server:
regionmap:
  layers:
     - name: "Bigfungers Stuff"
       url: "http://localhost:3474/bigfunger.geojson"
       fields:
          - name: "name"
            description: "name"

This did not work for me... I installed superstatic and started an instance with the exact configuration you provided but still I see no shapes.

I see no errors in any log files that I know of. Kind of stumped here :frowning:

Does the browser console show you any errors? While I was trying to get this configured I was seeing errors there.

Ah, there it is!

commons.bundle.js?v=15382:29 Mixed Content: The page at 'https://xxx.xxx.xxx.xxx/kibana/app/kibana#/visualize/create?type=region_map&indexPattern=xxx&_g=h@44136fa&_a=h@61523ec' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost:3474/test.geojson'. This request has been blocked; the content must be served over HTTPS.

I switched to SSL on my nginx server and it worked like a charm.

Happiness :smile: Thanks for the help :slight_smile:

2 Likes

Glad I could help!

Thanks for giving me a reason to dig into the region map. :slight_smile:

Happy Kibana-ing!

Hi guys,

Is it possible to host the geojson directly in kibana to avoid having a cors enabled webserver just for this?

How would the url look like for this?

Thanks a bunch

BR
Alex

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.