diff --git a/x-pack/plugins/monitoring/public/lib/apm_agent.ts b/x-pack/plugins/monitoring/public/lib/apm_agent.ts index aeef966e8e70e..8884557782126 100644 --- a/x-pack/plugins/monitoring/public/lib/apm_agent.ts +++ b/x-pack/plugins/monitoring/public/lib/apm_agent.ts @@ -17,7 +17,8 @@ export const checkAgentTypeMetric = (versions?: string[]) => { } versions.forEach((version) => { const [major, minor] = version.split('.'); - if (Number(major) >= 7 && Number(minor) >= 13) { + const majorInt = Number(major); + if (majorInt > 7 || (majorInt === 7 && Number(minor) >= 13)) { return true; } }); diff --git a/x-pack/test/api_integration/apis/monitoring/apm/fixtures/cluster.json b/x-pack/test/api_integration/apis/monitoring/apm/fixtures/cluster.json index f56440f2e4c4f..34fbe0581d8e8 100644 --- a/x-pack/test/api_integration/apis/monitoring/apm/fixtures/cluster.json +++ b/x-pack/test/api_integration/apis/monitoring/apm/fixtures/cluster.json @@ -9,7 +9,10 @@ "config": { "container": false }, - "timeOfLastEvent": "2018-08-31T13:59:21.201Z" + "timeOfLastEvent": "2018-08-31T13:59:21.201Z", + "versions": [ + "7.0.0-alpha1" + ] }, "metrics": { "apm_cpu": [ diff --git a/x-pack/test/api_integration/apis/monitoring/cluster/fixtures/overview.json b/x-pack/test/api_integration/apis/monitoring/cluster/fixtures/overview.json index 8fed03d9a8a34..5ca02bb9c20bd 100644 --- a/x-pack/test/api_integration/apis/monitoring/cluster/fixtures/overview.json +++ b/x-pack/test/api_integration/apis/monitoring/cluster/fixtures/overview.json @@ -115,7 +115,10 @@ }, "config": { "container": false - } + }, + "versions": [ + "7.0.0-alpha1" + ] }, "isCcrEnabled": true, "isPrimary": true,