Hello!
I have some log files with dynamic naming that I'm having trouble matching with props.conf stanzas. Here are examples of the filenames:
c:\Foo\pa.log
c:\Foo\PaApps\log\11-2012.xml
(changes for each month)
c:\Foo\PaApps\log\11-2012p.xml
(changes for each month)
c:\Foo\PaApps\log\1e85358e-11a3-44c2-8f62-ffe88c035478.log
(This is an error log. New file generated with each error, and has a unique GUID filename)
c:\Foo\PaApps\log\ProofServerManager_11-2012.log
(changes for each month)
c:\Foo\PaApps\log\ProofServerMonitor_11-2012.log
(changes for each month)
c:\Foo\PaApps\stp1pfsprf001_11-2012.xml
(That host_month-year. All files are collected on one host, but come from several. Hence the naming)
Now, given the variability of the filenames, I don't think I have any hope of specifically targetting them in my monitor stanzas. So I'm not assigning sourcetype on the forwarders. Monitoring Stanza names are as follows:
[monitor://c:\Foo\PaApps\log\*.log]
[monitor://c:\Foo\PaApps\log\*.xml]
[monitor://c:\Foo\pa.log]
Now so far, so good. All appropriate logs are being monitored and sent to the indexer as expected. So the next step is to use [source::] stanzas in the props.conf file on the indexer to sort them out, apply sourcetypes, etc. This is where things go wrong.
Here are my source:: stanzas, and what they should match:
[source::...[/\\]\d+-\d+p.xml]
(Should match c:\Foo\PaApps\log\11-2012p.xml)
[source::...[/\\]\d+-\d+.xml]
(Should match c:\Foo\PaApps\log\11-2012.xml)
[source::...[/\\]ProofServerManager_\d+-\d+.log]
(Should match c:\Foo\PaApps\log\ProofServerManager_11-2012.log)
[source::...[/\\]ProofServerMonitor_\d+-\d+.log]
(Should match c:\Foo\PaApps\log\ProofServerMonitor_11-2012.log)
[source::...[/\\]stp1pfsprf\d+_\d+-\d+.xml]
(Should match c:\Foo\PaApps\stp1pfsprf001_11-2012.xml)
[source::...[/\\]\w+-\w+-\w+-\w+-\w+.log]
(Should match c:\Foo\PaApps\log\1e85358e-11a3-44c2-8f62-ffe88c035478.log)
[source::...[/\\]pa.log]
(Should match c:\Foo\pa.log)
See this answer for details on where I got the syntax for these stanzas.
Now, when I first set this up, I did so on a local instance of Splunk running on my desktop. I recreated the log file path, and populated it with sample files. (So it was functionally identical to the servers I would be monitoring) Then using the above inputs.conf and props.conf, I was able to properly index the files, and all props.conf stanzas applied appropriately.
However, when I push the configuration out to my indexer and forwarders, the props.conf stanzas are not being applied, and the indexer is essentially 'learning' the sources. Resulting in sourcetypes of 'xml-1', 'xml-2', etc.
Any ideas why this worked locally, but not on the server?
Thank you!
... View more