Hi, I am a student and new to Splunk. I really need help creating a table like this:
The goal is to detect different users that authenticated using same clientIP, different httpmethod, different status codes, and its equivalent sessionid. I used the below query, which yielded no results.
index=* sourcetype=* httpmethod=* httpstatus=*
| table clientip,httpmethod,statuscode,sessionid
| eval mv_field = clientip.”,”.httpmethod”,”.statuscode”,”.sessionid
| makemv delim=”,” mv_field
| table mv_field
|
clientIP |
HTTPMETHOD |
STATUS CODE |
SESSION |
|
clientIP 1 |
GET |
200s |
sessionid |
|
clientIP 2 |
POST |
400s |
sessionid |
|
clientIP 3 |
GET |
200S |
sessionid |
Based on the example output you provided:
index=* sourcetype=* httpmethod=* httpstatus=*
| stats values(*) AS * BY clientip
| table clientip,httpmethod,statuscode,sessionid
@johnhuang . Thank you. This worked perfectly as I wanted
Based on the example output you provided:
index=* sourcetype=* httpmethod=* httpstatus=*
| stats values(*) AS * BY clientip
| table clientip,httpmethod,statuscode,sessionid