The venerable old-skool Splunk forums are now closed. Feel free to search for old content here, but new posts are no longer supported.

Instead, please visit the thriving community at answers.splunk.com to ask and answer questions about your Splunk deployment and how to get the most out of it.

Forums: SplunkGeneral: Issues with external lookup fields from static file

Previous Topic: Reindex existing data?  |   Next Topic: Really Basic Syslog Facilities Question


Posts 1–2 of 2

Hi,

I'm having some issues with external lookup fields based on a static file.

When defining the csv static file used as input, the particular type of entry is as follows:

facility,priority,category,message,kernel_message,
...
%KERN,6,KERN_ARP_ADDR_CHANGE,,KERN_ARP_ADDR_CHANGE: arp info overwritten for from to ,
...

This is also referred in props.conf with the following parameters (have also tried other several combinations without success):

[prioritydata]
lookup_table = priority-lookup kernel_message OUTPUT facility priority message

However, I cannot add the intended fields to search outputs with a query like:

| lookup priority-lookup kernel_message OUTPUT priority

It works however for other types of messages where the lookup is based on category, if the entry in props.conf is properly adapted for it. In this case, category is a simple string with no blank spaces.

- Newbie questions:

[1] Does such an input lookup work if the specific field contains blank spaces and more than a single string?

[2] Ideally, I would want to achieve a situation where either a lookup in the category OR in the kernel_message fields provides and adds the priority.

Is this an AND or an OR of both input fields?

lookup priority-lookup category kernel_message OUTPUT priority

Would it be possible to achieve such lookup (one field OR the other) with a single lookup instruction? The input csv file contains one field filled or the other, never both of them.

Thanks,

Gonzalo

1. You can surround the field with double quotes, which is the CSV convention for fields with spaces or commas that is followed by, e.g., Excel among others when exporting to CSV. For that matter, you can use the quotes around any value even if it doesn't have spaces or commas.

2. No, you would have to do two lookups.