[Monitoring] Investigate issue with incorrect type returned from getClustersSummary #103762
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Stack Monitoring
Team:Monitoring
Stack Monitoring team
In #103718, the total number of ES nodes returned is a number, but when no nodes exist, its an object. The issue appears to occur in the code here. Since
cluster.cluster_stats?.nodes?.count?.total
does not exist on the standalone cluster which has no nodes, it tries the MB fieldcluster.elasticsearch?.cluster?.stats?.nodes?.count
. Both are empty objects when no nodes exist. So we should account for that ingetClustersSummary
and also I think we need a better way to detect whether its legacy or metricbeat.With legacy monitoring a cluster with nodes:
With legacy monitoring a cluster with no nodes (error case):
The text was updated successfully, but these errors were encountered: