Current File : //usr/src/../../opt/managed_servers/scripts/config.sh
# A directory for storing files of background checks, which indicate that the script is running and store the script
# result when the it is finished
readonly DEFAULT_ROOT="$(dirname "$(dirname "${BASH_SOURCE[0]}")")";
readonly PROJECT_ROOT="${PROJECT_ROOT:-$DEFAULT_ROOT}";
readonly BACKGROUND_DATA="${PROJECT_ROOT:-$DEFAULT_ROOT}/var/background_data";
readonly CHECK_LOCKS_DIR="${PROJECT_ROOT:-$DEFAULT_ROOT}/var/check_locks";
# Service status
readonly SERVICE_ACTIVE="ok";
readonly SERVICE_DOWN="critical";
readonly SERVICE_DISABLED="disabled";
readonly SERVICE_WARNING="warning";
# Auto-fix status
readonly AUTO_FIX_FAIL="failure";
readonly AUTO_FIX_SUCCESS="success";
readonly AUTO_FIX_NOPE="no_auto_fix";
readonly AUTO_FIX_API_SIDE="api_side_fix";
# Background script status
readonly SCRIPT_STARTED="started";
readonly SCRIPT_START_FAIL="start_failed";
readonly SCRIPT_IN_PROGRESS="progress";
readonly SCRIPT_TIMEOUT="timeout";
readonly SCRIPT_ERRORS="errors";
readonly SCRIPT_SKIP="skipped";
# Common vars
VIRT_CORE_COUNT=$(grep -ci processor /proc/cpuinfo);
readonly VPS_PULSAR_CPU=2
readonly VPS_QUASAR_CPU=4
readonly VPS_MAGNETAR_CPU=8
# Convenience vars
EMPTY_FILE=": empty";