###############################################################################
# Get a list of configured hosts
+formatConfig
hosts=$(cat /home/bdsm/.bdsm.conf.tmp | cut -d'{' -f1)
if [ -z $1 ]; then
help
elif [ $1 == "start" ]; then
- formatConfig
start
elif [ $1 == "stop" ]; then
- formatConfig
stop
elif [ $1 == "status" ]; then
- formatConfig
status
+elif [ $1 == "compatible" ]; then
+ compatible
elif [ $1 == "help" ]; then
help
fi
###############################################################################
# Get a list of configured hosts
+formatConfig
hosts=$(cat /home/bdsm/.bdsm.conf.tmp | cut -d'{' -f1)
if [ -z $1 ]; then
help
elif [ $1 == "start" ]; then
- formatConfig
start
elif [ $1 == "stop" ]; then
- formatConfig
stop
elif [ $1 == "status" ]; then
- formatConfig
status
elif [ $1 == "compatible" ]; then
- formatConfig
compatible
elif [ $1 == "help" ]; then
help
# Bash Daemon for System Monitoring
#
# TODO:
-# 1) Finish configure options
-# 2) Finish Deploy
-# 3) Review and shakeout stop
+# 1) Continuing checks (confirm start/stop/config of all plugins)
+# 2) Add 'logger' type and logger plugins
+# Logger won't hold an SSH connection open
+# A single host can be defined multiple times as different types
# ) Plugins:
-# 4) iostat
-# 5) ram
+# o) disk utilization - iostat
+# b) ram utilization - free or vmstat
+# c) network utilization - natstat and netstat -D
+# d) uptime
+# e) IP address - ifconfig
+# f) updates - native package manager
+# g) active users - ps -ef
+# h) active processes - ps -ef
#
###############################################################################
done
header "Configuring $host"
- # TODO:
- # Make availServices a null array; pass this value to a loop
- # Check compatibility, add compatible ones to the array
#availServices=$(ls /home/bdsm/bdsm.d | cut -d'.' -f1 | sort -u)
-
availServices=()
ls /home/bdsm/bdsm.d | cut -d'.' -f1 | sort -u | while read service; do
svc=`echo $service | sed 's/(.*)$//g'`