Dashboards & Visualizations

Dashboard Studio count input

jwhughes58
Contributor

I'm working with Dashboard Studio for the first time and I've got another question.

In the input on the Dashboard, I set this $servers_entered$.  I thought I had a solution for counting how many items are in $servers_entered$, but I found a case that failed.  This is what $servers_entered$ looks like.

host_1, host_2, host_3, host_4, ..., host_n

What I need is a way of counting how many entries are in $servers_entered$.  So far the commands I've tried have failed.  What would work?

TIA,

Joe

Labels (2)
0 Karma
1 Solution

jwhughes58
Contributor

This works.

| makeresults
| fields - _time
| eval hosts="$servers_entered$"
| makemv delim="," hosts
| eval count=mvcount(hosts)
| table count

View solution in original post

0 Karma

jwhughes58
Contributor

This works.

| makeresults
| fields - _time
| eval hosts="$servers_entered$"
| makemv delim="," hosts
| eval count=mvcount(hosts)
| table count
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried 

mvcount($servers_entered$)
0 Karma

jwhughes58
Contributor

@ITWhispererThanks, but those didn't work.  I tried both of these.

| makeresults
| fields - _time
| eval count=mvcount($servers_entered$)
mvcount($servers_entered$)

The first errors.  The second returns 0.

0 Karma
Get Updates on the Splunk Community!

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...

New Dates, New City: Save the Date for .conf25!

Wake up, babe! New .conf25 dates AND location just dropped!! That's right, this year, .conf25 is taking place ...

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...