前言:本文源于天天是霧霾新聞,我想利用kibana畫一下一線城市霧霾圖,希望對想利用經緯度在kibana繪圖和獲取日志本身時間繪圖的同學有所幫助。有什么疑問或者糾錯,可以給我發(fā)郵件

一、數據準備

為了方便起見,我模擬臆造了json格式的數據

{"timestamp":"2017-01-13T13:13:32.2516955+08:00","deviceId":"myFirstDevice","windSpeed":17,"haze":284,"city":"Beijing","lat":33.9402,"lon":116.40739}

模擬數據我用的是c#,大概如下:

 static void SendingRandomMessages()        {            //var eventHubClient = EventHubClient.CreateFromConnectionString(connectionString, eventHubName);
            int len = 4;            string[] citys = { "Beijing", "Shangjhai", "Guangzhou", "Shenzhen" };            int[] avgWindSpeed = { 10, 16, 5, 7 };            int[] avgWindSpeed1 = { 10, 16, 5, 7 };         &nbs