All Apps and Add-ons

host integrated details with hostname,, index, sourcetype and source

Rody333
New Member

I want to fetch what all devices integrated to splunk and sending logs. I don't have admin rights and having access to Search Head only.
Pls advise how to fetch host integrated details with hostname, index, sourcetype and source.

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

Try these:

| tstats count values(sourcetype) where index=* BY index

And:

| tstats count values(host) where index=* BY sourcetype

Or maybe combined like this:

| tstats count where index=* BY host sourcetype index
| stats list(count) AS host_total list(host) AS host sum(count) AS sourcetype_total BY sourcetype index
| nomv host
| nomv host_total
| stats list(host) AS host list(host_total) AS host_total sum(sourcetype_total) AS sourcetype_total BY index

View solution in original post

0 Karma

woodcock
Esteemed Legend

Try these:

| tstats count values(sourcetype) where index=* BY index

And:

| tstats count values(host) where index=* BY sourcetype

Or maybe combined like this:

| tstats count where index=* BY host sourcetype index
| stats list(count) AS host_total list(host) AS host sum(count) AS sourcetype_total BY sourcetype index
| nomv host
| nomv host_total
| stats list(host) AS host list(host_total) AS host_total sum(sourcetype_total) AS sourcetype_total BY index
0 Karma

Rody333
New Member

Thanks a lot woodcock. It really helps

0 Karma

woodcock
Esteemed Legend

When you are done gathering answers, be sure to pick one and click Answer to close it out.

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Run this

| metasearch index=* sourcetype=* 
| table index source host sourcetype
0 Karma

Rody333
New Member

Hi skoelpin, Thanks for your help. Need another help. It's a huge data with redundancy.. can you tell me if result can have distinct values

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...