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
Super Champion

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
Super Champion

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
Get Updates on the Splunk Community!

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...

Enterprise Security Content Update (ESCU) | New Releases

In April, the Splunk Threat Research Team had 2 releases of new security content via the Enterprise Security ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...
OSZAR »