Splunk Search

Additional searchable value to ingested data

orendado
Loves-to-Learn

Hi,

Let's say I'm ingesting different types of logs files from different type(some are txt,csv,json,xml....) to the same index. How can I add additional data to each datasource/log? I would like to some extra fields in json format, for example : customers name, system same...

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @orendado ,

Usually different types of logs are categorized using sourcetype.

Related to sourcetype, usually there are all the parsing rules and field extraction.

Are you using different sourcetypes?

If you want to add othe data sources, you can create your own sourcetypes eventually starting from an existern one.

The Add Data function is very useful to find the correct sourcetype to associate to your data sources.

Ciao.

Giuseppe

0 Karma

orendado
Loves-to-Learn

Yes, I'm using different sourcetype. I would  like to add addtional data that will help distinguish the logs, something like tags or sub category in sourcetype

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @orendado ,

you can tag your data using tags and eventtypes (https://docs.splunk.com/Documentation/SplunkCloud/latest/Knowledge/Abouteventtypes) but maintaining the sourcetype of each data source, in this way you have all the parsing rules up and running.

I usually define a sorcetype for each type of data, eventually cloning an existing one: e.g. if I have a custom data source in csv format, I'll clone it from the standard csv and I call it "my_sourcetype" (or the name you like).

In this way I have all the parsing rules of the csv, eventually adding other specific, and I recognize those logs also by sourcetype.

Remember that this is useful only for custom data sources, if you have standard data sources (e.g. Fortinet or Cisco or Checkpoint), it's always better to use the sourcetypes in the add-ons from Splunkbase.

This is relevant also because it isn't sufficient to parse the data, but it's also important to normalize data to use them in apps as Enterprise Security.

In addition, in these add-ons tags and eventtypes are already defined.

Ciao.

Giuseppe

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...