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

@ -1,9 +1,10 @@
{
"api":"dev.the-phi.com",
"plan":"monitor-light",
"store":{
"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(){
if [ "$1" = "collector" ]; then
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
sandbox/bin/python src/api/index.py --path $PWD/config.json
}
stop(){
@ -42,15 +37,9 @@ stop(){
status(){
pid=`ps -eo pid,command|grep python|grep -E "$PWD"|grep index.py|grep -E "^ {0,}[0-9]+" -m 1 -o`
if [ "$pid" = "" ]; then
echo "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"
echo "Monitor API is Offline"
else
echo "DATA-COLLECTOR IS ONLINE $pid"
echo "Monitor API is Online $pid"
fi
}

Loading…
Cancel
Save