Skip to content

Instantly share code, notes, and snippets.

@meznak
meznak / bundlestatus.alias
Last active February 7, 2022 20:38 — forked from xoff00/gist:fc8e074985e48287e31742730d8a3e8b
Splunk cluster bundle status on a single line
# Check indexer cluster bundle status without all the mess.
# Requires $SPLUNK_HOME/bin to be in your path
# one-shot status
alias bundlestatus="splunk show cluster-bundle-status > .cbs.tmp && sed -n '/cluster_status/,/^ *$/p' .cbs.tmp && grep -A5 site1 .cbs.tmp | paste -d ' ' - - - - - - - | sed -r -e 's/\t/ /g' -e 's/(.uto)?.asu.edu//g' -e 's/[[:alnum:]]\{8\}(-[[:alnum:]]\{4\}){3}-[[:alnum:]]\{12\}//g' -e 's/[[:blank:]]*site1[[:blank:]]*/ /g' -e 's/_bundle=(.{8}|.)\S*/=\1/g' -e 's/_validat(ed|ion_)//g' -e 's/_required_apply//g' -e 's/last_bundle//g' -e 's/--//g' | sort -V | column -t && rm .cbs.tmp"
# watch status
alias bundlestatusw="watch -n10 \"splunk show cluster-bundle-status > .cbs.tmp && sed -n '/cluster_status/,/^ *$/p' .cbs.tmp && grep -A5 site1 .cbs.tmp | paste -d ' ' - - - - - - - | sed -r -e 's/\t/ /g' -e 's/(.uto)?.asu.edu//g' -e 's/[[:alnum:]]\{8\}(-[[:alnum:]]\{4\}){3}-[[:alnum:]]\{12\}//g' -e 's/[[:blank:]]*site1[[:blank:]]*/ /g' -e 's/_bundle=(.{8}|.)\S*/=\1/g' -e 's/_validat(ed|ion_)//g'
@meznak
meznak / infb.py
Created December 22, 2011 21:36 — forked from ruel/infb.py
A script to scrape information from your facebook friends.
#!/usr/bin/python
'''
InFB - Information Facebook
Usage: infb.py user@domain.tld password
infb.py
http://ruel.me