mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[APM] Services without application metrics display an error (#131347)
This commit is contained in:
parent
687aad0355
commit
ec152a6e9b
1 changed files with 10 additions and 2 deletions
|
@ -44,8 +44,16 @@ const chartBase: ChartBase = {
|
|||
};
|
||||
|
||||
export const percentSystemMemoryUsedScript = {
|
||||
lang: 'expression',
|
||||
source: `1 - doc['${METRIC_SYSTEM_FREE_MEMORY}'] / doc['${METRIC_SYSTEM_TOTAL_MEMORY}']`,
|
||||
lang: 'painless',
|
||||
source: `
|
||||
if(doc.containsKey('${METRIC_SYSTEM_FREE_MEMORY}') && doc.containsKey('${METRIC_SYSTEM_TOTAL_MEMORY}')){
|
||||
double freeMemoryValue = doc['${METRIC_SYSTEM_FREE_MEMORY}'].value;
|
||||
double totalMemoryValue = doc['${METRIC_SYSTEM_TOTAL_MEMORY}'].value;
|
||||
return 1 - freeMemoryValue / totalMemoryValue
|
||||
}
|
||||
|
||||
return null;
|
||||
`,
|
||||
} as const;
|
||||
|
||||
export const percentCgroupMemoryUsedScript = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue