Merge pull request #308 from Icinga/feature/normalized_performance_data

Introduce *_state#normalized_performance_data
This commit is contained in:
Eric Lippmann 2021-07-13 15:16:38 +02:00 committed by GitHub
commit 320fcd84bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 27 deletions

View file

@ -5,31 +5,32 @@ import (
)
type State struct {
EntityWithChecksum `json:",inline"`
EnvironmentMeta `json:",inline"`
AcknowledgementCommentId types.Binary `json:"acknowledgement_comment_id"`
Attempt uint8 `json:"check_attempt"`
CheckCommandline types.String `json:"commandline"`
CheckSource types.String `json:"check_source"`
ExecutionTime float64 `json:"execution_time"`
HardState uint8 `json:"hard_state"`
InDowntime types.Bool `json:"in_downtime"`
IsAcknowledged types.AcknowledgementState `json:"acknowledgement"`
IsFlapping types.Bool `json:"is_flapping"`
IsHandled types.Bool `json:"is_handled"`
IsProblem types.Bool `json:"is_problem"`
IsReachable types.Bool `json:"is_reachable"`
LastStateChange types.UnixMilli `json:"last_state_change"`
LastUpdate types.UnixMilli `json:"last_update"`
Latency float64 `json:"latency"`
LongOutput types.String `json:"long_output"`
NextCheck types.UnixMilli `json:"next_check"`
NextUpdate types.UnixMilli `json:"next_update"`
Output types.String `json:"output"`
PerformanceData types.String `json:"performance_data"`
PreviousHardState uint8 `json:"previous_hard_state"`
Severity uint16 `json:"severity"`
SoftState uint8 `json:"state"`
StateType types.StateType `json:"state_type"`
Timeout float64 `json:"check_timeout"`
EntityWithChecksum `json:",inline"`
EnvironmentMeta `json:",inline"`
AcknowledgementCommentId types.Binary `json:"acknowledgement_comment_id"`
Attempt uint8 `json:"check_attempt"`
CheckCommandline types.String `json:"commandline"`
CheckSource types.String `json:"check_source"`
ExecutionTime float64 `json:"execution_time"`
HardState uint8 `json:"hard_state"`
InDowntime types.Bool `json:"in_downtime"`
IsAcknowledged types.AcknowledgementState `json:"acknowledgement"`
IsFlapping types.Bool `json:"is_flapping"`
IsHandled types.Bool `json:"is_handled"`
IsProblem types.Bool `json:"is_problem"`
IsReachable types.Bool `json:"is_reachable"`
LastStateChange types.UnixMilli `json:"last_state_change"`
LastUpdate types.UnixMilli `json:"last_update"`
Latency float64 `json:"latency"`
LongOutput types.String `json:"long_output"`
NextCheck types.UnixMilli `json:"next_check"`
NextUpdate types.UnixMilli `json:"next_update"`
Output types.String `json:"output"`
PerformanceData types.String `json:"performance_data"`
NormalizedPerformanceData types.String `json:"normalized_performance_data"`
PreviousHardState uint8 `json:"previous_hard_state"`
Severity uint16 `json:"severity"`
SoftState uint8 `json:"state"`
StateType types.StateType `json:"state_type"`
Timeout float64 `json:"check_timeout"`
}

View file

@ -132,6 +132,7 @@ CREATE TABLE host_state (
output mediumtext DEFAULT NULL,
long_output mediumtext DEFAULT NULL,
performance_data mediumtext DEFAULT NULL,
normalized_performance_data mediumtext DEFAULT NULL,
check_commandline text DEFAULT NULL,
is_problem enum('n', 'y') NOT NULL,
@ -283,6 +284,8 @@ CREATE TABLE service_state (
output mediumtext DEFAULT NULL,
long_output mediumtext DEFAULT NULL,
performance_data mediumtext DEFAULT NULL,
normalized_performance_data mediumtext DEFAULT NULL,
check_commandline text DEFAULT NULL,
is_problem enum('n', 'y') NOT NULL,

View file

@ -42,6 +42,7 @@ ALTER TABLE host
MODIFY perfdata_enabled enum('n','y') NOT NULL,
MODIFY is_volatile enum('n','y') NOT NULL;
ALTER TABLE host_state
ADD COLUMN normalized_performance_data mediumtext DEFAULT NULL AFTER performance_data,
MODIFY is_problem enum('n','y') NOT NULL,
MODIFY is_handled enum('n','y') NOT NULL,
MODIFY is_reachable enum('n','y') NOT NULL,
@ -58,6 +59,7 @@ ALTER TABLE service
MODIFY perfdata_enabled enum('n','y') NOT NULL,
MODIFY is_volatile enum('n','y') NOT NULL;
ALTER TABLE service_state
ADD COLUMN normalized_performance_data mediumtext DEFAULT NULL AFTER performance_data,
MODIFY is_problem enum('n','y') NOT NULL,
MODIFY is_handled enum('n','y') NOT NULL,
MODIFY is_reachable enum('n','y') NOT NULL,