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
ISPConfig
ISPConfig 3
Commits
d7f1c84e
Commit
d7f1c84e
authored
Nov 29, 2015
by
Florian Schaal
Browse files
FS#3885 - LSI MegaRaid monitoring (code) (cwispy)
parent
248d0eeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/lib/classes/cron.d/100-monitor_raid.inc.php
View file @
d7f1c84e
...
...
@@ -275,6 +275,27 @@ class cronjob_monitor_raid extends cronjob {
}
}
/*
* LSI MegaRaid
*/
system
(
'which megacli'
,
$retval
);
system
(
'which megacli64'
,
$retval64
);
if
(
$retval
===
0
||
$retval64
===
0
)
{
$binary
=@
(
$retval
===
0
)
?
'megacli'
:
'megacli64'
;
$state
=
'ok'
;
$data
[
'output'
]
=
shell_exec
(
$binary
.
' -LDInfo -Lall -aAll'
);
if
(
strpos
(
$data
[
'output'
],
'Optimal'
)
!==
false
)
{
$this
->
_tools
->
_setState
(
$state
,
'ok'
);
}
else
if
(
strpos
(
$data
[
'output'
],
'Degraded'
)
!==
false
)
{
$this
->
_tools
->
_setState
(
$state
,
'critical'
);
}
else
if
(
strpos
(
$data
[
'output'
],
'Offline'
)
!==
false
)
{
$this
->
_tools
->
_setState
(
$state
,
'critical'
);
}
else
{
$this
->
_tools
->
_setState
(
$state
,
'critical'
);
}
}
$res
=
array
();
$res
[
'server_id'
]
=
$server_id
;
$res
[
'type'
]
=
$type
;
...
...
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