All Apps and Add-ons

Is it possible to add _meta fields in DB Connect?

las
Contributor

Hi.

 

We have been forced to add identifiers to the collection tier in our Splunk environment. The way we have solved it, is using _meta with a couple of fields.

Now we have some DB data that is getting indexed and we would like to tag these data the same way.
The easy part was editing the /local/inputs.conf file and adding the extra line to all the input stanzas - this unfortunately didn't work and as far as I can read the db_inputs.conf doesn't allow the _meta line in the stanzas.

 

Does anyone have an idea, how to solve this problem, my thougths run in the direction of index-eval, but that is a more complex setup.

 

Kind regards

las

Labels (2)
0 Karma
1 Solution

livehybrid
SplunkTrust
SplunkTrust

Hi @las 

It isnt possible to add these directly, however you could look to add your meta field with props/transforms based on your source or sourcetype - For example:

== props.conf == 
[source::MyDBInput]
TRANSFORMS-set_customerid = set_customerid

== transforms.conf ==
[set_customerid]
REGEX = .
FORMAT = CustomerID::CustomerABC
WRITE_META = true

= Or with INGEST_EVAL =
[set_customerid]
INGEST_EVAL = CustomerID="CustomerABC"

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

View solution in original post

livehybrid
SplunkTrust
SplunkTrust

Hi @las 

It isnt possible to add these directly, however you could look to add your meta field with props/transforms based on your source or sourcetype - For example:

== props.conf == 
[source::MyDBInput]
TRANSFORMS-set_customerid = set_customerid

== transforms.conf ==
[set_customerid]
REGEX = .
FORMAT = CustomerID::CustomerABC
WRITE_META = true

= Or with INGEST_EVAL =
[set_customerid]
INGEST_EVAL = CustomerID="CustomerABC"

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

las
Contributor

Hi @livehybrid 

 

Thanks for the reply, it was as I also could read in the docs, but nice to get it confirmed.

 

Kind regards

las

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!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...