#!/bin/sh # Replace these variables with the correspondig values for your system # Exe is the location of the check_nt file from the NSclient archive # clientPwd is the password you set in Registry on the NT client # CPort = Default is 1248. Exe=/usr/local/nagios/libexec/check_nt ClientPwd= CPort=1248 # Get stats for number of messages sent/recvd. if [ $2 = "msg" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Inbound messages processed","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Outbound messages processed","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get stats for number of viruses found/removed if [ $2 = "vir" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Total virus infected files","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Total virus files cleaned","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get stats for number or SMTP errors and queue length if [ $2 = "err" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Total queue size","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Send SMTP mail error","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi