Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Need to use these 2 searches because of multikv with 1 table

$
0
0
So here is my search index=someindex sourcetype=somesourcetype source="someloglocation*" eventtype="nix_kernel_attached" "\"outcome\":\"success\"" | multikv | mvexpand _raw | rex field=_raw "\"userId\":\"(?[^\"]+)\"" | eval eventtype=mvindex(eventtype,1) | eval LoginType=case(eventtype == "nix_kernel_attached", "WebUI") | search userinfo=userid* "\"message\":\"login\"" eventtype=nix_kernel_attached LoginType=* | join type=inner max=0 userinfo [search index=someindex sourcetype=somesourcetype source="someloglocation/*" eventtype="nix-all-logs" "\"outcome\":\"success\"" | multikv | mvexpand _raw | rex field=_raw "\"userId\":\"(?[^\"]+)\"" | eval eventtype=mvindex(eventtype,0) | eval LoginType=case(eventtype=="nix-all-logs", "CLI") | search userinfo=someuserid* "\"message\":\"login\"" eventtype=nix_kernel_attached LoginType=*] I need to display the UserID and the LoginType in a table so that we can show how the user came in. I've been messing with this for a while, one of the problems is that some of these events have an eventtype with 2 different values for the same event. Hence the mvindex command to yank out the one that doesn't pertain to that particular search If there is a better method when working with mvindex I am all ears for it. Problem is if a user logs in with the cli tools it shows up in both eventtypes but if they login with the UI then it only registers with one eventtype as you can tell from what my search is doing. By the way this join is "working" in that it does return results but I don't trust the results because of the eventtype thing. It also looks like its bringing back duplicates which sure I can eliminate with a dedup but I'm hoping there is a more sane method to this madness. Oh I also don't have access to the backends so I can't make any changes to the way the data is being indexed. Thank you all for your help with this very much.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>