Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #30 from weslambert/freq_fix
Browse files Browse the repository at this point in the history
adjust FREQ_SERVER_RESPONSE to accommodate updates
  • Loading branch information
dougburks authored Sep 18, 2018
2 parents bd5c72d + ed453ec commit 417a305
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/sostat
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,9 @@ if [ "$ELASTICSEARCH_ENABLED" = "yes" ]; then
docker stats --no-stream so-freqserver
echo
echo "Testing freq_server now..."
FREQ_SERVER_RESPONSE=`docker exec -it so-logstash curl -s http://so-freqserver:10004/measure/google.com`
FREQ_RESULT=$(awk -vx=$FREQ_SERVER_RESPONSE 'BEGIN{ print x>=y?1:0}')
if [ $FREQ_RESULT -eq 1 ]; then
FREQ_SERVER_RESPONSE=`docker exec -it so-logstash curl -s http://so-freqserver:10004/measure/google.com` | awk '{print $2}'| cut -d ')' -f1
FREQ_RESULT=$(awk -vx=$FREQ_SERVER_RESPONSE 'BEGIN{ print x>=y?1:0}')
if [[ "$FREQ_RESULT" -eq 1 ]]; then
echo
echo "Freq Server is working."
else
Expand All @@ -649,7 +649,7 @@ if [ "$ELASTICSEARCH_ENABLED" = "yes" ]; then
echo "Testing domain_stats now..."
DOMAIN_STATS_RESPONSE=`docker exec so-logstash curl -s http://so-domainstats:20000/alexa/google.com`
DOMAIN_STATS_RESULT=$(awk -vx=$DOMAIN_STATS_RESPONSE 'BEGIN{ print x>=y?1:0}')
if [ $DOMAIN_STATS_RESULT -eq 1 ]; then
if [[ "$DOMAIN_STATS_RESULT" -eq 1 ]]; then
echo
echo "Domain_stats is working."
else
Expand Down

0 comments on commit 417a305

Please sign in to comment.