LogParser : Top useful query

By | 21 November, 2014

Below is the top query that very useful for daily use :

TO_LOCALTIME(TO_TIMESTAMP(EXTRACT_PREFIX(EXTRACT_SUFFIX([#Fields: date-time], 0, 'T'), 0, '.'), 'yyyy-MM-dd hh:mm:ss'))
SELECT event-id,COUNT(*) as count FROM '[LOGFILEPATH]' where TO_LOCALTIME(TO_TIMESTAMP(TO_STRING(EXTRACT_PREFIX([#Fields: date-time],0,'.')), 'yyyy-MM-ddThh:mm:ss')) between timestamp('2014/11/17 09:00:00', 'yyyy/MM/dd hh:mm:ss') and timestamp('2014/11/17 10:00:00', 'yyyy/MM/dd hh:mm:ss') and server-hostname like 'SGISGEX02' group by event-id

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.