Refine your search:

I am trying to index a UNC Path, but am unable to use wildcards..

Here's what I"m trying to match

\\IISLOGS\MYSERVER01\W3SVC01\EX10.LOG

I don't want to match this

\\IISLOGS\YOURSERVER01\W3SVC01\EX10.LOG

The manual indicates I could use *, but am having no luck.. Have tried this..

\\IISLOGS\MYSERVER*
\\IISLOGS\MYSERVER*\

NO indexing at all occurs if I do this..

asked 05 May '11, 12:19

rnavis's gravatar image

rnavis
410310
accept rate: 25%

edited 05 May '11, 16:40


5 Answers:

Have you considered just eating \IISLOGS and using _blacklist = YOURSERVER

http://www.splunk.com/base/Documentation/latest/Data/Whitelistorblacklistspecificincomingdata

link

answered 05 May '11, 13:54

Michael%20Wilde's gravatar image

Michael Wilde ♦
695520
accept rate: 57%

Awesome.. I could not get it to work using wildcards in the path, but using a WHITELIST, it worked perfectly...

.*MYSERVER.*

Thanks for the help!

(05 May '11, 16:37) rnavis

Update: Did NOT work as expected... When creating a SECOND input for the same path for the second set of servers, I got a message indicating that I could not create an input with the same name..

This seems like pretty basic functionality.. Essentially, I want to create multiple indexes with files with a common path..

(05 May '11, 18:25) rnavis

Splunk only lets you monitor a directory once. What is your scheme for determining what data goes in which index?

(05 May '11, 18:36) Michael Wilde ♦

We should be able to use your existing singular whitelist to eat the directory, but exclude everything other than your server, as you have done.

Then.. create two files in the same dir called "props.conf" & "transforms.conf" (assuming you're in the $SPLUNK_HOME/etc/apps/search/local directory in props.conf, we can choose how events get selected and are processed by "transforms.conf". Transforms.conf will make our "index-switching" happen on the fly. Just tested it locally, seems to work just fine.

PROPS.CONF

[source::...Order...]
TRANSFORMS-moveorders = toIndex1

[source::...Product...]
TRANSFORMS-moveproducts = toIndex2

[source::...Customer...]
TRANSFORMS-movecustomers = toIndex3

TRANSFORMS.CONF

[toIndex1]
DEST_KEY = _MetaData:Index
REGEX = .
FORMAT = Index1

[toIndex2]
DEST_KEY = _MetaData:Index
REGEX = .
FORMAT = Index2

[toIndex3]
DEST_KEY = _MetaData:Index
REGEX = .
FORMAT = Index3
link

answered 05 May '11, 21:01

Michael%20Wilde's gravatar image

Michael Wilde ♦
695520
accept rate: 57%

Your examples seem a bit odd to me, but to match your .LOG files in your example you would use

\\IISLOGS\MYSERVER01\W3SVC01\*.LOG

[EDIT] You could use the wildcard as such:

\\IISLOGS\MYSERVER*\W3SVC01\*.LOG
link

answered 05 May '11, 12:51

ftk's gravatar image

ftk ♦
6.8k1728
accept rate: 38%

edited 05 May '11, 13:38

Sorry... need to clarify my example. Was hoping not to have a seperate entry for each server.. Need to match the following..

\\IISLOGS\MYSERVER01\W3SVC01\EX10.LOG
\\IISLOGS\MYSERVER02\W3SVC01\EX10.LOG
\\IISLOGS\MYSERVER03\W3SVC01\EX10.LOG
\\IISLOGS\MYSERVER04\W3SVC01\EX10.LOG
\\IISLOGS\MYSERVER05\W3SVC01\EX10.LOG

Don't want to match..

\\IISLOGS\YOURSERVER01\W3SVC01\EX10.LOG
link

answered 05 May '11, 13:04

rnavis's gravatar image

rnavis
410310
accept rate: 25%

edited 05 May '11, 13:37

ftk's gravatar image

ftk ♦
6.8k1728

I updated my answer, basically just use more wildcards.

(05 May '11, 13:39) ftk ♦

Finally able to get this to work. Ended up deleting all the configuration on my server and recreating it, so potentially their was something conflicting? Anyway, just wanted to close the loop on this, showing that you can wildcard in your inputs.conf file without using transforms... Here's three examples of syntax I used for the monitor headers that WORKED.

[monitor://\ServerLogsprodprod-iislogsHS1WS*...]

[monitor://\ServerLogsprodprod-iislogsHS2WS*...]

[monitor://\ServerLogsprodprod-iislogsSI1WS*...]

link

answered 09 May '11, 09:45

rnavis's gravatar image

rnavis
410310
accept rate: 25%

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:

×153
×17

Asked: 05 May '11, 12:19

Seen: 1,647 times

Last updated: 09 May '11, 09:45

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