1. 程式人生 > >elk 定時清理三天前資料

elk 定時清理三天前資料

#!/bin/bash

shijian=`date +%Y.%m.%d -d "3 days ago"`
curl -XDELETE "192.168.0.231:9200/filebeat-${shijian}"