-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.conf.php
More file actions
223 lines (181 loc) · 6.2 KB
/
module.conf.php
File metadata and controls
223 lines (181 loc) · 6.2 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?php
/*
Config of the Module
*/
$module["name"] = "monitor";
$module["title"] = "top_menu_monitor";
$module["template"] = "module.tpl.htm";
$module["tab_width"] = '';
$module["startpage"] = "monitor/show_sys_state.php?state=system";
$module['order'] = '60';
unset($items);
$items[] = array( 'title' => "Overview",
'target' => 'content',
'link' => 'monitor/show_sys_state.php?state=system',
'html_id' => 'system');
$items[] = array( 'title' => "System-Log",
'target' => 'content',
'link' => 'monitor/log_list.php',
'html_id' => 'system_log');
$items[] = array( 'title' => 'Jobqueue',
'target' => 'content',
'link' => 'monitor/datalog_list.php',
'html_id' => 'jobqueue');
$items[] = array( 'title' => 'Data Log History',
'target' => 'content',
'link' => 'monitor/dataloghistory_list.php',
'html_id' => 'dataloghistory');
$module["nav"][] = array( 'title' => 'System State (All Servers)',
'open' => 1,
'items' => $items);
/*
We need all the available servers on the left navigation.
So fetch them from the database and add then to the navigation as dropdown-list
*/
$servers = $app->db->queryAllRecords("SELECT server_id, server_name FROM server order by server_name");
$dropDown = "<select id='server_id' onchange=\"ISPConfig.loadContent('monitor/show_sys_state.php?state=server&server=' + document.getElementById('server_id').value);\" class='form-control'>";
foreach ($servers as $server)
{
$dropDown .= "<option value='" . $server['server_id'] . "|" . $server['server_name'] . "'>" . $server['server_name'] . "</option>";
}
$dropDown .= "</select>";
/*
Now add them as dropdown to the navigation
*/
unset($items);
$items[] = array( 'title' => $dropDown,
'target' => '', // no action!
'link' => '', // no action!
'html_id' => 'select_server');
$module["nav"][] = array( 'title' => 'Server to Monitor',
'open' => 1,
'items' => $items);
/*
The first Server at the list is the server first selected
*/
$_SESSION['monitor']['server_id'] = $servers[0]['server_id'];
$_SESSION['monitor']['server_name'] = $servers[0]['server_name'];
/*
* Clear and set the Navigation-Items
*/
unset($items);
$items[] = array( 'title' => "CPU info",
'target' => 'content',
'link' => 'monitor/show_data.php?type=cpu_info',
'html_id' => 'cpu_info');
$module["nav"][] = array( 'title' => 'Hardware-Information',
'open' => 1,
'items' => $items);
/*
* Clear and set the Navigation-Items
*/
unset($items);
$items[] = array( 'title' => "Overview",
'target' => 'content',
'link' => 'monitor/show_sys_state.php?state=server',
'html_id' => 'server');
$items[] = array( 'title' => "Update State",
'target' => 'content',
'link' => 'monitor/show_data.php?type=system_update',
'html_id' => 'system_update');
$items[] = array( 'title' => "RAID state",
'target' => 'content',
'link' => 'monitor/show_data.php?type=raid_state',
'html_id' => 'raid_state');
$items[] = array( 'title' => "Server load",
'target' => 'content',
'link' => 'monitor/show_data.php?type=server_load',
'html_id' => 'serverload');
$items[] = array( 'title' => "Disk usage",
'target' => 'content',
'link' => 'monitor/show_data.php?type=disk_usage',
'html_id' => 'disk_usage');
$items[] = array( 'title' => "MySQL Database size",
'target' => 'content',
'link' => 'monitor/show_data.php?type=database_size',
'html_id' => 'database_usage');
$items[] = array( 'title' => "Memory usage",
'target' => 'content',
'link' => 'monitor/show_data.php?type=mem_usage',
'html_id' => 'mem_usage');
$items[] = array( 'title' => "Services",
'target' => 'content',
'link' => 'monitor/show_data.php?type=services',
'html_id' => 'services');
$items[] = array( 'title' => "Monit",
'target' => 'content',
'link' => 'monitor/show_monit.php',
'html_id' => 'monit');
$items[] = array( 'title' => "OpenVz VE BeanCounter",
'target' => 'content',
'link' => 'monitor/show_data.php?type=openvz_beancounter',
'html_id' => 'openvz_beancounter');
$items[] = array( 'title' => "Munin",
'target' => 'content',
'link' => 'monitor/show_munin.php',
'html_id' => 'munin');
$module["nav"][] = array( 'title' => 'Server State',
'open' => 1,
'items' => $items);
/*
* Clear and set the Navigation-Items
*/
unset($items);
$items[] = array( 'title' => "Mail-Queue",
'target' => 'content',
'link' => 'monitor/show_data.php?type=mailq',
'html_id' => 'mailq');
$items[] = array( 'title' => "Mail-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_mail',
'html_id' => 'log_mail');
$items[] = array( 'title' => "Mail warn-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_mail_warn',
'html_id' => 'log_mail_warn');
$items[] = array( 'title' => "Mail err-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_mail_err',
'html_id' => 'log_mail_err');
$items[] = array( 'title' => "System-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_messages',
'html_id' => 'log_messages');
$items[] = array( 'title' => "ISPC Cron-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_ispc_cron',
'html_id' => 'log_ispc_cron');
$items[] = array( 'title' => "Freshclam-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_freshclam',
'html_id' => 'log_freshclam');
$items[] = array( 'title' => "Let's Encrypt log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_letsencrypt',
'html_id' => 'log_letsencrypt');
$items[] = array( 'title' => "Clamav-Log",
'target' => 'content',
'link' => 'monitor/show_log.php?log=log_clamav',
'html_id' => 'log_clamav');
$items[] = array( 'title' => "RKHunter-Log",
'target' => 'content',
'link' => 'monitor/show_data.php?type=rkhunter',
'html_id' => 'rkhunter');
$items[] = array( 'title' => "fail2ban-Log",
'target' => 'content',
'link' => 'monitor/show_data.php?type=fail2ban',
'html_id' => 'fai2ban');
/*
$items[] = array( 'title' => "MongoDB-Log",
'target' => 'content',
'link' => 'monitor/show_data.php?type=mongodb',
'html_id' => 'mongodb');
*/
$items[] = array( 'title' => "IPTables",
'target' => 'content',
'link' => 'monitor/show_data.php?type=iptables',
'html_id' => 'iptables');
$module["nav"][] = array( 'title' => 'Logfiles',
'open' => 1,
'items' => $items);
?>