|
So my goal is to be able to pass a file to a splunk-monitored directory.. and have splunk apply it to the appropriate index and sourcetype...by a sort of naming convention. file would come in as "indexname_sourcetype_filename.txt" or whatever... and my inputs.conf would do the appropriate thing. is this possible? |
|
Yes, this should be possible. It would be something along these lines: In transforms.conf:
And then in props.conf:
That is cool. What happens if the index doesnt exist yet?
(10 Sep '10, 13:36)
hiddenkirby
and no inputs.conf at all?
(10 Sep '10, 13:37)
hiddenkirby
No, configure inputs.conf as normal, and create each destination index ahead of time via indexes.conf or the Manager. The settings above will override the sourcetype and destination index as the file is indexed. Not sure what happens if the index doesn't exist - it will probably throw an indexing error but it might revert back to the default index.
(10 Sep '10, 14:17)
southeringtonp ♦
ok so no way to create the index dynamically. thanks for this. :)
(10 Sep '10, 14:48)
hiddenkirby
BTW - I was doing this for just the sourcetype override, and needed to change
(23 Aug '11, 17:47)
platform_pie
|