Splunk Search

Take output of one search and use to create a table after looking up values

johntaddei
New Member

Hi - email guy here...
I need to query message headers that meet a criteria, then use the returned QueueIDs to run a second search that produces a table of information.

Jul 6 14:41:55 blah.com sm-mta[2048]: t66Ifbqe002048: Milter insert (2147483646): header: X-IBE-Encrypted-Signer-District: blah.com
host = mailserver.blah index = mail source = /var/log/maillog sourcetype = mail
7/6/15
2:35:45.000 PM

Jul 6 14:35:45 blah2.com sm-mta[28881]: t66IZiJ6028881: Milter insert (2147483646): header: X-IBE-Encrypted-Signer-District: blah2.com
host = mailserver.blah2.com index = mail source = /var/log/maillog sourcetype = mail

The above t66 values should be the input to a second query that gets me the message information like "To: From:", etc.

I would like a chart that shows:

Domain Name To: From:
blah.com john.doe@somedomain.com user1@blah.com
blah2.com jane.doe@otherdomain.com newuser@blah2.com

Tags (2)
0 Karma

woodcock
Esteemed Legend

Like this (assuming all of your field extractions are already working; you may have to adjust my guesses at actual field names):

<search with domain/to/from> [ host = mailserver.blah2.com index = mail source = /var/log/maillog sourcetype = mail | dedup t66  | fileds t66 | rename t66 AS QueueID ] | fields "Domain Name" To From
0 Karma

woodcock
Esteemed Legend

Did you get this working?

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...