Comments (7)
@EduSandu please check the new version
https://github.com/cloudreach/aws-lambda-es-cleanup/blob/e0f600561e2f0914befb2f8c236658ff47cfe8f0/es-cleanup.py
and test it.
from aws-lambda-es-cleanup.
The Regexp done like that
self.cfg["skip_index"] = self.get_parameter("skip_index", ".kibana*")
can match multiple patterns/indexes
I will open a new PR with the current changes
@EduSandu thanks for your support!
from aws-lambda-es-cleanup.
@EduSandu that sounds like a great idea.
a similar issue was resolved in #26 would be awesome to have some help from the community to implements regular expression for the index to skip and the index to delete.
I will try a beta version in a dedicate branch
from aws-lambda-es-cleanup.
@giuliocalzolari awesome stuff - tested OK it matched and processed all indexes using the wildcard match and also skipped the .kibana indexes.
I omitted initially during testing to change the skip_index
param, which was using the comma-delimited values - the cleaner job deleted the .kibana_N
indexes, but was able to restore them from a snapshot.
Wondering if the .split(",")
delimeter can be kept and used to separate multiple expressions in the index & skip_index variables?
This gives more granular control and lets you to keep more important indices longer (have them skipped via the expression matching their pattern in skip_index) and drop the ones that are not that relevant earlier, in order to save disk usage.
from aws-lambda-es-cleanup.
@EduSandu uhmm very wierd...
I've setup the skip_index
to also use the regexp
aws-lambda-es-cleanup/es-cleanup.py
Line 56 in e0f6005
are you using Terraform to deploy it?
because I've realised the default value for terraform is still ".kibana"
and this pattern does not match .kibana_N
can you confirm it?
from aws-lambda-es-cleanup.
@giuliocalzolari no this wasn't a new domain standed up using Terraform.
skip_index
works using the regexp method, only the initial test cleared the .kibana_N
indices (skip_index was still using the prior comma delimited format)
Would like to test having multiple expressions with a ,
delimeter, for the reasons mentioned above - guessing the following lines
aws-lambda-es-cleanup/es-cleanup.py
Lines 55 to 56 in e0f6005
should be amended as such? Not sure if
re.search
will support itself.cfg["skip_index"] = self.get_parameter("skip_index", ".kibana*").split(",")
from aws-lambda-es-cleanup.
from aws-lambda-es-cleanup.
Related Issues (15)
- create serverless configuration for AWS ES running on VPC
- Code optimisation when aws_lambda_function.vpc_config is solved HOT 1
- Fix terraform security group HOT 1
- Lambda Function Times Out When Invoked Within AWS HOT 8
- update readme to deploy in vpc with CLI HOT 1
- terraform providor / lambdas created incorrectly HOT 1
- Cleanup lambda deletes .kibana_N indices
- send_error is never triggered HOT 1
- ValueError: You can only send PreparedRequests. HOT 11
- Delete by Mapping HOT 1
- Create snapshots before deleting indexes HOT 1
- ARN HOT 1
- CFN HOT 1
- Evaluate more than one index format
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-es-cleanup.