Getting Data In

Why am I unable to see Logs first week of every month?

blbr123
Path Finder

Hello All

I got a requirement to Upload Logs to Splunk

Out of 5 Hosts 3 are Linux and other 2 are windows

The Logs getting picked by Splunk but for Linux but for windows Unable to see Logs from 1st to 9th of every month

The timestamp for windows server is 1/09/2022, 2/09/2022 and so on till 9/09/2022

%d in props need date to be two digit but here it is just one digit hence the logs are not getting picked

 

so tried below props for windows with %e:

TIME_FORMAT=%e/%m/%Y %H:%M:%S

We apply props using sourcetype in general as it was not working tried props with source but still same issue

By the way in our infrastructure props are kept in heavy forwarder and are applied at index time

Can anyone help on this please?

Labels (3)
Tags (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

I think that splunk is recognised this as an en_US time format and there the first number is month and second one is day. For that reason it is setting wrong _time to your events.

You should try to add correct time stamp recognition for those nodes.

Add into props.conf

DATETIME_CONFIG =
TIME_PREFIX = <what else your timestamp prefix is e.g. ^ if start of line>
TIME_FORMAT = %e/%m/%Y %H:%M:%S (or what ever your time format is)

Above should works.

The easiest way to check it, is to take some raw events to file and then import it to your test instance with "Add Data -> Upload" that file and add above definition. Just play with those settings as long it works.

Of course you could give sample data/event to us and we can help you with it.

r. Ismo 

blbr123
Path Finder

Thanks for the Response @isoutamo 

The first number in the timestamp 1/09/2022, 2/09/2022 is day and the second number is month

shall I use DATETIME_CONFIG as NONE or CURRENT?

and DATETIME_CONFIG=NONE Does exactly what, if you can explain this that would be great!

🙂

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Yes the 1st number is day, but as in en_US locale it is month, splunk quite often take the wrong assumption for it. 
Just leave DATETIME_CONFIG = . Then it just undefined it from its default value.

0 Karma

blbr123
Path Finder

@isoutamo I have tried the configs but still same issue  

Please find the props 

 

 

 

0 Karma

blbr123
Path Finder

In the internal logs it gives error " parsing configuration stanza"

0 Karma

isoutamo
SplunkTrust
SplunkTrust

If your time stamp's date can be one or two character you should try something like

LINE_BREAKER = ([\n\r]+)\s?\d{1,2}/\d{2}/\d{2,4}......

 

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...