#!/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/bin/check_nt ClientPwd=password 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 messages/files processed if [ $2 = "smtp" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Total messages processed","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail Viruswall\\Number of files scanned","%.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 # Get stats for number or HTTP & FTP files scanned if [ $2 = "webs" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan Web Viruswall\\Number of files scanned","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan FTP Viruswall\\Number of files scanned","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get stats for number or HTTP & FTP files infected if [ $2 = "webi" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan Web Viruswall\\Number of virus infected files","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan FTP Viruswall\\Number of virus infected files","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get stats for Total number of SMTP & HTTP files infected if [ $2 = "inff" ]; 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 Web Viruswall\\Number of virus infected files","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get stats for number of HTTP requests and scanned files if [ $2 = "http" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan Web Viruswall\\Number of clients serviced","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan Web Viruswall\\Number of files scanned","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get stats for number of FTP requests and scanned files if [ $2 = "ftp" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan FTP Viruswall\\Number of files transferred","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan FTP Viruswall\\Number of files scanned","%.f" $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi # Get system information on the CPU and Disk Usage if [ $2 = "sys" ]; then $Exe -H $1 -p $CPort -s $ClientPwd -v CPULOAD -l 5,80,95 | awk '{ print $5}' | sed s/'%)'// $Exe -H $1 -p $CPort -s $ClientPwd -v USEDDISKSPACE -l C | awk '{ print $10}' | sed s/'('// | sed s/'%)'// $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME echo $3 fi