I am new in splunk and only have a basic knowledge in querying. I need to create a dashboard that will count the total number of policy for each server. I have an example data, it shows the different host and policy.
Example data:
I want to generate a dashboard like this:
My code is like this:
eval search if("$Host$"="AAA") | stats count(Policy) as "AAA" by Policy |
eval search if("$Host$"="BBB") | stats count(Policy) as "BBB" by Policy |
eval search if("$Host$"="CCC") | stats count(Policy) as "CCC" by Policy |