Open simianhacker opened 2 years ago
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)
The problem affects any get_<product>_info
. E.g. Logstash (https://github.com/elastic/kibana/blob/4d47cb793b577d1f2f94f338abdd7ce2de94ce3b/x-pack/plugins/monitoring/server/lib/logstash/get_node_info.ts#L20).
The problem can be triggered by the presence of metricbeat-*
indices with incorrect mappings, as Stack Monitoring queries .monitoring-*,metricbeat-*
by default (monitoring.ui.metricbeat.indices
allows to customize the set of Metricbeat indices to use).
To identify the problematic indices, one could run GET .monitoring-*,metricbeat-*/_mapping/field/timestamp
and check if there are indices with such field and the type is not date
.
The current error message from the
getKibanaInfo()
when Elasticsearch returns ZERO results is unhelpful; it will return this error message:This error doesn't indicate the real problem which is the query returned ZERO results. We should add a check to ensure there are results and when it fails we should return a meaningful error message like:
The offending code lives here:
https://github.com/elastic/kibana/blob/4d47cb793b577d1f2f94f338abdd7ce2de94ce3b/x-pack/plugins/monitoring/server/lib/kibana/get_kibana_info.ts#L19-L24