# Reporting on random date on a random field

**URL:** <https://discuss.elastic.co/t/reporting-on-random-date-on-a-random-field/90815>\
**Category:** Kibana\
**Tags:** elastic-stack-reporting\
**Created:** [June 26, 2017, 10:56am UTC](https://discuss.elastic.co/t/reporting-on-random-date-on-a-random-field/90815 "2017-06-26T10:56:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)\
**Post date:** [June 26, 2017, 10:56am UTC](https://discuss.elastic.co/t/reporting-on-random-date-on-a-random-field/90815/1 "2017-06-26T10:56:14Z")

</div>

Hi All,

Am using elasticsearch and XPack , is it possible to generate a report on a random dates on particular field .

For example :  
I want to trigger reporting on each previous months , like let say i have one month june data from 1st of june till 30 th june

I want to trigger on 1st july , of on 15 th july data on a particular field data value  
like this I want to trigger reporting on every first date of each month on different dates on a particular field.

Any help would really very useful for audits.

Thanks,  
Raj

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [June 26, 2017, 10:13pm UTC](https://discuss.elastic.co/t/reporting-on-random-date-on-a-random-field/90815/2 "2017-06-26T22:13:20Z")

</div>

Anything you can search for in Elasticsearch script, you should be able to use in Watcher, which you can then use to trigger a report generation. Take a look at the [Script Condition](https://www.elastic.co/guide/en/x-pack/current/condition-script.html) documents.

I believe what you want to do is create a Watch [trigger schedule](https://www.elastic.co/guide/en/x-pack/current/trigger-schedule.html) which would run maybe once a day... that kind of depends on your specific needs. Anyway, that watch would execute the script condition, and if it matched, you could have it [send a report](https://www.elastic.co/guide/en/x-pack/current/automating-report-generation.html).

You might be able to use [Watcher inputs](https://www.elastic.co/guide/en/x-pack/current/input.html) to control the date range in the report URL as well, but I'm not actually sure that works.

---

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)\
**Post date:** [June 27, 2017, 9:12am UTC](https://discuss.elastic.co/t/reporting-on-random-date-on-a-random-field/90815/3 "2017-06-27T09:12:46Z")

</div>

Thank you Joe for the reply 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 25, 2017, 9:12am UTC](https://discuss.elastic.co/t/reporting-on-random-date-on-a-random-field/90815/4 "2017-07-25T09:12:56Z")

</div>

Closed on July 25, 2017, 9:12am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
