diff --git a/pkg/icingadb/v1/state.go b/pkg/icingadb/v1/state.go index 85837532..fc6f9a52 100644 --- a/pkg/icingadb/v1/state.go +++ b/pkg/icingadb/v1/state.go @@ -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"` } diff --git a/schema/mysql/schema.sql b/schema/mysql/schema.sql index 984f5749..3e11127f 100644 --- a/schema/mysql/schema.sql +++ b/schema/mysql/schema.sql @@ -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, diff --git a/schema/mysql/upgrades/1.0.0-rc2.sql b/schema/mysql/upgrades/1.0.0-rc2.sql index aa770c0e..02788be3 100644 --- a/schema/mysql/upgrades/1.0.0-rc2.sql +++ b/schema/mysql/upgrades/1.0.0-rc2.sql @@ -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,