Getting Data In

Source type is not setup properly and field extractions are not working

desi-indian
Path Finder

I need to monitor/splunk multiple files in a directory "/app/products/xxxx/yyy/logs/"

This directory has files like aaa-queries.log.yyyymmdd AND aaa-engineInfo.log.yyyymmdd .

The issue I have is thesefiles will stay unzipped for 3 days ..so today I will have following 3 files for onelog

aaa-queries.log.20111128
aaa-queries.log.20111127
aaa-queries.log.20111126

My inputs.conf and props.conf entries on app/ agent box are as follows

[monitor:///app/products/xxx/yyy/logs/]

index=xxxx

disabled = false

followTail = 1

blacklist = .(gz|zip|bkz|arch|etc)$

[root@ local]# more props.conf

[source::.../aaa-queries.log.d+]

sourcetype = queries_log

[source::.../aaa-engineInfo.log.d+]

sourcetype = engineInfo_log

Becasue I get multiple logs i.e all 3 logs for each source as a part of my source regex ..My sourcetype is not being set properly i.e Is shows as "suggestions-queries.log-too_small" etc . I think because my sourcetype is not set properly I am not able to do field extractions on my search head servers . Is there a way to uniqely set sourcetype in this case . Zipping the old file / changing application is not a option as the logs are huge and other app components need those files to stay for 3 days .

Tags (2)
0 Karma
1 Solution

tgow
Splunk Employee
Splunk Employee

I am wondering if the "d+" is causing the problem. What happens if you change the source stanza in the props.conf to the following:

[source::.../aaa-queries.log...]
sourcetype = queries_log

source::.../aaa-engineInfo.log...]
sourcetype = engineInfo_log

View solution in original post

tgow
Splunk Employee
Splunk Employee

The trailing "..." is a catchall that you can use your configuration files. Here are links to more information:

http://docs.splunk.com/Documentation/Splunk/4.2.4/Data/Specifyinputpathswithwildcards

http://docs.splunk.com/Documentation/Splunk/4.2.4/admin/Propsconf

0 Karma

desi-indian
Path Finder

Thank you ! that seems to work ..If you do not mind what is the trailing "..." doing ? I added d+ cos each log had a date at the end

0 Karma

tgow
Splunk Employee
Splunk Employee

I am wondering if the "d+" is causing the problem. What happens if you change the source stanza in the props.conf to the following:

[source::.../aaa-queries.log...]
sourcetype = queries_log

source::.../aaa-engineInfo.log...]
sourcetype = engineInfo_log
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...