I am not sure if this is possible, but I have a file named called php_201000618.txt and inside the logs it contain something like:
HTTP/1.1 200 OK
Date: Sun, 6 Jun 2010 19:33:17 GMT
Keep-Alive: timeout=300, max=636
I need to get the date from the filename 20100618 and the time from 20:54:17. Is it possible to split the timestamp recognition precedence into two components?
I know it may seem easier to get it from the line "Date: Sun, 6 Jun 2010 19:33:17 GMT", but this line does not exist in all the lines - and the only reliable place is to get the date from the filename as well as the header "----------Time 20:54:17----------"
Right now I have a props.conf that shows:
TIME_PREFIX = ^----------Time
TIME_FORMAT = %H:%M:%S
Time extraction is working fine, but I am getting some random dates which I am not sure why this is happening.
Thanks for any suggestions.
Thanks Gerald. I have my own datetime.xml defined already, and it's working great for some events, but for certain events Splunk is pulling the date from some other values in the logs.
So that is the reason why I'm asking if it's possible to change the timestamp recognition precedence so that it will hit my datetime.xml first before going to some other places to look for the date.
Thanks for the response though, always appreciative of your help.
You may want to take a look at the following answer that has been posted. I believe that it answers your question as well.