Deployment Architecture

How do I add a host name from another index to a scheduled report which has a table from other index?

pragi_eashwar
Engager

Scheduled report
Query
Index=a threat=critical vulnerability=high | table ip,a,b,c
Requirement
How to add host name of the ip to this report which is present in the Logs situated in another index ?

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi pragi_eashwar,
you can follow two ways:

  • if you have a more or less static situation, you can put your hostnames and IPs in a lookup and use it to insert hostames in your report;
  • if you have a dynamic situation, you can use commands like appendpipe or join to add the hostname to each row of your report.

I suggest to use Lookup because is quicker.

Your can manage hostnames in you lookup using a scheduled search, every night (or a different frequency) e.g.:

your_search
| dedup host
| table host ip 

after you can use it

index=a threat=critical vulnerability=high 
| lookup hostnames.csv ip OUTPUT host
| table ip host a b c 

Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi pragi_eashwar,
you can follow two ways:

  • if you have a more or less static situation, you can put your hostnames and IPs in a lookup and use it to insert hostames in your report;
  • if you have a dynamic situation, you can use commands like appendpipe or join to add the hostname to each row of your report.

I suggest to use Lookup because is quicker.

Your can manage hostnames in you lookup using a scheduled search, every night (or a different frequency) e.g.:

your_search
| dedup host
| table host ip 

after you can use it

index=a threat=critical vulnerability=high 
| lookup hostnames.csv ip OUTPUT host
| table ip host a b c 

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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