chore(package): use constants in configuration schema
This commit is contained in:
parent
2b8996e965
commit
2a316b1ffa
@ -5,6 +5,10 @@ import { intersection, map as mapToArray, uniq } from 'lodash'
|
||||
|
||||
import DensityPlan from './density-plan'
|
||||
import PerformancePlan from './performance-plan'
|
||||
import {
|
||||
DEFAULT_CRITICAL_THRESHOLD_CPU,
|
||||
DEFAULT_CRITICAL_THRESHOLD_MEMORY_FREE
|
||||
} from './plan'
|
||||
import {
|
||||
EXECUTION_DELAY,
|
||||
debug
|
||||
@ -61,12 +65,12 @@ export const configurationSchema = {
|
||||
cpu: {
|
||||
type: 'integer',
|
||||
title: 'CPU (%)',
|
||||
default: 90
|
||||
default: DEFAULT_CRITICAL_THRESHOLD_CPU
|
||||
},
|
||||
memoryFree: {
|
||||
type: 'integer',
|
||||
title: 'RAM, Free memory (MB)',
|
||||
default: 64
|
||||
default: DEFAULT_CRITICAL_THRESHOLD_MEMORY_FREE
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8,10 +8,10 @@ import {
|
||||
const MINUTES_OF_HISTORICAL_DATA = 30
|
||||
|
||||
// CPU threshold in percent.
|
||||
const DEFAULT_CRITICAL_THRESHOLD_CPU = 90.0
|
||||
export const DEFAULT_CRITICAL_THRESHOLD_CPU = 90.0
|
||||
|
||||
// Memory threshold in MB.
|
||||
const DEFAULT_CRITICAL_THRESHOLD_MEMORY_FREE = 64.0
|
||||
export const DEFAULT_CRITICAL_THRESHOLD_MEMORY_FREE = 64.0
|
||||
|
||||
// Thresholds factors.
|
||||
const HIGH_THRESHOLD_FACTOR = 0.85
|
||||
|
Loading…
Reference in New Issue
Block a user