Hi All,
When you export a saved search CSV export URL like this:
The resulting url looks like this:
https://XXXXXX:YYYYY/api/reporting/generate/csv?jobParams=(conflictedTypesFields:!(),fields:!(%27@timestamp%27,src_user,src),indexPatternId:%XXXXXXXXXXXXXX,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(%27@timestamp%27,src_user,src)),docvalue_fields:!(),query:(bool:(filter:!((bool:(filter:!((bool:(minimum_should_match:1,should:!((match_phrase:(msg:%27XXX%20XXX*%27))))),(bool:(minimum_should_match:1,should:!((match_phrase:(action:%27XXX%20in%27))))))))),must:!((exists:(field:alarm_name)),(
range:(%27@timestamp%27:(format:strict_date_optional_time,gte:%272019-10-14T18:11:58.934Z%27,lte:%272019-10-21T18:11:58.934Z%27)))),must_not:!(),should:!())),script_fields:(),sort:!((%27@timestamp%27:(order:desc,unmapped_type:boolean))),stored_fields:!(%27@timestamp%27,src_user,src),version:!t),index:%27XXXXXXXXX-*%27),title:%27XXX%20%7C%20XXX%20XXX%20-%XXXXX%20XXXXXX%27,type:search)
Notice how the date is hardcoded, even though we specified a relative timerange in the export.
This an issue because when you put this URL into a watcher, as recommended here, the resulting data set will always be the same because watcher is always querying the same date range.
What is the best way to get around this? Can I specify a relative date range in the URL? Is there an override condition in Watcher that will solve this?
Thank you!