Splunk Search

Why is my search eval not returning all expected fields?

New Member

stats count host. Below search only returning "Server and Count" not the Desktop.

index| dedup host | eval "Type"=case(host=="xxx*","Desktop", host!="xxx*","Server") | stats count(host) by Type |  rename count(host) AS Count | table Type Count

Need two row with Server & Desktop. If the host name starts with xxx its Desktop else its Server with count displayed

Tags (3)
0 Karma


eval "Type"=if(match(host,"xxx.*"),"Desktop" ,"Server")
You can use match command like above.


Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

March Community Office Hours Security Series Uncovered!

Hello Splunk Community! In March, Splunk Community Office Hours spotlighted our fabulous Splunk Threat ...

Stay Connected: Your Guide to April Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars in April. This post ...