Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
220bb93b
Commit
220bb93b
authored
Apr 30, 2010
by
vogelor
Browse files
The Monitor now also shows the distribution and the version
parent
ef56c9a1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
install/lib/install.lib.php
View file @
220bb93b
...
@@ -56,6 +56,10 @@ error_reporting(E_ALL|E_STRICT);
...
@@ -56,6 +56,10 @@ error_reporting(E_ALL|E_STRICT);
$FILE
=
realpath
(
'../install.php'
);
$FILE
=
realpath
(
'../install.php'
);
//** Get distribution identifier
//** Get distribution identifier
//** IMPORTANT!
// This is the same code as in /server/mods-available/monitor_core_module.inc.php
// So if you change it here, you also have to change it in
// /server/mods-available/monitor_core_module.inc.php!
function
get_distname
()
{
function
get_distname
()
{
$distname
=
''
;
$distname
=
''
;
...
...
interface/web/monitor/show_sys_state.php
View file @
220bb93b
<?php
<?php
/*
/*
Copyright (c) 2007-200
8
, Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com
Copyright (c) 2007-20
1
0, Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com
All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
Redistribution and use in source and binary forms, with or without modification,
...
@@ -135,23 +135,31 @@ function _getServerState($serverId, $serverName, $showAll)
...
@@ -135,23 +135,31 @@ function _getServerState($serverId, $serverName, $showAll)
* get all monitoring-data from the server als process then
* get all monitoring-data from the server als process then
* (count them and set the server-state)
* (count them and set the server-state)
*/
*/
$records
=
$app
->
db
->
queryAllRecords
(
"SELECT DISTINCT type FROM monitor_data WHERE server_id = "
.
$serverId
);
$records
=
$app
->
db
->
queryAllRecords
(
"SELECT DISTINCT type, data FROM monitor_data WHERE server_id = "
.
$serverId
);
foreach
(
$records
as
$record
){
$osData
=
null
;
_processDbState
(
$record
[
'type'
],
$serverId
,
&
$serverState
,
&
$messages
);
foreach
(
$records
as
$record
){
/* get the state from the db-data */
_processDbState
(
$record
[
'type'
],
$serverId
,
&
$serverState
,
&
$messages
);
/* if we have the os-info, get it */
if
(
$record
[
'type'
]
==
'os_info'
)
$osData
=
unserialize
(
$record
[
'data'
]);
}
}
$res
.
=
'<div class="systemmonitor-state state-'
.
$serverState
.
'">'
;
$res
.
=
'<div class="systemmonitor-state state-'
.
$serverState
.
'">'
;
$res
.
=
'<div class="systemmonitor-device device-server">'
;
$res
.
=
'<div class="systemmonitor-device device-server">'
;
$res
.
=
'<div class="systemmonitor-content icons32 ico-'
.
$serverState
.
'">'
;
$res
.
=
'<div class="systemmonitor-content icons32 ico-'
.
$serverState
.
'">'
;
$res
.
=
$app
->
lng
(
"monitor_serverstate_server_txt"
)
.
': '
.
$serverName
.
'<br />'
;
$res
.
=
$app
->
lng
(
"monitor_serverstate_server_txt"
)
.
': '
.
$serverName
;
$res
.
=
$app
->
lng
(
"monitor_serverstate_state_txt"
)
.
': '
.
$serverState
.
'<br />'
;
if
(
$osData
!=
null
){
$res
.
=
' ('
.
$osData
[
'name'
]
.
' '
.
$osData
[
'version'
]
.
')'
;
}
$res
.
=
'<br />'
;
$res
.
=
$app
->
lng
(
"monitor_serverstate_state_txt"
)
.
': '
.
$serverState
.
' ('
;
// $res .= sizeof($messages[$app->lng("monitor_serverstate_listok_txt")]) . ' ok | ';
// $res .= sizeof($messages[$app->lng("monitor_serverstate_listok_txt")]) . ' ok | ';
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listunknown_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_unknown_txt"
)
.
'
|
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listunknown_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_unknown_txt"
)
.
'
,
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listinfo_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_info_txt"
)
.
'
|
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listinfo_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_info_txt"
)
.
'
,
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listwarning_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_warning_txt"
)
.
'
|
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listwarning_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_warning_txt"
)
.
'
,
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listcritical_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_critical_txt"
)
.
'
|
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listcritical_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_critical_txt"
)
.
'
,
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listerror_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_error_txt"
)
.
'
<br />
'
;
$res
.
=
sizeof
(
$messages
[
$app
->
lng
(
"monitor_serverstate_listerror_txt"
)])
.
' '
.
$app
->
lng
(
"monitor_serverstate_error_txt"
)
.
''
;
$res
.
=
'<br />'
;
$res
.
=
'
)
<br />'
;
if
(
$showAll
){
if
(
$showAll
){
/*
/*
...
...
server/mods-available/monitor_core_module.inc.php
View file @
220bb93b
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment