jeudi 16 février 2012

Squirrelmail installation

aptitude install dovecot-common dovecot-imapd dovecot-pop3d

aptitude install squirrelmail

ln -s /etc/squirrelmail/apache.conf /etc/apache2/conf.d/squirrelmail.conf

ln -s /usr/share/squirrelmail /var/www/squirrelmail

chgrp -R www-data /usr/share/squirrelmail/

vendredi 10 février 2012

check_centreon_remote_storage returns negative value for a disk

You monitor a disk with a capacity of several terra bytes.

The values ​​returned by the plugin check_centreon_remote_storage are negative.

You can fix this by editing the plugin check_centreon_remote_storage.

replaces this
##############################
$tot = 1;
$tot = $Size * $AllocationUnits;
if (!$tot){$tot = 1;}
$used = $Used * $AllocationUnits;
$pourcent = ($used * 100) / $tot;
##############################

by this
##############################
$tot = 1;
# PIEBRA modification
if ($Size < 0){$Size += 2**32;}
if ($Used < 0){$Used += 2**32;}
# END PIEBRA

$tot = $Size * $AllocationUnits;
if (!$tot){$tot = 1;}
$used = $Used * $AllocationUnits;
$pourcent = ($used * 100) / $tot;
##############################

And everything will be OK!