- for the "Success" image you might want to use couchdb logo
- and for the "Failure" image an transparent gif
Created
February 3, 2011 12:52
-
-
Save muhqu/809438 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ]; then | |
echo "usage: $0 NAME URL [ NAME URL ... ]" | |
echo " e.g.: $0 LOCAL http://127.0.0.1:5984" | |
echo " or: $0 DB01 http://user:pass@db01 DB02 http://user:pass@db01" | |
exit 1 | |
fi | |
( | |
while [ ! -z $1 ]; do | |
NAME=$1; shift | |
URL=$1; shift | |
curl -qs "$URL/_active_tasks" | python -mjson.tool | awk "{print \"$NAME: \"\$0}" | |
done | |
) | sed -e 's/ */ /g' -e 's/[",]//g' | grep -E 'status|task' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment