Support Questions

Find answers, ask questions, and share your expertise

How to convert date to epoch time in HCP Grok parser

avatar
Contributor

Hi all,

I'm trying to add new telemetry of http-access log which have date format to HCP, but for the sensor to work i need to specify the timestampField on the sensor's JSON RAW which only recognize epoch format.

How can i convert the date format of log ( ex. 20/May/2017:12:19:39 +0700) to epoch format with grok parsher?

Thanks

1 ACCEPTED SOLUTION

avatar
Contributor

Problem solved, i follow this link, and add this to the JSON Raw after "patternLabel":

"timestampField": "timestamp",
		"timeFields": ["timestamp"],
		"dateFormat": "dd/MMM/yyyy:HH:mm:ss Z"

View solution in original post

1 REPLY 1

avatar
Contributor

Problem solved, i follow this link, and add this to the JSON Raw after "patternLabel":

"timestampField": "timestamp",
		"timeFields": ["timestamp"],
		"dateFormat": "dd/MMM/yyyy:HH:mm:ss Z"