前言脚本最后 前言
清理ELK的elasticsearch记录.bat
脚本rem ****** clean ********@echo off&setlocal enabledelayedexpansionset "start=2021.10.01"set "end=2022.01.01" rem 进入d盘d:cd D:hejzbbqELKcls&echo,&echo,&echo,&echo,&echo 程序正在运行中,请稍候。。。set /a sy=%start:~,4%,sm=1%start:~5,2%%%100,sd=1%start:~8,2%%%100,ey=%end:~,4%,em=1%end:~5,2%%%100,ed=1%end:~8,2%%%100,a=31for %%a in (1 3 5 7 8 10 12 4 6 9 11) do ( if %%a equ 4 set /a a-=1 set /a _%%a=a)(for /l %%a in (%sy%,1,%ey%) do ( set /a "_2=^!(%%a%%4)&^!(^!(%%a%%100))|^!(%%a%%400)+28" set /a a=1,b=12 if "%%a" equ "%sy%" set /a a=sm if "%%a" equ "%ey%" set /a b=em for /l %%b in (!a!,1,!b!) do ( set /a c=1,d=_%%b if "%%a%%b" equ "%sy%%sm%" set /a c=sd if "%%a%%b" equ "%ey%%em%" set /a d=ed for /l %%c in (!c!,1,!d!) do ( for %%d in (%%b %%c) do set ".%%d=0%%d"&set ".%%d=!.%%d:~-2!" echo nginx-access=%%a.!.%%b!.!.%%c! 。。。curl.exe -X DELETE http://127.0.0.1:9200/nginx-access=%%a.!.%%b!.!.%%c!。。。curl.exe -X DELETE http://127.0.0.1:9200/nginx-error=%%a.!.%%b!.!.%%c! ) )))pause
最后如上