Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem AIX email to mail server (MS Outlook) 1

Status
Not open for further replies.

tedans

Technical User
Feb 18, 2002
45
0
0
US
hi,

I would like to ask for help on this matter:
We have a AIX server and we would like to set it up that whenever a filesystem reaches its percentage used to 85% it would automatically send notice by email through the mail server (where we have MS Outlook as means for our email) so that we can be notified of its warning. Our problem is on how do we setup the server to be able to send email notification to the mail server. Would highly appreciate any inputs.
 
/etc/resolv.conf
search xxxxxx.xxxxxx
nameserver xx.xx.xx.xx

/etc/sendmail.cf
#DSmailer:relayhostname
DSsmtp:smptrelayname.domainename

script check size of FS
#!/bin/ksh
#----------------------------------------------------
# Verifie le taux de remplissage des FS
# Donne le nombre de FS problematiques
# specifie les FS avec leur taux d'occupation
#----------------------------------------------------
# David MARAIS 16/09/02 Creation
# David MARAIS 17/07/03 NFS exclus
#----------------------------------------------------
# Definitions
#----------------------------------------------------
# VARIABLES
SEUIL=95
# seuil de remplissage FS declenchant une alerte
#----------------------------------------------------
# VARIABLES INTERMEDIAIRES
FSNUMBER=0
#FSNUMBER= Nombre de FS au dessus du seuil de remplissage
LOGFILE0=/sma/sys/log/fs.log
export SEUIL
#----------------------------------------------------
#----------------------------------------------------
# la ligne ci dessous permet de faire un df avec seulement les JFS vers un fichier resultat
# les NFS et CDRFS sont exclus
# on en extrait seulement le champ quatre en retirant le signe %
df -k | grep -v proc| grep -v :| grep -v cd0 | grep -v Mounted | awk '{print $4}'| sed "s/%//g" > $LOGFILE0
# boucle pour determiner si il existe y a des FS a plus de X %
#----------------------------------------------------
for i in `cat $LOGFILE0`
do
# si superieur au seuil on incremente la variable FSNUMBER
if [ "$i" -gt "$SEUIL" ];
then
let FSNUMBER=$FSNUMBER+1
fi
done
#----------------------------------------------------
# si FSNUMEBR est different de 0 alors il y a des FS MAUVAIS
if [ "$FSNUMBER" -ne 0 ];
then
# Un ou des FS au dessus du seuil
echo "Le test du taux de remplissage des FS est MAUVAIS"
echo "Le seuil de remplissage est de $SEUIL%"
echo "*********************************************"
echo "Il existe $FSNUMBER filesystem(s) a un taux de remplissage superieur a $SEUIL%"
echo "Voici la liste des Filesystems en alerte:"
/usr/bin/df -Ik |grep dev|grep -v cdrom|awk 'BEGIN{max=ENVIRON["SEUIL"]}{ util=int($5); if (util > max ) { printf "Le Systeme de Fichier " $6 " est rempli au pourcentage de: " } if (util > max ) { print $5} } END {}'
else
# Pas de FS au dessus du seuil
echo "Le test du taux de remplissage des FS est BON"
echo "Le seuil de remplissage est de $SEUIL%"
fi

sens a mail
/usr/bin/mail -s "TITLE $MAILAD < $LOGFILE
MAILAD=d.me@society.com
LOGFILE=/etc/motd



 
Bonjour,

Thanks dmarais, I tried to do this in a much more complicated way to make my Unix box talk to my Domino mail server and failed. In fact I had just missed the little line in sendmail.cf.

Merci encore !

Laurence
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top