Improving processor status display
authorBrian Flowers <git-admn@bsflowers.net>
Fri, 4 Nov 2016 01:28:46 +0000 (21:28 -0400)
committerBrian Flowers <git-admn@bsflowers.net>
Fri, 4 Nov 2016 01:28:46 +0000 (21:28 -0400)
TODO
bin/bdsm.sh

diff --git a/TODO b/TODO
index 6b903a2..a98e2a8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,14 +1,11 @@
 TODO
 
 BUGFIXES:
- - Fix sqlite3 logging -- needs to be globally writable
-    May require folder structure refactoring
  - Confirm configure correctly adds/removes services
- - Fix deploy for refactored locations
 
 
 PLUGINS:
- - sqlite3/file processors to reject and log malformed records\
+ - sqlite3/file processors to reject and log malformed records
  - logging of processor start/stop
  - I/O - iostat
  - RAM - free/vmstat
@@ -20,20 +17,6 @@ PLUGINS:
  - Processes active - ps -ef
  
  REFACTORING:
-  - Folder structure -- add to PATH?
-    (WIP -- updated in main script, processors)
-     bin/bdsm
-     etc/bdsm/monitors/
-     etc/bdsm/processors/
-     etc/bdsm/bdsm.db
-     etc/bdsm/bdsm.conf
-     pids/
-     bdsm.log
-     bdsm.err
-     out.fifo
-     in.fifo
-     
- - Move all pids to pid folder
  - Add a generic function for killing a process and deleting the pid file
     Then add checking for 'orphaned' pids
  - Replace some of the /dev/null redirects with error logging
index 3eeec98..cadef1d 100755 (executable)
@@ -302,7 +302,13 @@ status()
   
   processor="`basename /home/bdsm/pids/*.processor`"
   status="`$config_path/processors/$processor status`"
-  echo "PROCESSOR|$status"
+  if [ "$status" != "" ]; then
+    echo "$processor:$status"
+  elif [ "$processor" != "" ]; then
+    echo "PROCESSOR|FAILED"
+  else
+    echo "PROCESSOR|DOWN"
+  fi
 }
 
 configure()