Splunk

Timestamps

epoch to human

eval human_time=strftime(epoch_time, ,"%m/%d/%y %H:%M:%S") | table _time, human_time

human to epoch

rex  "timeStamp=(?<human_time>\d{4}-\d{2}-\d{2}.\d{2}:\d{2}:\d{2}\.\d{3})"
| eval epochTime=strptime(human_time, "%Y-%m-%d %H:%M:%S.%3Q")*1000
| table epochTime

multi value rex

| rex max_match=3 "amount:(?<amount>[\d\.]+),"
| eval IN = mvindex(amount, 0)
| eval OUT = mvindex(amount, 1)
| eval BALANCE = mvindex(amount, 2)

reading from a previous row

append cols

This example allows an stack-area graph of request by website with a chart overlay of the response time 90% for all websites.

show multiple status code by website

How to list all the indexes ?

Last updated