Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23795 govind 1
#/bin/sh
2
 
3
file="/var/log/services/nagios-Monitoring.properties"
4
 
5
if [ -f "$file" ]
6
then
7
  while IFS='=' read -r key value
8
  do
9
    key=$(echo $key | tr '.' '_')
10
    eval ${key}=\${value}
11
  done < "$file"
12
  currentBalance=${currentSmsCount}
13
 
14
else
15
  echo "$file not found."
16
fi
17
if [ $currentBalance -lt 1000 ]; then
18
                echo "CRITICAL - $currentBalance"
19
                exit 2
20
        elif [ 1000 -le $currentBalance ]; then
21
                echo "OK - $currentBalance"
22
                exit 0
23
        else
24
                echo "UNKNOWN - $currentBalance"
25
                exit 3
26
fi
27