Created
October 9, 2017 03:43
-
-
Save achmadns/5b029ca3c4b0907db5f7780136d5f6be to your computer and use it in GitHub Desktop.
Show retention policies on InfluxDB through CLI
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 | |
for x in `influx -execute 'show databases' | grep -v -e ^name -e --- -e ^_internal`;do printf "RETENTION POLICIES ON $x \n"; influx -execute "SHOW RETENTION POLICIES ON $x";done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot! an fix update when database is named with "-" hyphen character :