Splunk Search

Ingesting different data types into one index

New Member

Hi,

I am being asked if we can ingest two different data formats into one index. Specifically the primary data type is Key Value pairs however from one source the data format is JSON.

A quick search of this site yielded: https://answers.splunk.com/answers/357887/is-there-a-way-to-configure-splunk-to-parse-a-sour.html

So it seems as thought it is possible.

A second related question would be - If that is possible then it this a bad idea... My experience has been that every time I have introduced strange one-offs into any technological solution the super-cool specialized permutation becomes more hassle than it is worth...

0 Karma
1 Solution

Legend

Consider index as your Database and sourcetypes as your tables (schema on the fly) within Database (index). Several types of schemas (sourcetypes) can be defined within your Database (index).

An advantage of such sourcetypes (provided you have followed proper naming conventions would be during event correlation where you can use AND/OR/NOT, =, != and also wildcard (*) within you base search involving your sourcetypes. Adding index and sourcetype and filtering required records upfront in your base query will boost your Splunk search performance.

If you create only one index per schema, you will end up creating too many indexes. However, only advantage is that data from similar sources having same sourcetypes can be corrected/deleted/re-indexed within their own separate indexes, without impacting other sourcetypes.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

Legend

Consider index as your Database and sourcetypes as your tables (schema on the fly) within Database (index). Several types of schemas (sourcetypes) can be defined within your Database (index).

An advantage of such sourcetypes (provided you have followed proper naming conventions would be during event correlation where you can use AND/OR/NOT, =, != and also wildcard (*) within you base search involving your sourcetypes. Adding index and sourcetype and filtering required records upfront in your base query will boost your Splunk search performance.

If you create only one index per schema, you will end up creating too many indexes. However, only advantage is that data from similar sources having same sourcetypes can be corrected/deleted/re-indexed within their own separate indexes, without impacting other sourcetypes.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

New Member

Ok this really makes sense... how the question is wether or not more than one source type will meet the needs of the customer... I will check with them and ask a follow on question if required.

Thank you.

0 Karma

Ultra Champion

You see, a Splunk index doesn't enforce any schema at any point, so you can have completely different types of data within one index, hopefully with different sourcetypes.

0 Karma

New Member

Of course very logical... thank you for the quick answer...

0 Karma

SplunkTrust
SplunkTrust

An index can get data from any number of sourcetypes. It's not a strange one-off at all.

0 Karma

New Member

Also very logical and helpful... thank you for the quick answer...

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!