You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
3.8 KiB

# Copyright (C) 2005-2025 Splunk Inc. All Rights Reserved.
# Contains useful constants used across code base
# Build time (Grunt) save away of current ITSI version
# Helps avoid repeated REST calls to get the same value of ITSI version repeatedly in different parts of the code
current_itsi_app_version = '4.20.0'
KVSTORE_SPLUNKD_HOST_PATH = "https://localhost"
KVSTORE_SPLUNKD_PORT = "8089"
KVSTORE_SPLUNKD_USER = "admin"
SEVERITY_MAP = {
-3: {
'id': 'disabled',
'color': '#CCCCCC',
'label': 'Disabled',
},
-2: {
'id': 'maintenance',
'color': '#5C6773',
'colorLight': '#C3CBD4',
'label': 'Maintenance',
},
-1: {
'id': 'unknown',
'color': '#CCCCCC',
'colorLight': '#EEEEEE',
'label': 'Unknown',
},
1: {
'id': 'info',
'color': '#AED3E5',
'colorLight': '#E3F0F6',
'label': 'Info',
},
2: {
'id': 'normal',
'color': '#99D18B',
'colorLight': '#DCEFD7',
'label': 'Normal',
},
3: {
'id': 'low',
'color': '#FFE98C',
'colorLight': '#FFF4C5',
'label': 'Low',
},
4: {
'id': 'medium',
'color': '#FCB64E',
'colorLight': '#FEE6C1',
'label': 'Medium',
},
5: {
'id': 'high',
'color': '#F26A35',
'colorLight': '#FBCBB9',
'label': 'High',
},
6: {
'id': 'critical',
'color': '#B50101',
'colorLight': '#E5A6A6',
'label': 'Critical',
},
}
DEFAULT_THRESHOLDS = {
'baseSeverityLabel': 'normal',
'baseSeverityValue': 2,
'baseSeverityColor': SEVERITY_MAP[2]['color'],
'baseSeverityColorLight': SEVERITY_MAP[2]['colorLight'],
'metricField': 'count',
'search': '',
'renderBoundaryMin': 0,
'renderBoundaryMax': 100,
'isMaxStatic': False,
'isMinStatic': True,
'gaugeMin': 0,
'gaugeMax': 100,
'thresholdLevels': [],
}
DEFAULT_POLICY_KEY = "default_policy"
KT_DEFAULT_POLICY = {
'title': 'Default',
'aggregate_thresholds': DEFAULT_THRESHOLDS,
'entity_thresholds': DEFAULT_THRESHOLDS,
'policy_type': 'static',
'time_blocks': [],
}
ET_DEFAULT_POLICY = {
'title': 'Default',
'entity_thresholds': DEFAULT_THRESHOLDS,
'policy_type': 'static',
'time_blocks': [],
}
THRESHOLD_CONFIGURATION_OPTIONS = [
'auto',
'both',
'upper',
'lower'
]
DEFAULT_SEVERITY_LEVELS = [
{
'severityLabel': 'info',
'severityLabelLocalized': 'Info',
'severityColor': SEVERITY_MAP[1]['color'],
'severityColorLight': SEVERITY_MAP[1]['colorLight'],
'severityValue': 1,
},
{
'severityLabel': 'normal',
'severityLabelLocalized': 'Normal',
'severityColor': SEVERITY_MAP[2]['color'],
'severityColorLight': SEVERITY_MAP[2]['colorLight'],
'severityValue': 2,
},
{
'severityLabel': 'low',
'severityLabelLocalized': 'Low',
'severityColor': SEVERITY_MAP[3]['color'],
'severityColorLight': SEVERITY_MAP[3]['colorLight'],
'severityValue': 3,
},
{
'severityLabel': 'medium',
'severityLabelLocalized': 'Medium',
'severityColor': SEVERITY_MAP[4]['color'],
'severityColorLight': SEVERITY_MAP[4]['colorLight'],
'severityValue': 4,
},
{
'severityLabel': 'high',
'severityLabelLocalized': 'High',
'severityColor': SEVERITY_MAP[5]['color'],
'severityColorLight': SEVERITY_MAP[5]['colorLight'],
'severityValue': 5,
},
{
'severityLabel': 'critical',
'severityLabelLocalized': 'Critical',
'severityColor': SEVERITY_MAP[6]['color'],
'severityColorLight': SEVERITY_MAP[6]['colorLight'],
'severityValue': 6,
},
]