# Send every 10th sample to another index

**URL:** <https://discuss.elastic.co/t/send-every-10th-sample-to-another-index/71762>\
**Category:** Logstash\
**Created:** [January 16, 2017, 4:11pm UTC](https://discuss.elastic.co/t/send-every-10th-sample-to-another-index/71762 "2017-01-16T16:11:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_Monnig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcus_monnig/32/14600_2.png) [@Marcus\_Monnig](https://discuss.elastic.co/u/Marcus_Monnig)\
**Post date:** [January 16, 2017, 4:11pm UTC](https://discuss.elastic.co/t/send-every-10th-sample-to-another-index/71762/1 "2017-01-16T16:11:33Z")

</div>

Hi!

I have a setup like this:

```
input {
    jdbc {
        jdbc_validate_connection => false
        jdbc_connection_string => "jdbc:oracle:thin:@HOST:1521/SID"
        jdbc_user => "..."
        jdbc_password => "..."
        jdbc_driver_library => "/opt/ojdbc7.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        statement => "select ..."
        schedule => "*/6 * * * * *"
       }
}
output {
    elasticsearch {index => "orcldata-%{+YYYY.MM.dd}" }
}

```

This executes the select query every 6 seconds and sends it to the specifies index.

Now, I want to addtionally send the data from every 10th scheduled run to another index. Is there a way to do this without using another import section with a different schedule?

Thanks for your help!  
Marcus

---

<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:** [February 13, 2017, 4:11pm UTC](https://discuss.elastic.co/t/send-every-10th-sample-to-another-index/71762/2 "2017-02-13T16:11:33Z")

</div>

Closed on February 13, 2017, 4:11pm UTC

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