Bug: ISPConfig 3.0.1 - Monitor

Discussion in 'Developers' Forum' started by glohmann, May 8, 2009.

  1. glohmann

    glohmann New Member

    I miss some kind of BugTracker for ISPConfig ... so I will post it here ;)

    The Monitor in ISPConfig should not check for free space on the following devices:
    - iso9660 CD/DVD mounts
    - udf CD/DVD mounts
    - read only mounts

    If you add a read only mount like a CD or DVD the monitor will report a false error due to 0 disk space left on that drive
    Filesystem Type Size Used Available Use% Mounted on
    /dev/sr0 udf 1,4G 1,4G 0 100% /media/backupDVD
  2. glohmann

    glohmann New Member

    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');
  3. falko

    falko Super Moderator ISPConfig Developer

  4. glohmann

    glohmann New Member

    sorry ... already filed it as FS#727 but forgot to mention it here in the forum. I also uploaded the patch file so that it can be downloaded directly (link can be found in the bugtracker)
  5. BorderAmigos

    BorderAmigos New Member

    Can some tables be added in future releases to tweak the values at which errors are flagged? I tweaked the disk full value in the code from 95 to 98 but it will probably get overwritten on an update.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Tables that are not in a relaesed version will be removed on updates. It might be that we will add a different database updater in future.
  7. BorderAmigos

    BorderAmigos New Member

    I didn't add tables. In monitor_core_module.inc.php I changed
    if ($usePercent > 75) $state = $this->_setState($state, 'info');
    if ($usePercent > 80) $state = $this->_setState($state, 'warning');
    if ($usePercent > 90) $state = $this->_setState($state, 'critical');
    if ($usePercent > 95) $state = $this->_setState($state, 'error');
    if ($usePercent > 85) $state = $this->_setState($state, 'info');
    if ($usePercent > 90) $state = $this->_setState($state, 'warning');
    if ($usePercent > 96) $state = $this->_setState($state, 'critical');
    if ($usePercent > 98) $state = $this->_setState($state, 'error');
    ... which will probably be overwritten on an update.

    I was only suggesting that the values (75, 80, 90, 95) and other similar things be administrator configurable via tables on some future version.

Share This Page