No data show in Kibana wth vega-lite

I am new to vega-lite and trying to use the following vega-lite script

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "title": "Event counts from all indexes",
  "data": {
    "url": {
      "%context%": true,
      "%timefield%": "_source.time_stamp",
      "index": "flexlm_license_usage-201911",
      "body": {"_source": ["time_stamp", "lic_usage"], "size": 10}
    },
    "format": {"property": "hits.hits"}
  },
  "mark": "line",
  "encoding": {
    "x": {"field": "_source.time_stamp", "type": "temporal"}
    "y": {"field": "_source.lic_usage", "type": "quantitative"}
    }
  }

In kibana, i can only see the x and y axis legend and title but no data.

Running same from dev tools, elasticsearch return following. Please suggest what i am missing here?

{
"took" : 281,
"timed_out" : false,
"_shards" : {
"total" : 2,
"successful" : 2,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 98298346,
"max_score" : 1.0,
"hits" : [
{
"_index" : "flexlm_license_usage-201911",
"_type" : "doc",
"_id" : "agrlx218 ctolx622 ctolx623_cdslmd_Xcelium_SC_DMS_Option__danicant_gnbsx50536_1573272900000",
"_score" : 1.0,
"_source" : {
"time_stamp" : "2019-11-09T05:15:00+0100",
"lic_usage" : 1
}
},
{
"_index" : "flexlm_license_usage-201911",
"_type" : "doc",
"_id" : "agrlx218 ctolx622 ctolx623_snpslmd_VCSMXRunTime_Net__pistoria_ctosx00212_1573272900000",
"_score" : 1.0,
"_source" : {
"time_stamp" : "2019-11-09T05:15:00+0100",
"lic_usage" : 1
}
},
{
"_index" : "flexlm_license_usage-201911",
"_type" : "doc",
"_id" : "agrlx218 ctolx622 ctolx623_cdslmd_Xcelium_SC_DMS_Option__uppverif_gnbsx50707_1573272900000",
"_score" : 1.0,
"_source" : {
"time_stamp" : "2019-11-09T05:15:00+0100",
"lic_usage" : 4
}
},
{
"_index" : "flexlm_license_usage-201911",
"_type" : "doc",
"_id" : "agrlx218 ctolx622 ctolx623_snpslmd_VCSRuntime_Net__specq_gnbsx50743_1573272900000",
"_score" : 1.0,
"_source" : {
"time_stamp" : "2019-11-09T05:15:00+0100",
"lic_usage" : 2
}
},

Your request and vega encoding look good to me. The best way to check whether your encoding property is set up correctly is to look at VEGA_DEBUG and find the section that shows how your data looks after it's formatted.

Wylie,

Here is the output of VEGA_DEBUG. I am not sure about the error
Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_aliases&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_template&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_mapping&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_aliases&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_template&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_mapping&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_aliases&method=GET:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
:5601/api/console/proxy?path=_template&method=GET:1 Failed to load resource: net::ERR_INTERNET_DISCONNECTED
:5601/api/console/proxy?path=_mapping&method=GET:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
:5601/api/console/proxy?path=_aliases&method=GET:1 Failed to load resource: net::ERR_CONNECTION_REFUSED

From the above I searched a bit and found that Kibana vega-lite is unable to reach to my ES cluster on a remote host. So i made entries in my kibana.yml

elasticsearch.hosts: ["http://xxxx:9200"]
vega.enableExternalUrls: "true"

After kibana.yml update, the above errors got vanished but still data is not showing up.
In the VEGA_DEBUG => under Network => _search is showing to following link
http://yyyy:5601/elasticsearch/flexlm_license_usage-201911/_search

however yyyy is my kibana host not Elasticsearch host. What i am missing here?

The request you showed is correct, Kibana proxies your Elasticsearch requests for you. Based on what you've shared I'm not sure what the issue is.

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