Refine your search:

3
1

Hi

I was testing splunk by adding multiple servers by both syslog and splunk forwarder. But now my splunk indexer has all kinds of stuff that I don't need anymore.

I want to remove some hosts, source and source types and the data it contains. Per the document I should be able to delete by removing stanzas in indexes.conf. But i can't find the entries in it.

Please help me out.

Regards, Harish

asked 27 Jul '11, 08:12

dhs_harry08's gravatar image

dhs_harry08
61224
accept rate: 42%

edited 09 Mar '12, 12:19

lguinn's gravatar image

lguinn ♦
17.5k91225


2 Answers:

No,

to stop new events from coming into your indexes - remove the [monitor] and TCP/UDP stanzas in inputs.conf or go through the GUI to remove them. This, however does not remove any data already indexed.

If you delete stuff from indexes.conf, you remove the reference to where the indexes are located on disk. I don't think that's what you want.

If you selectively want to remove some of the information in the indexes you otherwise wish to keep - then you should type in a search that selects those events and pipe them to delete.

Make sure that your user role has the can_delete privilege (Manager -> Access Control -> Roles -> your_role ). Then, assuming you have data from one host (badhost) you wish to delete and data from another host (goodhost) you wish to keep:

host=badhost | delete

Whoops, now all data from badhost is gone. However, the data from goodhost is of two different sourcetypes (badtype and goodtype) - guess what:

host=goodhost sourcetype=badtype | delete

..and it's gone as well.

You should note that this operation does NOT actually delete the data, it just prevents it from ever being returned as search results.

If you want to clean an index completely, then you should do so through the command line:

  • stop splunk

  • type /opt/splunk/bin/splunk clean eventdata -index <the index you wish to clean>

  • start splunk again

For more information regarding the clean command see: Is there a way to clean event data from a specific date range? on Splunk Answers

hope this helps,

Kristian

EDIT: Missed a parameter in the clean command... oops. fixed now.

link

answered 15 Nov '11, 05:55

kristian.kolb's gravatar image

kristian.kolb ♦
19.1k1820
accept rate: 36%

edited 15 Nov '11, 07:11

Thanks a lot kristian.kolb !! this answer helped me a lot ....

(03 Apr '12, 21:50) ranjyotiprakash

Splunk -> Manager -> Data inputs -> (Files and Directories in my own case) -> locate your data source and on the right side under "Actions", click delete.

Hope this helps

link

answered 15 Nov '11, 02:24

koredyte's gravatar image

koredyte
511
accept rate: 0%

Certain types of sources do not appear in this list.

(27 Jan '12, 17:33) stefanlasiewski
2

what i notice in v4.3.1 for linux is that source types are created in weird ways. if you create a new source (file) and you dont preview the data and you use manual source name, the source is not added to the props.conf file and will never be seen in the "list" when creating a new source, but, if you use the same name again it will complain with a "that name already exists" error message. but if you preview the data and select "create new source" it will populate props.conf with the new source type and will be available in the "list". but no place to edit/delete sources from the GUI?

(04 Apr '12, 06:25) cvajs
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×127
×100
×44

Asked: 27 Jul '11, 08:12

Seen: 8,362 times

Last updated: 04 Apr '12, 08:39

Copyright © 2005-2014 Splunk Inc. All rights reserved.