Getting Data In

sourcetype naming scheme

paranoid
Explorer

What's a good sourcetype naming scheme in a large environment with numerous different applications using several technologies. eg. web-site for Antartica using apache, redis server used by mobile-site for Greenland... I am thinking of sourcetypes like:

www:aq:access
mobile:gl:redis

This will allow queries with: sourcetype=*:*:redis to search all redis logs or sourcetype=www:*:access to count combined web traffic and it will still allow searching just the web traffic for Antartica.

Or should I leave sourcetypes as:

sourcetype=access
sourcetype=redis

and then use eventtypes to achieve the above granularity?

I tend to prefer the granularity in the sourcetype because then we categorize the data at the source. With eventtypes all the configuration is taking place on the indexers and possible burning some CPU there as well.

Thoughts?

Tags (1)
0 Karma

sowings
Splunk Employee
Splunk Employee

I personally feel that two levels of subcategories is probably overkill. I've seen several installations that make use of a single level, such as www:apache, www:iis or something like that. If further subdivision within those types is required, I've seen a _ as the secondary separator: www:apache_error www:apache_access. It is, of course, up to you. The ability to make use of a wildcard within a high-level type to find all matching types of data is a good trick.

You might also consider reading up on the "Common Information Model" here to give yourself a leg up on field naming schemes as well.

lguinn2
Legend
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!

Think Like an Architect: Introducing the Splunk Certified Cybersecurity Defense ...

In cybersecurity, defenders respond to threats. Architects design the systems that stop them.    As ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...