forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Monitoring] Added ability to possibly distinguish between Agent type…
… metrics in APM (elastic#95129) * Added version and cloud check * Fixed tests * Code review feedback * Fixed tests * added versions * added version * ... * Removed default version * .. * Fixed test * fixed tests # Conflicts: # x-pack/plugins/monitoring/server/lib/apm/_apm_stats.js # x-pack/test/api_integration/apis/monitoring/apm/fixtures/cluster.json
- Loading branch information
Showing
12 changed files
with
164 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { Legacy } from '../legacy_shims'; | ||
|
||
/** | ||
* Possible temporary work arround to establish if APM might also be monitoring fleet: | ||
* https://github.com/elastic/kibana/pull/95129/files#r604815886 | ||
*/ | ||
export const checkAgentTypeMetric = (versions?: string[]) => { | ||
if (!Legacy.shims.isCloud || !versions) { | ||
return false; | ||
} | ||
versions.forEach((version) => { | ||
const [major, minor] = version.split('.'); | ||
const majorInt = Number(major); | ||
if (majorInt > 7 || (majorInt === 7 && Number(minor) >= 13)) { | ||
return true; | ||
} | ||
}); | ||
return false; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,8 @@ | |
}, | ||
"config": { | ||
"container": false | ||
} | ||
}, | ||
"versions": [] | ||
}, | ||
"isPrimary": false | ||
}] |
Oops, something went wrong.