Reporting

How do I run an Excel report against a search?

Greendav
Explorer

I have an Excel report of hundreds of servers that i need to verify are reporting to Splunk. Is there a fast way to find all of the host in this Excel form and run it within Splunk? Possibly by creating a lookup or some other way?

Tags (2)
0 Karma
1 Solution

Vijeta
Influencer

You can upload your Excel as a CSV lookup table in Splunk and then, using the command line, create a search that searches the index for server field and looks up in the lookup table . Make sure the field that you are looking at has the same name in lookup and index.

index=<yourindex> |dedup host| join type=Outer host[|inputlookup <yourlookup.csv>| eval flag="Yes"] | table host flag

The output will give you list of all servers with flag Yes or null. If flag is null means server is not reporting in Splunk

View solution in original post

0 Karma

iamarkaprabha
Contributor

Hi

You can use inputlookup for that one.
Put your spl query and then join by using the same csv file using it as inputlookup . Join those two data by putting the same field. Please note filed name will need to be same.

Spl query | join fieldname [|inputlookup ]

Vijeta
Influencer

You can upload your Excel as a CSV lookup table in Splunk and then, using the command line, create a search that searches the index for server field and looks up in the lookup table . Make sure the field that you are looking at has the same name in lookup and index.

index=<yourindex> |dedup host| join type=Outer host[|inputlookup <yourlookup.csv>| eval flag="Yes"] | table host flag

The output will give you list of all servers with flag Yes or null. If flag is null means server is not reporting in Splunk

0 Karma

Greendav
Explorer

So this method worked for the most part but the results are not showing anything in the Flag column. There isnt a Yes or a Null response under flag.

My search looks like

index=wineventlog |dedup host| join type=Outer host[|inputlookup LiveServers| eval flag="Yes"] | table host flag

0 Karma

Vijeta
Influencer

If the host in lookup matches with the lookup only then the flag will be Yes else it will be null(blank).
Also please check the column name in your lookup is host , I believe you are using csv lookup so please use inputlookup LiveServers.csv

0 Karma

Greendav
Explorer

I still have had no luck. I ran the search yesterday and it never completed. As the table continues to build im seeing a null status (no results) in the flag column for none of the servers. Making it appear that none of the servers are currently pulling logs into splunk .

0 Karma

Vijeta
Influencer

what does your lookup look like? how much rows your lookup has?
Try this

index=wineventlog |stats count by host| join type=Outer host[|inputlookup LiveServers.csv| eval flag="Yes"|fields flag] | table *
0 Karma

Greendav
Explorer

The lookup file has one row. beginning with "host" in the first column. Should i have the CSV setup differently?

0 Karma

Vijeta
Influencer

Please upload your lookup as a csv type and give the lookup name with csv extension like .csv

0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...