community
Steve Nyemba 7 years ago
parent 54648a7f15
commit 0ec0c84117

@ -1,8 +1,9 @@
{ {
"api":"dev.the-phi.com", "api":"dev.the-phi.com",
"plan":"monitor-light",
"store":{ "store":{
"class":{"read":"CouchdbReader","write":"CouchdbWriter"}, "class":{"read":"CouchdbReader","write":"CouchdbWriter"},
"args":{"uri":"http://localhost.com:5984","dbname":"monitor","uid":"logs"} "args":{"uri":"http://dev.the-phi.com:5984","dbname":"monitor","uid":"logs"}
} }

@ -26,12 +26,7 @@ upgrade(){
} }
start(){ start(){
if [ "$1" = "collector" ]; then sandbox/bin/python src/api/index.py --path $PWD/config.json
sandbox/bin/python src/utils/agents/data-collector.py --path $PWD/config.json
else
sandbox/bin/python src/api/index.py --path $PWD/config.json &
fi
} }
stop(){ stop(){
@ -42,15 +37,9 @@ stop(){
status(){ status(){
pid=`ps -eo pid,command|grep python|grep -E "$PWD"|grep index.py|grep -E "^ {0,}[0-9]+" -m 1 -o` pid=`ps -eo pid,command|grep python|grep -E "$PWD"|grep index.py|grep -E "^ {0,}[0-9]+" -m 1 -o`
if [ "$pid" = "" ]; then if [ "$pid" = "" ]; then
echo "API IS OFFLINE" echo "Monitor API is Offline"
else
echo "API IS ONLINE $pid"
fi
pid=`ps -eo pid,command|grep python|grep -E "$PWD"|grep data-collector|grep -E "^ {0,}[0-9]+" -m 1 -o`
if [ "$pid" = "" ]; then
echo "DATA-COLLECTOR IS OFFLINE"
else else
echo "DATA-COLLECTOR IS ONLINE $pid" echo "Monitor API is Online $pid"
fi fi
} }

Loading…
Cancel
Save