mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
remove support for months as it isnt supported in InfluxQL
This commit is contained in:
@@ -15,15 +15,13 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
modurregex="^[0-9]+mo$"
|
||||
wdurregex="^[0-9]+w$"
|
||||
ddurregex="^[0-9]+d$"
|
||||
|
||||
echo -e "\nThis script is used to reduce the size of InfluxDB by removing old data and retaining only the duration specified."
|
||||
echo "The duration will need to be specified as an integer followed by the duration unit, without a space."
|
||||
echo -e "\nFor example, to purge all data, but retain the past 3 months, specify 3mo for the duration."
|
||||
echo -e "\nFor example, to purge all data, but retain the past 12 weeks, specify 12w for the duration."
|
||||
echo "The duration units are as follows:"
|
||||
echo " mo - month(s)"
|
||||
echo " w - week(s)"
|
||||
echo " d - day(s)"
|
||||
|
||||
@@ -32,7 +30,7 @@ while true; do
|
||||
read -p 'Enter the duration of past data that you would like to retain: ' duration
|
||||
duration=$(echo $duration | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [[ "$duration" =~ $modurregex ]] || [[ "$duration" =~ $wdurregex ]] || [[ "$duration" =~ $ddurregex ]]; then
|
||||
if [[ "$duration" =~ $wdurregex ]] || [[ "$duration" =~ $ddurregex ]]; then
|
||||
break
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user