With Metricbeat shipping Elasticsearch monitoring data (instead of internal collection by Elasticsearch), there are some subtle changes to the format of monitoring docs that are indexed into `.monitoring-es-6-*`. One such change is that metricbeat won't index fields with `null` values; instead it simply doesn't index such fields at all.
As a result, in the context of Elasticsearch monitoring docs, when it comes to docs with `type` = `shards` representing unassigned shards, the `shard.node` field was being indexed as `null` by internal Elasticearch collection, whereas the field was absent when the doc was indexed by Metricbeat.
Since both cases represent the same case — the shard being unassigned — this PR relaxes the check in the UI code to look for either case.
### Sample `shards` document indexed by internal ES collection
```js
{
"_index":".monitoring-es-6-2018.10.02",
"_type":"doc",
"_id":"WUf_htOeSXOJQmiesyF5Bw:_na:metricbeat-7.0.0-alpha1-2018.10.01:0:r",
"_source":{
"cluster_uuid":"zXO1GjA6SJGsrPnCPkOoyA",
"timestamp":"2018-10-02T03:54:43.364Z",
"interval_ms":10000,
"type":"shards",
"source_node":null,
"state_uuid":"WUf_htOeSXOJQmiesyF5Bw",
"shard":{
"state":"UNASSIGNED",
"primary":false,
"node":null,
"relocating_node":null,
"shard":0,
"index":"metricbeat-7.0.0-alpha1-2018.10.01"
}
}
}
```
### Sample `shards` document indexed by Metricbeat collection
```js
{
"_index":".monitoring-es-6-mb-2018.10.02",
"_type":"doc",
"_id":"FhDRTPjkQJqsgawYbxjQzw:_na:metricbeat-7.0.0-alpha1-2018.10.01:0:r",
"_source":{
"@timestamp":"2018-10-02T04:00:03.361Z",
"interval_ms":10000,
"shard":{
"state":"UNASSIGNED",
"primary":false,
"index":"metricbeat-7.0.0-alpha1-2018.10.01",
"shard":0
},
"state_uuid":"FhDRTPjkQJqsgawYbxjQzw",
"beat":{
"hostname":"Shaunaks-MBP-2",
"version":"7.0.0-alpha1",
"name":"Shaunaks-MBP-2"
},
"timestamp":"2018-10-02T04:00:03.375Z",
"type":"shards",
"metricset":{
"name":"shard",
"module":"elasticsearch",
"host":"localhost:9200",
"rtt":14254,
"namespace":"elasticsearch.shard"
},
"host":{
"name":"Shaunaks-MBP-2"
},
"cluster_uuid":"zXO1GjA6SJGsrPnCPkOoyA"
}
}
```