# New to ES and Apache Logging: getting rid of ratty data

**URL:** <https://discuss.elastic.co/t/new-to-es-and-apache-logging-getting-rid-of-ratty-data/2154>\
**Category:** Elasticsearch\
**Created:** [June 8, 2015, 6:34pm UTC](https://discuss.elastic.co/t/new-to-es-and-apache-logging-getting-rid-of-ratty-data/2154 "2015-06-08T18:34:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdunbar](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bdunbar](https://discuss.elastic.co/u/bdunbar)\
**Post date:** [June 8, 2015, 6:34pm UTC](https://discuss.elastic.co/t/new-to-es-and-apache-logging-getting-rid-of-ratty-data/2154/1 "2015-06-08T18:34:52Z")

</div>

I'm new to ES. We're test-piloting ELK 4 for webstats.

How do I get _rid_ of ratty data?

Like this: I've got my 8 apache web servers sending access logs, I've got the log format looking good, GEOIP setup. I even have some basic stats on the Kibana Dashboard.

I've had this running for six days or so. I have even figured out that my servers were logging a ton of messages about their healthcheck, which was dirtying the stats, and have setup logstash to remove those.

But _now_ I have a week, or so, of data that isn't right. I can explain, when I turn this over to the end user, that data from June 1 - June 6 is bad, pay no attention, but I'd prefer to work some magic and have ES take them away.

Is there an incantation for that? A doc I can read?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [June 8, 2015, 7:28pm UTC](https://discuss.elastic.co/t/new-to-es-and-apache-logging-getting-rid-of-ratty-data/2154/2 "2015-06-08T19:28:10Z")

</div>

Do you need the indices still? I mean, is there other data in there that you still need?

**Yes:** A delete\_by\_query to delete everything of type "apache" (presuming you used Logstash to type individual inputs).

**No:** Use [Elasticsearch Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html) to delete indices older than _n_ days.

---

<div class="post-metadata">

**Author:** ![bdunbar](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bdunbar](https://discuss.elastic.co/u/bdunbar)\
**Post date:** [June 8, 2015, 8:31pm UTC](https://discuss.elastic.co/t/new-to-es-and-apache-logging-getting-rid-of-ratty-data/2154/3 "2015-06-08T20:31:54Z")

</div>

It's tempting to discard 'all' and start over again - I'll think about both.

---

<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 6, 2017, 12:08am UTC](https://discuss.elastic.co/t/new-to-es-and-apache-logging-getting-rid-of-ratty-data/2154/4 "2017-07-06T00:08:58Z")

</div>


