Created
August 18, 2020 10:19
-
-
Save apergos/e1f14670c430d53ccbb163d4ffea95f1 to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
usage() { | |
echo "Show which db hosts in which dc are in some group, for a given section" | |
echo | |
echo "Usage:" | |
echo "$0 section_number group" | |
echo | |
echo " section_number should be one of s1,s2,... or DEFAULT" | |
echo " this argument is required" | |
echo | |
echo " groups known: api contributions dump logpager recentchanges" | |
echo " recentchangeslinked vslow watchlist" | |
echo " default value: vslow" | |
exit 1 | |
} | |
if [ -z "$1" ]; then | |
usage | |
exit 1 | |
fi | |
section="$1" | |
group="$2" | |
if [ -z "$group" ]; then | |
group="vslow" | |
fi | |
ssh cumin1001.eqiad.wmnet "/usr/bin/dbctl config get | /usr/bin/jq '.eqiad,.codfw|.groupLoadsBySection|.'$section'|.'$group'|keys' " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment