Dashboards & Visualizations

Single Value Field Count

bchristensen
New Member

This should be an easy one for you guys.

Basically, I'm trying to display the total number of hosts associated with an event into a single value:

<single>
  <searchString>eventtype="sp.*" | stats count(tag::host) | rangemap field=count low=1-1000000 default=low</searchString>
  <title># Of Active Customers</title>
  <earliestTime>-4h</earliestTime>
  <option name="afterLabel">Customers</option>
  <option name="linkFields">result,beforeLabel</option>
  <option name="classField">range</option>

Driving me nuts! I keep coming back with "N/A Customers" displayed in the button.

Tags (1)
0 Karma

southeringtonp
Motivator

Looks like your field names aren't going to match coming out of stats. Also, the example search is going to give you the number of host tags rather than of the number of the hosts -- is that what you intended?

Try changing:

| stats count(tag::host)

to (number of host tags):

| stats count(tag::host) as count

or (number of hosts):

| stats dc(host) as count
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...