Splunk Search

How to Count appearance of containers per company?

janderhungrige
Observer

Hi,
I want to count the numbers of containers per company. Each data point has a container id, company id, and much more.

If I use

 

 

stats count("coreData.containerNumber") BY "coreData.companyID"

 

 

 , it somewhat works, but I don't get any returns.

also

 

 

stats dc("coreData.containerNumber") as count by "coreData.companyID" 

 

 

does not return results.

Is the code correct?

Labels (1)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try with single quotes around the field names rather than double quotes - alternatively, rename the fields with non-alphanumerics into names with only letters and numbers or underscores.

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...