Skip to content

Commit 320fcd8

Browse files
authored
Merge pull request #308 from Icinga/feature/normalized_performance_data
Introduce *_state#normalized_performance_data
2 parents 2eb914a + 9bf1512 commit 320fcd8

File tree

3 files changed

+33
-27
lines changed

3 files changed

+33
-27
lines changed

pkg/icingadb/v1/state.go

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,32 @@ import (
55
)
66

77
type State struct {
8-
EntityWithChecksum `json:",inline"`
9-
EnvironmentMeta `json:",inline"`
10-
AcknowledgementCommentId types.Binary `json:"acknowledgement_comment_id"`
11-
Attempt uint8 `json:"check_attempt"`
12-
CheckCommandline types.String `json:"commandline"`
13-
CheckSource types.String `json:"check_source"`
14-
ExecutionTime float64 `json:"execution_time"`
15-
HardState uint8 `json:"hard_state"`
16-
InDowntime types.Bool `json:"in_downtime"`
17-
IsAcknowledged types.AcknowledgementState `json:"acknowledgement"`
18-
IsFlapping types.Bool `json:"is_flapping"`
19-
IsHandled types.Bool `json:"is_handled"`
20-
IsProblem types.Bool `json:"is_problem"`
21-
IsReachable types.Bool `json:"is_reachable"`
22-
LastStateChange types.UnixMilli `json:"last_state_change"`
23-
LastUpdate types.UnixMilli `json:"last_update"`
24-
Latency float64 `json:"latency"`
25-
LongOutput types.String `json:"long_output"`
26-
NextCheck types.UnixMilli `json:"next_check"`
27-
NextUpdate types.UnixMilli `json:"next_update"`
28-
Output types.String `json:"output"`
29-
PerformanceData types.String `json:"performance_data"`
30-
PreviousHardState uint8 `json:"previous_hard_state"`
31-
Severity uint16 `json:"severity"`
32-
SoftState uint8 `json:"state"`
33-
StateType types.StateType `json:"state_type"`
34-
Timeout float64 `json:"check_timeout"`
8+
EntityWithChecksum `json:",inline"`
9+
EnvironmentMeta `json:",inline"`
10+
AcknowledgementCommentId types.Binary `json:"acknowledgement_comment_id"`
11+
Attempt uint8 `json:"check_attempt"`
12+
CheckCommandline types.String `json:"commandline"`
13+
CheckSource types.String `json:"check_source"`
14+
ExecutionTime float64 `json:"execution_time"`
15+
HardState uint8 `json:"hard_state"`
16+
InDowntime types.Bool `json:"in_downtime"`
17+
IsAcknowledged types.AcknowledgementState `json:"acknowledgement"`
18+
IsFlapping types.Bool `json:"is_flapping"`
19+
IsHandled types.Bool `json:"is_handled"`
20+
IsProblem types.Bool `json:"is_problem"`
21+
IsReachable types.Bool `json:"is_reachable"`
22+
LastStateChange types.UnixMilli `json:"last_state_change"`
23+
LastUpdate types.UnixMilli `json:"last_update"`
24+
Latency float64 `json:"latency"`
25+
LongOutput types.String `json:"long_output"`
26+
NextCheck types.UnixMilli `json:"next_check"`
27+
NextUpdate types.UnixMilli `json:"next_update"`
28+
Output types.String `json:"output"`
29+
PerformanceData types.String `json:"performance_data"`
30+
NormalizedPerformanceData types.String `json:"normalized_performance_data"`
31+
PreviousHardState uint8 `json:"previous_hard_state"`
32+
Severity uint16 `json:"severity"`
33+
SoftState uint8 `json:"state"`
34+
StateType types.StateType `json:"state_type"`
35+
Timeout float64 `json:"check_timeout"`
3536
}

schema/mysql/schema.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ CREATE TABLE host_state (
132132
output mediumtext DEFAULT NULL,
133133
long_output mediumtext DEFAULT NULL,
134134
performance_data mediumtext DEFAULT NULL,
135+
normalized_performance_data mediumtext DEFAULT NULL,
135136
check_commandline text DEFAULT NULL,
136137

137138
is_problem enum('n', 'y') NOT NULL,
@@ -283,6 +284,8 @@ CREATE TABLE service_state (
283284
output mediumtext DEFAULT NULL,
284285
long_output mediumtext DEFAULT NULL,
285286
performance_data mediumtext DEFAULT NULL,
287+
normalized_performance_data mediumtext DEFAULT NULL,
288+
286289
check_commandline text DEFAULT NULL,
287290

288291
is_problem enum('n', 'y') NOT NULL,

schema/mysql/upgrades/1.0.0-rc2.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ ALTER TABLE host
4242
MODIFY perfdata_enabled enum('n','y') NOT NULL,
4343
MODIFY is_volatile enum('n','y') NOT NULL;
4444
ALTER TABLE host_state
45+
ADD COLUMN normalized_performance_data mediumtext DEFAULT NULL AFTER performance_data,
4546
MODIFY is_problem enum('n','y') NOT NULL,
4647
MODIFY is_handled enum('n','y') NOT NULL,
4748
MODIFY is_reachable enum('n','y') NOT NULL,
@@ -58,6 +59,7 @@ ALTER TABLE service
5859
MODIFY perfdata_enabled enum('n','y') NOT NULL,
5960
MODIFY is_volatile enum('n','y') NOT NULL;
6061
ALTER TABLE service_state
62+
ADD COLUMN normalized_performance_data mediumtext DEFAULT NULL AFTER performance_data,
6163
MODIFY is_problem enum('n','y') NOT NULL,
6264
MODIFY is_handled enum('n','y') NOT NULL,
6365
MODIFY is_reachable enum('n','y') NOT NULL,

0 commit comments

Comments
 (0)