3 MONITOR_TYPE=${MONITOR_TYPE:-sample}
5 function is_monitor_supported {
7 [[ -f $TOP_DIR/lib/monitors/$monitor/$monitor ]]
12 [[ $monitor == $MONITOR_TYPE ]]
15 function start_monitor {
16 start_monitor_$MONITOR_TYPE
19 function stop_monitor {
20 stop_monitor_$MONITOR_TYPE
23 function cleanup_monitor {
24 cleanup_monitor_$MONITOR_TYPE
27 if ! is_monitor_supported $MONITOR_TYPE; then
28 die $LINENO "MONITOR_TYPE=$MONITOR_TYPE is not supported."
31 source $TOP_DIR/lib/monitors/$MONITOR_TYPE/$MONITOR_TYPE