mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
parent
28743ca4d3
commit
eef7abd8c9
15 changed files with 10 additions and 68 deletions
|
|
@ -22,8 +22,6 @@ import (
|
|||
type Checksums struct {
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
GroupsChecksum string `json:"groups_checksum"`
|
||||
}
|
||||
|
||||
// Operator is the main worker for each config type. It takes a reference to a supervisor super, holding all required
|
||||
|
|
|
|||
|
|
@ -97,13 +97,11 @@ func TestOperator_DeleteHost(t *testing.T) {
|
|||
someChecksum := utils.EncodeChecksum(utils.Checksum("some_checksum"))
|
||||
|
||||
_, err = super.Dbw.Db.Exec(
|
||||
"INSERT INTO host(id, environment_id, name_checksum, properties_checksum, customvars_checksum, groups_checksum, name, name_ci, display_name, address, address6, address_bin, address6_bin, checkcommand, checkcommand_id, max_check_attempts, check_timeperiod, check_timeperiod_id, check_timeout, check_interval, check_retry_interval, active_checks_enabled, passive_checks_enabled, event_handler_enabled, notifications_enabled, flapping_enabled, flapping_threshold_low, flapping_threshold_high, perfdata_enabled, eventcommand, eventcommand_id, is_volatile, action_url_id, notes_url_id, notes, icon_image_id, icon_image_alt, zone, zone_id, command_endpoint, command_endpoint_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
"INSERT INTO host(id, environment_id, name_checksum, properties_checksum, name, name_ci, display_name, address, address6, address_bin, address6_bin, checkcommand, checkcommand_id, max_check_attempts, check_timeperiod, check_timeperiod_id, check_timeout, check_interval, check_retry_interval, active_checks_enabled, passive_checks_enabled, event_handler_enabled, notifications_enabled, flapping_enabled, flapping_threshold_low, flapping_threshold_high, perfdata_enabled, eventcommand, eventcommand_id, is_volatile, action_url_id, notes_url_id, notes, icon_image_id, icon_image_alt, zone, zone_id, command_endpoint, command_endpoint_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
someChecksum,
|
||||
super.EnvId,
|
||||
someChecksum,
|
||||
someChecksum,
|
||||
someChecksum,
|
||||
someChecksum,
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
@ -171,13 +169,11 @@ func TestOperator_UpdateHost(t *testing.T) {
|
|||
someChecksum := utils.EncodeChecksum(utils.Checksum("some_checksum"))
|
||||
|
||||
_, err = super.Dbw.Db.Exec(
|
||||
"INSERT INTO host(id, environment_id, name_checksum, properties_checksum, customvars_checksum, groups_checksum, name, name_ci, display_name, address, address6, address_bin, address6_bin, checkcommand, checkcommand_id, max_check_attempts, check_timeperiod, check_timeperiod_id, check_timeout, check_interval, check_retry_interval, active_checks_enabled, passive_checks_enabled, event_handler_enabled, notifications_enabled, flapping_enabled, flapping_threshold_low, flapping_threshold_high, perfdata_enabled, eventcommand, eventcommand_id, is_volatile, action_url_id, notes_url_id, notes, icon_image_id, icon_image_alt, zone, zone_id, command_endpoint, command_endpoint_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
"INSERT INTO host(id, environment_id, name_checksum, properties_checksum, name, name_ci, display_name, address, address6, address_bin, address6_bin, checkcommand, checkcommand_id, max_check_attempts, check_timeperiod, check_timeperiod_id, check_timeout, check_interval, check_retry_interval, active_checks_enabled, passive_checks_enabled, event_handler_enabled, notifications_enabled, flapping_enabled, flapping_threshold_low, flapping_threshold_high, perfdata_enabled, eventcommand, eventcommand_id, is_volatile, action_url_id, notes_url_id, notes, icon_image_id, icon_image_alt, zone, zone_id, command_endpoint, command_endpoint_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
utils.EncodeChecksum("a9ef44eb69fda8fbc32bee33322b6518057f559f"),
|
||||
super.EnvId,
|
||||
someChecksum,
|
||||
someChecksum,
|
||||
someChecksum,
|
||||
someChecksum,
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"groups_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
@ -61,8 +59,6 @@ type Host struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
GroupsChecksum string `json:"groups_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
DisplayName string `json:"display_name"`
|
||||
|
|
@ -119,8 +115,6 @@ func (h *Host) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(h.EnvId),
|
||||
utils.EncodeChecksum(h.NameChecksum),
|
||||
utils.EncodeChecksum(h.PropertiesChecksum),
|
||||
utils.EncodeChecksum(h.CustomvarsChecksum),
|
||||
utils.EncodeChecksum(h.GroupsChecksum),
|
||||
h.Name,
|
||||
h.NameCi,
|
||||
h.DisplayName,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
@ -28,7 +27,6 @@ type Hostgroup struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
DisplayName string `json:"display_name"`
|
||||
|
|
@ -56,7 +54,6 @@ func (h *Hostgroup) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(h.EnvId),
|
||||
utils.EncodeChecksum(h.NameChecksum),
|
||||
utils.EncodeChecksum(h.PropertiesChecksum),
|
||||
utils.EncodeChecksum(h.CustomvarsChecksum),
|
||||
h.Name,
|
||||
h.NameCi,
|
||||
h.DisplayName,
|
||||
|
|
|
|||
|
|
@ -15,9 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"users_checksum",
|
||||
"usergroups_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"host_id",
|
||||
|
|
@ -38,9 +35,6 @@ type Notification struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
UsersChecksum string `json:"users_checksum"`
|
||||
UsergroupsChecksum string `json:"usergroups_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
HostId string `json:"host_id"`
|
||||
|
|
@ -76,9 +70,6 @@ func (n *Notification) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(n.EnvId),
|
||||
utils.EncodeChecksum(n.NameChecksum),
|
||||
utils.EncodeChecksum(n.PropertiesChecksum),
|
||||
utils.EncodeChecksum(n.CustomvarsChecksum),
|
||||
utils.EncodeChecksum(n.UsersChecksum),
|
||||
utils.EncodeChecksum(n.UsergroupsChecksum),
|
||||
n.Name,
|
||||
n.NameCi,
|
||||
utils.EncodeChecksum(n.HostId),
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"groups_checksum",
|
||||
"host_id",
|
||||
"name",
|
||||
"name_ci",
|
||||
|
|
@ -57,8 +55,6 @@ type Service struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
GroupsChecksum string `json:"groups_checksum"`
|
||||
HostId string `json:"host_id"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
|
|
@ -114,8 +110,6 @@ func (s *Service) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(s.EnvId),
|
||||
utils.EncodeChecksum(s.NameChecksum),
|
||||
utils.EncodeChecksum(s.PropertiesChecksum),
|
||||
utils.EncodeChecksum(s.CustomvarsChecksum),
|
||||
utils.EncodeChecksum(s.GroupsChecksum),
|
||||
utils.EncodeChecksum(s.HostId),
|
||||
s.Name,
|
||||
s.NameCi,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
@ -28,7 +27,6 @@ type Servicegroup struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
DisplayName string `json:"display_name"`
|
||||
|
|
@ -56,7 +54,6 @@ func (s *Servicegroup) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(s.EnvId),
|
||||
utils.EncodeChecksum(s.NameChecksum),
|
||||
utils.EncodeChecksum(s.PropertiesChecksum),
|
||||
utils.EncodeChecksum(s.CustomvarsChecksum),
|
||||
s.Name,
|
||||
s.NameCi,
|
||||
s.DisplayName,
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"groups_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
@ -35,8 +33,6 @@ type User struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
GroupsChecksum string `json:"groups_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
DisplayName string `json:"display_name"`
|
||||
|
|
@ -70,8 +66,6 @@ func (u *User) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(u.EnvId),
|
||||
utils.EncodeChecksum(u.NameChecksum),
|
||||
utils.EncodeChecksum(u.PropertiesChecksum),
|
||||
utils.EncodeChecksum(u.CustomvarsChecksum),
|
||||
utils.EncodeChecksum(u.GroupsChecksum),
|
||||
u.Name,
|
||||
u.NameCi,
|
||||
u.DisplayName,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"customvars_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"display_name",
|
||||
|
|
@ -28,7 +27,6 @@ type Usergroup struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
CustomvarsChecksum string `json:"customvars_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
DisplayName string `json:"display_name"`
|
||||
|
|
@ -56,7 +54,6 @@ func (u *Usergroup) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(u.EnvId),
|
||||
utils.EncodeChecksum(u.NameChecksum),
|
||||
utils.EncodeChecksum(u.PropertiesChecksum),
|
||||
utils.EncodeChecksum(u.CustomvarsChecksum),
|
||||
u.Name,
|
||||
u.NameCi,
|
||||
u.DisplayName,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ var (
|
|||
"environment_id",
|
||||
"name_checksum",
|
||||
"properties_checksum",
|
||||
"parents_checksum",
|
||||
"name",
|
||||
"name_ci",
|
||||
"is_global",
|
||||
|
|
@ -29,7 +28,6 @@ type Zone struct {
|
|||
EnvId string `json:"environment_id"`
|
||||
NameChecksum string `json:"name_checksum"`
|
||||
PropertiesChecksum string `json:"checksum"`
|
||||
ParentsChecksum string `json:"parents_checksum"`
|
||||
Name string `json:"name"`
|
||||
NameCi *string `json:"name_ci"`
|
||||
IsGlobal bool `json:"is_global"`
|
||||
|
|
@ -58,7 +56,6 @@ func (z *Zone) UpdateValues() []interface{} {
|
|||
utils.EncodeChecksum(z.EnvId),
|
||||
utils.EncodeChecksum(z.NameChecksum),
|
||||
utils.EncodeChecksum(z.PropertiesChecksum),
|
||||
utils.EncodeChecksum(z.ParentsChecksum),
|
||||
z.Name,
|
||||
z.NameCi,
|
||||
utils.Bool[z.IsGlobal],
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ CREATE TABLE host (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(host.vars)',
|
||||
groups_checksum binary(20) NOT NULL COMMENT 'sha1(hostgroup.name + hostgroup.name ...)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
@ -71,7 +69,6 @@ CREATE TABLE hostgroup (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(hostgroup.vars)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
@ -153,8 +150,6 @@ CREATE TABLE service (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(service.vars)',
|
||||
groups_checksum binary(20) NOT NULL COMMENT 'sha1(servicegroup.name + servicegroup.name ...)',
|
||||
host_id binary(20) NOT NULL COMMENT 'sha1(host.id)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
|
|
@ -209,7 +204,6 @@ CREATE TABLE servicegroup (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(servicegroup.vars)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
@ -550,9 +544,6 @@ CREATE TABLE notification (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL,
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(notification.vars)',
|
||||
users_checksum binary(20) NOT NULL,
|
||||
usergroups_checksum binary(20) NOT NULL,
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
@ -711,8 +702,6 @@ CREATE TABLE user (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(user.vars)',
|
||||
groups_checksum binary(20) NOT NULL COMMENT 'sha1(usergroup.name + userroup.name ...)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
@ -738,7 +727,6 @@ CREATE TABLE usergroup (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
customvars_checksum binary(20) NOT NULL COMMENT 'sha1(usergroup.vars)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
@ -781,7 +769,6 @@ CREATE TABLE zone (
|
|||
environment_id binary(20) NOT NULL COMMENT 'sha1(environment.name)',
|
||||
name_checksum binary(20) NOT NULL COMMENT 'sha1(name)',
|
||||
properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)',
|
||||
parents_checksum binary(20) NOT NULL COMMENT 'sha1(all parents checksums)',
|
||||
|
||||
name varchar(255) NOT NULL,
|
||||
name_ci varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
id;environment_id;name_checksum;properties_checksum;customvars_checksum;groups_checksum;name;name_ci;display_name;address;address6;address_bin;address6_bin;checkcommand;checkcommand_id;max_check_attempts;check_timeperiod;check_timeperiod_id;check_timeout;check_interval;check_retry_interval;active_checks_enabled;passive_checks_enabled;event_handler_enabled;notifications_enabled;flapping_enabled;flapping_threshold_low;flapping_threshold_high;perfdata_enabled;eventcommand;eventcommand_id;is_volatile;action_url_id;notes_url_id;notes;icon_image_id;icon_image_alt;zone;zone_id;command_endpoint;command_endpoint_id
|
||||
4bf94dba13178df0a0a4;b65da3345b7d4cff9a24;29d5877b34cc481ddf93;52ea2238f3f248295f4e;fe98cdc58d454dd68c6c;2f27f2ad0f9e725febb1;host-1.example.com;host-1.example.com;Host-1;127.0.0.1;::1;abcd;abcdefgh;/bin/foobar;028c76d230427a74cf13;3;24x7;0f75d7bbb6bcc4ac23cc;50;60;10;y;y;y;y;y;"";"";y;"";"";n;"";"";foobar asdf;"";"";master;5bf526ee976b4ccade5a;host-1.example.com;de05024e342884336eb9
|
||||
id;environment_id;name_checksum;properties_checksum;name;name_ci;display_name;address;address6;address_bin;address6_bin;checkcommand;checkcommand_id;max_check_attempts;check_timeperiod;check_timeperiod_id;check_timeout;check_interval;check_retry_interval;active_checks_enabled;passive_checks_enabled;event_handler_enabled;notifications_enabled;flapping_enabled;flapping_threshold_low;flapping_threshold_high;perfdata_enabled;eventcommand;eventcommand_id;is_volatile;action_url_id;notes_url_id;notes;icon_image_id;icon_image_alt;zone;zone_id;command_endpoint;command_endpoint_id
|
||||
4bf94dba13178df0a0a4;b65da3345b7d4cff9a24;29d5877b34cc481ddf93;52ea2238f3f248295f4e;host-1.example.com;host-1.example.com;Host-1;127.0.0.1;::1;abcd;abcdefgh;/bin/foobar;028c76d230427a74cf13;3;24x7;0f75d7bbb6bcc4ac23cc;50;60;10;y;y;y;y;y;"";"";y;"";"";n;"";"";foobar asdf;"";"";master;5bf526ee976b4ccade5a;host-1.example.com;de05024e342884336eb9
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
id;environment_id;name_checksum;properties_checksum;groups_checksum;host_checksum;name;name_ci;display_name;checkcommand;checkcommand_id;max_check_attempts;check_timeperiod;check_timeperiod_id;check_timeout;check_interval;check_retry_interval;active_checks_enabled;passive_checks_enabled;event_handler_enabled;notifications_enabled;flapping_enabled;flapping_threshold_low;flapping_threshold_high;perfdata_enabled;eventcommand;eventcommand_id;is_volatile;action_url_id;notes_url_id;notes;icon_image_id;icon_image_alt;zone;zone_id;command_endpoint;command_endpoint_id
|
||||
761cd44dac02475eace0;b65da3345b7d4cff9a24;c06ec2d10dc547f4b0ae;0fe34c2ab0a84d70bc1f;bafbaa5b9c024db19376;4bf94dba13178df0a0a4;ssh;ssh;SSH;ssh;028c76d230427a74cf13;3;24x7;f82ff663461d45baac03;60;60;10;y;y;y;y;y;NULL;NULL;y;NULL;NULL;n;NULL;NULL;NULL;NULL;NULL;master;5bf526ee976b4ccade5a;host-1.example.com;4bf94dba13178df0a0a4
|
||||
id;environment_id;name_checksum;properties_checksum;host_checksum;name;name_ci;display_name;checkcommand;checkcommand_id;max_check_attempts;check_timeperiod;check_timeperiod_id;check_timeout;check_interval;check_retry_interval;active_checks_enabled;passive_checks_enabled;event_handler_enabled;notifications_enabled;flapping_enabled;flapping_threshold_low;flapping_threshold_high;perfdata_enabled;eventcommand;eventcommand_id;is_volatile;action_url_id;notes_url_id;notes;icon_image_id;icon_image_alt;zone;zone_id;command_endpoint;command_endpoint_id
|
||||
761cd44dac02475eace0;b65da3345b7d4cff9a24;c06ec2d10dc547f4b0ae;0fe34c2ab0a84d70bc1f;4bf94dba13178df0a0a4;ssh;ssh;SSH;ssh;028c76d230427a74cf13;3;24x7;f82ff663461d45baac03;60;60;10;y;y;y;y;y;NULL;NULL;y;NULL;NULL;n;NULL;NULL;NULL;NULL;NULL;master;5bf526ee976b4ccade5a;host-1.example.com;4bf94dba13178df0a0a4
|
||||
1c26aa30d3b9406ba838;b65da3345b7d4cff9a24;54cb075cbcfe43a6b927;f9250c3bc58248d7b5e6;1247ae00b6ef4f0ca7e1;129421882f9a5d27097f;http;http;HTTP;http;7c6a6e2c6cd0b7eb6e3d;3;24x7;f82ff663461d45baac03;60;60;10;y;y;n;y;n;NULL;NULL;y;NULL;NULL;n;NULL;NULL;NULL;NULL;NULL;master;5bf526ee976b4ccade5a;NULL;NULL
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
id;environment_id;name_checksum;properties_checksum;groups_checksum;name;name_ci;label;email;pager;notifications_enabled;timeperiod_id;states;types;zone_id
|
||||
68e12f6f9ebb42cea93b;b65da3345b7d4cff9a24;9379c8d791fe4728ab4c;d75ffc6507b34f18b083;210436e39ad141d189b4;John;john;John;john@doe.com;NULL;y;f98a83dfd1fd4aaa9af9;15;96;5bf526ee976b4ccade5a
|
||||
id;environment_id;name_checksum;properties_checksum;name;name_ci;label;email;pager;notifications_enabled;timeperiod_id;states;types;zone_id
|
||||
68e12f6f9ebb42cea93b;b65da3345b7d4cff9a24;9379c8d791fe4728ab4c;d75ffc6507b34f18b083;John;john;John;john@doe.com;NULL;y;f98a83dfd1fd4aaa9af9;15;96;5bf526ee976b4ccade5a
|
||||
2744e0261ab04aa2ad66;b65da3345b7d4cff9a24;c04cdda645d341c1bfc3;c49635a2d3e74f329d60;9f57dd06be924335ad1c;Bob;bob;Bob;bob@apple.com;NULL;y;996b2dfd57a14d39b815;7;32;5bf526ee976b4ccade5a
|
||||
|
|
|
@ -29,7 +29,7 @@ func Test_DecodePool(t *testing.T) {
|
|||
|
||||
var TestPackageA = JsonDecodePackage{
|
||||
"3a18e07f776af383cd7355b89eefd1fdf0fd47a9",
|
||||
"{\"checkcommand_id\":\"0bba6ab6747f1c0de3bf80932d10bc7b603e27fc\",\"customvars_checksum\":\"5ba93c9db0cff93f52b521d7420e43f6eda2784f\",\"environment_id\":\"90a8834de76326869f3e703cd61513081ad73d3c\",\"group_ids\":[],\"groups_checksum\":\"a0930d202ae77bbafbc4d898e3d060f462160904\",\"name_checksum\":\"21021feda571e19d8afb53fb11ca089db7578cee\",\"properties_checksum\":\"8d515de29444d9df3e374bcc1b890040fcc48be5\"}",
|
||||
"{\"checkcommand_id\":\"0bba6ab6747f1c0de3bf80932d10bc7b603e27fc\",\"environment_id\":\"90a8834de76326869f3e703cd61513081ad73d3c\",\"group_ids\":[],\"name_checksum\":\"21021feda571e19d8afb53fb11ca089db7578cee\",\"properties_checksum\":\"8d515de29444d9df3e374bcc1b890040fcc48be5\"}",
|
||||
"{\"active_checks_enabled\":true,\"address\":\"\",\"address6\":\"\",\"check_interval\":60.0,\"check_retry_interval\":60.0,\"check_timeout\":null,\"checkcommand\":\"random\",\"display_name\":\"aa3derphosta469\",\"event_handler_enabled\":true,\"flapping_enabled\":false,\"flapping_threshold_high\":30.0,\"flapping_threshold_low\":25.0,\"icon_image_alt\":\"\",\"is_volatile\":false,\"max_check_attempts\":3.0,\"name\":\"aa3derphosta469\",\"notes\":\"\",\"notifications_enabled\":true,\"passive_checks_enabled\":true,\"perfdata_enabled\":true}",
|
||||
nil,
|
||||
host.ObjectInformation.Factory,
|
||||
|
|
@ -38,7 +38,7 @@ func Test_DecodePool(t *testing.T) {
|
|||
|
||||
var TestPackageB = JsonDecodePackage{
|
||||
"7dd90e9833243afef861f257c78ddee941edfa2f",
|
||||
"{\"checkcommand_id\":\"0bba6ab6747f1c0de3bf80932d10bc7b603e27fc\",\"customvars_checksum\":\"5ba93c9db0cff93f52b521d7420e43f6eda2784f\",\"environment_id\":\"90a8834de76326869f3e703cd61513081ad73d3c\",\"group_ids\":[],\"groups_checksum\":\"a0930d202ae77bbafbc4d898e3d060f462160904\",\"name_checksum\":\"f14feab0710d05e4ca9ffd712f8c0af5d8f5119a\",\"properties_checksum\":\"bd3e124054427700571dae7552aa90e3fe4f1fde\"}",
|
||||
"{\"checkcommand_id\":\"0bba6ab6747f1c0de3bf80932d10bc7b603e27fc\",\"environment_id\":\"90a8834de76326869f3e703cd61513081ad73d3c\",\"group_ids\":[],\"name_checksum\":\"f14feab0710d05e4ca9ffd712f8c0af5d8f5119a\",\"properties_checksum\":\"bd3e124054427700571dae7552aa90e3fe4f1fde\"}",
|
||||
"{\"active_checks_enabled\":true,\"address\":\"\",\"address6\":\"\",\"check_interval\":60.0,\"check_retry_interval\":60.0,\"check_timeout\":null,\"checkcommand\":\"random\",\"display_name\":\"aa3derphosta378\",\"event_handler_enabled\":true,\"flapping_enabled\":false,\"flapping_threshold_high\":30.0,\"flapping_threshold_low\":25.0,\"icon_image_alt\":\"\",\"is_volatile\":false,\"max_check_attempts\":3.0,\"name\":\"aa3derphosta378\",\"notes\":\"\",\"notifications_enabled\":true,\"passive_checks_enabled\":true,\"perfdata_enabled\":true}",
|
||||
nil,
|
||||
host.ObjectInformation.Factory,
|
||||
|
|
|
|||
Loading…
Reference in a new issue