Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to convert date to epoch time in HCP Grok parser

avatar

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

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

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"