View Single Post
  #2  
Old 8th May 2009, 19:25
glohmann glohmann is offline
Junior Member
 
Join Date: May 2009
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default

At least for iso9660 and cramfs there is already a check in monitor_core_module.inc.php in function monitorDiskUsage() and unfortunately 'df -hT' does not report if the file system is mounted read-only.

Anyway here is the patch for the file to add udf as well:

--- monitor_core_module.inc.php 2009-05-08 18:21:44.000000000 +0200
+++ monitor_core_module.inc.php 2009-05-08 18:21:22.000000000 +0200
@@ -220,8 +220,8 @@ class monitor_core_module {
*/
$usePercent = floatval($data[$i]['percent']);

- //* We dont want to check the cdrom drive as a cd / dvd is always 100% full
- if($data[$i]['type'] != 'iso9660' && $data[$i]['type'] != 'cramfs') {
+ //* We dont want to check the cdrom drive as a cd / dvd is always 100% full
+ if($data[$i]['type'] != 'iso9660' && $data[$i]['type'] != 'cramfs' && $data[$i]['type'] != 'udf') {
if ($usePercent > 75) $state = $this->_setState($state, 'info');
if ($usePercent > 80) $state = $this->_setState($state, 'warning');
if ($usePercent > 90) $state = $this->_setState($state, 'critical');
Reply With Quote