No mapping found for [@timestamp] in order to sort on]
See original GitHub issueI see that this person had the same issue (https://github.com/Yelp/elastalert/issues/122), but, unlike them, I am ingesting logs from logstash and my @timestamp is in the ISO8601 format. An example @timestamp in Elasticsearch that I have being 2015-08-13T23:29:56.000Z.
My error looks like this:
root@ip-10-0-20-114:/usr/local/elastalert# python elastalert/elastalert.py
ERROR:root:Error querying for last run: TransportError(400, u'SearchPhaseExecutionException[Failed to execute phase [query], all shards failed;
shardFailures {[8a3NL65NQiKa9wsxgwklyA][elastalert_status][0]: SearchParseException[[elastalert_status][0]: from[-1],size[-1]:
Parse Failure [Failed to parse source [{"filter": {"term": {"rule_name": "whiteListedIPs"}}, "sort": {"@timestamp": {"order": "desc"}}}]]];
nested: SearchParseException[[elastalert_status][0]: from[-1],size[-1]:
Parse Failure [No mapping found for [@timestamp] in order to sort on]]; }{[8a3NL65NQiKa9wsxgwklyA][elastalert_status][1]:
SearchParseException[[elastalert_status][1]: from[-1],size[-1]:
I’ve pretty much followed the documentation for getting started so I don’t quite know how much more simple my test case could be. I did use a different folder for rules and created my own test case that basically just mimics the example_frequency.yaml.
Any ideas of how I should proceed?
Issue Analytics
- State:
- Created 8 years ago
- Comments:25 (10 by maintainers)
Top Results From Across the Web
No mapping found for field in order to sort on in ElasticSearch
After digging more, I found the solution as given below. ignore_unmapped should be explicitly set to true in the sort clause.
Read more >No mapping found for " + fieldName + " in order to sort on
This error occurs because the sort part of your search request includes a field that is not yet mapped in the index (either...
Read more >No mapping found for [@timestamp] in order to sort on
No mapping found for [@timestamp] in order to sort on Failed to execute phase [query], all shards failed; shardFailures {[AcpTZc27Q9mC6 ...
Read more >Elasticsearch - No mapping found for [field_name] in order to ...
By default, the search request will fail if there is no mapping associated with a field. The unmapped_type option allows you to ignore...
Read more >elasticsearch no mapping found for [@timestamp] in order to ...
Run a GET index/_mapping query and check. Note that if you are sending this query on multiple indices but one does not have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When running elastsalert I get the following error:
And this is the mapping after it execution.
Had this same issue with ElasticSearch 2.4.4, simply deleted the old mapping with curl -XDELETE ‘localhost:9200/elastalert_status’ and ran elastalert-create-index again to fix it
ERROR:root:Error finding recent pending alerts: TransportError(400, u’search_phase_execution_exception’, u’No mapping found for [alert_time] in order to sort on’)