Hi all fellow Splunkthiasts, I need your help in understanding what could possibly go wrong in HFW upgrade.
We are collecting some logs through HFW and rely on search-time extractions for this sourcetype. After upgrading HFW, extractions stopped working.
Data format is basically several Key=Value pairs separated by newline.
Investigating this, I found out:
Except search-time extractions, everything seems to work as expected (data is flowing in, event breaking and timestamp extraction seems to be correct).
What I don't understand is how can HFW upgrade even affect search-time extractions on another instance. From there I am a bit clueless on what to focus on to fix this.
What I don't understand
You say you didn’t have a TA (props and transforms on the HF before), normally as the HF is full Splunk instances you should have the TA there for parsing, also known as cooked data and before it reaches the indexer, if you was sending direct then the TA on Indexer will suffice. (Why it worked before the upgrade I don’t know, but the as to the upgrade path, you should always follow the path, as this can often introduce breaking changes, so could be a factor.
I would try to deploy your custom TA(props code) onto the HF and see if that makes a difference, as you already have this TA deployed to the current SH/IDX, you should be able to continue with normal field extractions, once it sees the sourcetype.
So, ensure the code for this data source lives perhaps in a custom TA or copy the code as it is in the SH/IDX and config or deploy that to the HF + restart. Tip for consistency keep the code in one Custom TA app is best practise, otherwise use /local/props.conf.
Hello @deepakc, thank you for your effort to respond. Maybe I was unclear with my question, let me rephrase it.
TL;DR: how can changes on forwarder affect search-head's behavior during search-time? My primary goal is to understand how the extractions work particularly in this detail.
Longer version: The issue here is with search-time extractions. To my knowledge, these extractions are done by search-head and/or respective indexer when the data is being searched (= after all writing to the index is finished, no matter how the data was cooked). Forwarders are not involved in searching, therefore I don't understand how forwarder can affect the search. The events themselves seem to be indexed the same way before and after upgrade, I don't see any distinction in _raw field contents and generally no reason for search-time extractions to stop working.
What in my assumptions and knowledge above is not correct?
Your suggestions apply - as of my knowledge - to index-time extractions, however that is not the case here.
Yes you are on the right path, search time is done via the SH, even after its cooked and sent to the indexers.
Here's some concepts:
Forwarders such as HF affect how the data is pre-processed before it reaches the indexers, they apply sourcetype, host, index metadata. The UF's also apply metadata, but not parse unless some structured data types.
HF = By performing parsing and field extraction at index time, the data is pre-formatted – this can help with the indexer not having to more performant. Applies metatdata
UF = Sends the raw data to indexer, which means the indexer must handle the processing of the data and sometimes can become overloaded, so better to do it at the HF level if you can. Applies metatdata
These can possible reasons for it not working, the upgrade should not do this, unless there was some config in the default props.conf file, and this has been overwritten, any custom code should be placed into the local props.conf file :
This may further help understand the Index time vs Search Time process.
https://docs.splunk.com/Documentation/Splunk/9.2.1/Indexer/Indextimeversussearchtime
Might be worth running btool on the search head and checking where the custom props is configured
/opt/splunk/bin/splunk btool props list --debug my:sourcetype
Typically is should look like the example below:
/opt/splunk/etc/apps/My_Custom_app_props/local/props.conf or
OR
/opt/splunk/etc/system/local/props.conf