Thank you, i can my script to
FDATE=date +"%FT%H:%M:%S.000" --date="60 days ago"
TDATE=date +"%FT%H:%M:%S.000" --date="0 days ago"
and when i then run the script, then i have this error.
{"_indices":{"graylog2_3":{"_shards":{"total":4,"successful":0,"failed":4,"failures":[{"index":"graylog2_3","shard":0,"reason":"QueryParsingException[[graylog2_3] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_3","shard":1,"reason":"QueryParsingException[[graylog2_3] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_3","shard":2,"reason":"QueryParsingException[[graylog2_3] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_3","shard":3,"reason":"QueryParsingException[[graylog2_3] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "}]}},"graylog2_2":{"_shards":{"total":4,"successful":0,"failed":4,"failures":[{"index":"graylog2_2","shard":0,"reason":"QueryParsingException[[graylog2_2] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_2","shard":1,"reason":"QueryParsingException[[graylog2_2] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_2","shard":2,"reason":"QueryParsingException[[graylog2_2] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_2","shard":3,"reason":"QueryParsingException[[graylog2_2] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "}]}},"graylog2_4":{"_shards":{"total":4,"successful":0,"failed":4,"failures":[{"index":"graylog2_4","shard":0,"reason":"QueryParsingException[[graylog2_4] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number]; nested: IllegalArgumentException[Invalid format: ""]; "},{"index":"graylog2_4","shard":1,"reason":"QueryParsingException[[graylog2_4] Failed to parse]; nested: ElasticsearchParseException[failed to parse date field [], tried both date format [yy* Connection #0 to host 127.0.0.1 left intact
Is my date format wrong?
regards
Steve