|
My events have two different times in them, one from when the dns server processed them, and then another is added to the beginning of the events from what I assume is splunk. I want splunk to treat the second time as the events timestamp. I have manually assigned the sourcetype for the port as dns_data. Here is part of my props.conf file from $SPLUNK_HOME/etc/sys/local: props.conf--
Here are some events: Jun 23 16:29:19 foo.bar.com Wed Jun 23 16:27:15 2010: 123.123.123.123 -> 321.321.321.321: 52826 NOERR 'something.somewhere.com.' A IN (n#5) (x#9) Jun 23 16:29:19 foo.bar.com Wed Jun 23 16:27:15 2010: 123.123.231.321 -> 25.321.321.31: 1572 NOERR 'something.somewhere.com.' AAAA IN (x#1) Jun 23 16:29:19 foo.bar.com Wed Jun 23 16:27:15 2010: 213.213.21.231 -> 123.123.123.123: 25373 NOERR 'something.somewhere.com.' A IN (a#1) (n#6) (x#11) ANS 'something.somewhere.com. A IN 21.231.231.21 Any help would be appreciated. Thanks. |
|
I you didn't have a I see a couple minor but potentially problem-causing issues with your current config:
Here is what I would suggest you put in your
If you want, you can also use a SEDCMD entry to drop that first date out of there entirely so you consume less bytes in your index. I have some log sources that do this and it makes it easily to review the logs when there aren't two sets of dates for your eyes to scan over.
Keep in mind the timestamp extraction happens first, so you don't have to worry about your SEDCMD getting in the way of your You could also move the second date (the one your are keeping) to the front if you want to. (To be more consitent with your other syslog mesages.
(I haven't tested these Still not working huh? Here are a few more things to double check:
See this link for more props debugging techniques I entered in the suggested code for props.conf and it still does not extract the correct time. I really don't know why it will not take it. It acts like it doesn't even read the [dns_data] stanza. Would there be any other reason why it would not read it or act upon it?
(25 Jun '10, 15:53)
mawwx3
I've added a few more config testing ideas to my answer. Best of luck.
(25 Jun '10, 19:45)
Lowell ♦
Note that Lowell's TIME_PREFIX skips over the day of the week, and yours doesn't. That's pretty key.
(25 Jun '10, 22:13)
jrodman ♦
|
|
I guess you should use |
