Comments (11)
Your date is in the wrong format (for curator). It expects the default YYYY.MM.dd (see http://logstash.net/docs/1.4.0/outputs/elasticsearch#index) or even YYYY.MM.dd.HH (for hourly). There is currently no other accepted formatting. We may try to create a way to use strftime and accept defined timestamps, but that will be rather difficult as it involves matching joda-time with python's date libraries. That will be quite a yak shave...
Everything else looks great, though.
from curator.
any "simple way" to "rename" my current indices ?
from curator.
@xinity easiest way is to create aliases.
See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html for more info on that.
from curator.
I don't think you can delete an index on alias, but it's worth trying. Please let us know if that works.
from curator.
just tried , deleting an alias doesn't delete the index itself :)
lucky me i'm not in production mode, but very soon, so changing the timestamp of my indices will do no harm.
btw, having an option to define the timestamp format would be awesome!!
from curator.
Mapping will be a lot bigger than just figuring out indices. That part is as simple as:
joda YYYY.MM.dd
vs. python %Y.%m.%d
The complexity happens if somebody wants to start using week numbers. How do I delete based on elapsed days? Or months? The masking of dailies is not a problem. Getting tricky date math to play nice for creating complex aliases (both things like, "yesterday" and "last_week", as well as combining 7 days of regular dailies into a weekly alias, or a monthly, etc.) and other time management issues. That's why this isn't just about adding in strftime mapping.
from curator.
I am having the same problem. My Flume Log Stash Serializer create the index in the format raw_json-2014-05-12 . Also I had the same issue when I tried to delete marvel indices which has the format YYYY.MM.dd .
/usr/lib/python2.6/site-packages/curator/curator.py -d 3 -p .marvel
2014-05-14T18:07:44.691 INFO main:333 Job starting...
2014-05-14T18:07:44.692 INFO new_conn:180 Starting new HTTP connection (1): localhost
2014-05-14T18:07:44.694 INFO log_request_success:49 GET http://localhost:9200/ [status:200 request:0.003s]
2014-05-14T18:07:44.695 INFO main:359 Deleting indices older than 3 days...
2014-05-14T18:07:44.698 INFO log_request_success:49 GET http://localhost:9200/.marvel_/_settings?expand_wildcards=closed [status:200 request:0.002s]
2014-05-14T18:07:44.722 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.07
2014-05-14T18:07:44.722 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.08
2014-05-14T18:07:44.722 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.09
2014-05-14T18:07:44.722 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.10
2014-05-14T18:07:44.722 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.11
2014-05-14T18:07:44.723 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.12
2014-05-14T18:07:44.723 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.13
2014-05-14T18:07:44.723 ERROR find_expired_indices:201 Could not find a valid timestamp from the index: .marvel-2014.05.14
2014-05-14T18:07:44.723 INFO index_loop:309 DELETE index operations completed.
2014-05-14T18:07:44.723 INFO main:379 Done in 0:00:00.037963.
[root@node05 github]# ls -ltr /var/lib/elasticsearch/bigdatadev/nodes/0/indices/.marvel
/var/lib/elasticsearch/bigdatadev/nodes/0/indices/.marvel-2014.05.10:
total 8
drwxr-xr-x. 2 elasticsearch elasticsearch 4096 May 10 01:00 _state
drwxr-xr-x. 5 elasticsearch elasticsearch 4096 May 10 01:00 0
/var/lib/elasticsearch/bigdatadev/nodes/0/indices/.marvel-2014.05.11:
from curator.
Marvel
@deepakas your prefix for marvel is missing the -
. A prefix is supposed to be everything up to the date portion. See the help output where it shows logstash-
:
curator --help
…
-p PREFIX, --prefix PREFIX
Prefix for the indices. Indices that do not have this
prefix are skipped. Default: logstash-
…
With that, your marvel pruning command-line should read:
/usr/lib/python2.6/site-packages/curator/curator.py -d 3 -p .marvel-
Flume
Your Flume serializer is using a different separator. You can use the SEPARATOR
configuration option to change that:
curator --help
…
-s SEPARATOR, --separator SEPARATOR
Time unit separator. Default: .
…
So for that instance, you'd use a line more like:
/usr/lib/python2.6/site-packages/curator/curator.py -d 3 -p raw_json- -s \-
Being a dash, you may need to escape it with a backslash as above.
from curator.
Will be closing this at the one month mark if no further comments.
from curator.
this was helpful: I also had the issue while forgetting the -
from curator.
Updated the wiki FAQ to link to and explain this better. Closing.
from curator.
Related Issues (20)
- curator fails to install due to: SyntaxError: future feature annotations is not defined HOT 1
- config http_auth work properly,but username and password not HOT 1
- Curator month unit set to 31 days HOT 1
- Snapshot on indices created on pre ES 1.3 and updated to ES2.4 HOT 3
- Elasticsearch Curator RPM package does not contain a SHA256 Digest signature HOT 2
- build the curator 7 arm docker image error HOT 5
- 'indices' missing in stats dict HOT 3
- Curator silently fails if one of `client.certificate`, `client.client_cert` and `client.client_key` is not accessible HOT 4
- Docker build fail to create runable image HOT 12
- Unable to skip some indices while restoring
- [OLD docker] untergeek/curator `missing signature key` on server HOT 10
- max_primary_shard_size option for shrink & rollover ACTION HOT 1
- curator cronjob error HOT 2
- Edge case in metadata population at IndexList instantiation HOT 3
- Trying to snapshot all indices fails as Curator accesses system indices
- pip install elasticsearch-curator==7.0.0 failed due to pyyaml 6.0.0
- Manual ILM advance based on disk usage (per tier)
- docker pull throws `missing signature key` HOT 2
- Curator running failed in docker when upgrade to 8.0.8 as permssion error HOT 17
- Error: No such option: --config HOT 1
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 curator.