Refine your search:

Hi guys... I have a couple of script inputs that generate network status data... the issue is that a single script inputs data for multiple sourcetypes... The data itself has a filed sourcetype=$value$

is there a simple way to override the default sourcetype "exec" like for host override:

[sourcetype-override] REGEX = (?i)sourcetype=(w+) FORMAT = sourcetype::$1 DEST_KEY = MetaData:SourceType

asked 03 Feb, 06:42

kenchisho's gravatar image

kenchisho
3614
accept rate: 33%

edited 03 Feb, 11:04

piebob's gravatar image

piebob ♦♦
2.4k1517


One Answer:

if your events can be identified via regex, you can do this:

http://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides

you'll need to do this on the indexer--this won't work on the forwarder, unless it's a 'heavy forwarder'.

link

answered 03 Feb, 11:03

piebob's gravatar image

piebob ♦♦
2.4k1517
accept rate: 33%

1

thnx. i'we seen the guide but this will not work in this case... the examples in the guide match a regex and then based on that match set the source type manually...

[some_stanza] REGEX = some_regex FORMAT = sourcetype::my_log (manually set source type to my_log) DEST_KEY = MetaData:Sourcetype

This would require a stanza in props.conf for every source type i wish to have for a single scripted input source...

what i am trying is to extract the source type itself using a regex and route those events to that source type...

(03 Feb, 12:15) kenchisho
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:

×154
×10
×1

Asked: 03 Feb, 06:42

Seen: 278 times

Last updated: 03 Feb, 12:15

Copyright © 2005-2012 Splunk, Inc. All rights reserved.