-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopulate_sample_data.php
More file actions
67 lines (50 loc) · 2.72 KB
/
populate_sample_data.php
File metadata and controls
67 lines (50 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?
chdir("/var/www/bartlby-ui/");
include "config.php";
include "layout.class.php";
include "bartlby-ui.class.php";
$btl = new BartlbyUI($Bartlby_CONF, false);
$server_dummy = array(
"server_name" => "localhost",
"server_ip" => "127.0.0.1",
"server_port" => 9030,
"server_icon" => "linux.gif",
"server_enabled" => 1,
"server_notify" => 1,
"server_flap_seconds" => 122,
"server_ssh_keyfile" => "",
"server_ssh_passphrase" => "",
"server_ssh_username" => "",
"server_dead" => 0,
"exec_plan" => "",
"enabled_triggers" => "",
"default_service_type" => 1,
"orch_id" => 0,
"web_hooks" => "",
'json_endpoint' => "",
'web_hooks_level' => 0
);
$add_server=bartlby_add_server($btl->RES, $server_dummy);
$p = $btl->installPackage("default-pkg", $add_server, NULL, NULL);
echo "added a server with a default package for active checks";
$servergroup_dummy = array(
"servergroup_name" => "DEFAULT",
"servergroup_active" => 1,
"servergroup_notify" => 1,
"enabled_triggers" => "",
"servergroup_members" => "",
"servergroup_dead" => 0,
"orch_id" => 0
);
$servicegroup_dummy = array(
"servicegroup_name" => "DEFAULT",
"servicegroup_active" => 1,
"servicegroup_notify" => 1,
"enabled_triggers" => "",
"servicegroup_members" => "",
"servicegroup_dead" => 0,
"orch_id" => 0
);
$add_servergroup = bartlby_add_servicegroup($btl->RES, $servicegroup_dummy);
$add_servergroup = bartlby_add_servergroup($btl->RES, $servergroup_dummy);
echo "added default server/service group";