Getting Data In

JSON field extraction beyond 5000 chars

Sahansral
Loves-to-Learn

Hello,

we have a problem with long JSON events that have a length over 5000 chars  (under 5000 works fine).
The auto-field-extraction stops around the 5000 char limit, so fields beyond that are not recognized at all.

Also the JSON structure of these long events isn't formatted in the result list after a search.

We set extraction_cutoff in limits.conf to 10000 and restarted, but it didn't help. 
Is there another limit  we can set?

Thanks in advance!  

Labels (2)
0 Karma

harsmarvania57
Ultra Champion

Hi,

 

How many fields do you have in your event? If it is more than 100 fields then you need to increase below settings in limits.conf on SH.

 

[kv]
limit = <integer>
* The maximum number of fields that an automatic key-value field extraction
  (auto kv) can generate at search time.
* The summary fields 'host', 'index', 'source', 'sourcetype', 'eventtype',
  'linecount', 'splunk_server', and 'splunk_server_group' do not count against
  this limit and will always be returned.
* Increase this setting if, for example, you have data with a large
  number of columns and want to ensure that searches display all fields extracted
  from an automatic key-value field (auto kv) configuration.
* Set this value to 0 if you do not want to limit the number of fields
  that can be extracted at index time and search time.
* Default: 100

 

0 Karma

Sahansral
Loves-to-Learn

The events have about 20 fields.   There's one very long field which contains a stack trace.

0 Karma

harsmarvania57
Ultra Champion

Is it possible you to provide sample event (Remove any sensitive data) and query which you are using?

0 Karma

Sahansral
Loves-to-Learn

Hi Giuseppe,
I tried it, but it didn't solve the problem.
As far as I know, truncate belongs to line breaking and the events are indexed completely.
No truncation.
Only the json auto extraction is messed up.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Sahansral,

could you share a sample of your logs?

Ciao.

Giuseppe

0 Karma

Sahansral
Loves-to-Learn

Here one log event:
{"Timestamp":"2021-04-21T20:01:44.6168842+02:00","Message":"Es ist ein Fehler aufgetreten. ErrorMessage: Fehler beim Lesen der Einkaufsliste. PersId = 132, Monat 10, Jahr 2020; {@RequestInfo}","Level":"Error","Exception":{"Type":"xxxxxx.ooo.uuuuuuuu.zzz.zzzzzzzz.Integration.Exceptions.BargeldlosIntegratorException","Message":"Fehler beim Lesen der Einkaufsliste. PersId = 132, Monat 10, Jahr 2020","Source":"xxxxxx.ooo.uuuuuuuu.zzz.zzzzzzzz.Integration.01","StackTrace":" bei xxxxxx.ooo.uuuuuuuu.zzz.zzzzzzzz.Integration.BargeldlosIntegrator.GetEinkaufsliste(Int32 persId, Int32 jahr, Int32 monat)\r\n bei xxxxxx.ooo.uuuuuuuu.zzz.iii.zzzzzzzz.API.Controllers.BargeldlosController.GetEinkaufsliste(Int32 persId, Int32 jahr, Int32 monat)\r\n bei lambda_method(Closure , Object , Object[] )\r\n bei System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)\r\n bei System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNon[...]","TargetSite":"xxxxxx.ooo.uuuuuuuuuuuuuuuuuuuuu.llllDatenVerwaltung.Einkauf[] GetEinkaufsliste(Int32, Int32, Int32)","InnerException":{"Type":"System.NotImplementedException","Message":"Die Methode oder der Vorgang ist nicht implementiert.","Source":"xxxxxx.ooo.uuuuuuuuuuuuuuuuuuuuu.llllDatenVerwaltung.01","StackTrace":" bei xxxxxx.ooo.uuuuuuuuuuuuuuuuuuuuu.llllDatenVerwaltung.llllDatenManager.GetEinkaufsListe(Int32 persId, Int32 jahr, Int32 monat)\r\n bei xxxxxx.ooo.uuuuuuuu.zzz.zzzzzzzz.Integration.BargeldlosIntegrator.GetEinkaufsliste(Int32 persId, Int32 jahr, Int32 monat)","TargetSite":"System.Collections.Generic.IList`1[xxxxxx.ooo.uuuuuuuuuuuuuuuuuuuuu.llllDatenVerwaltung.Einkauf] GetEinkaufsListe(Int32, Int32, Int32)"},},"RequestInfo":{"RequestHost":"zzz.dev.dvint.de","RequestUri":"/iii.zzzzzzzz.API/api/v1/bargeldlos/einkaufsliste/132/2021/4","RequestMethod":"GET","RequestedController":"xxxxxx.ooo.uuuuuuuu.zzz.iii.zzzzzzzz.API.Controllers.BargeldlosController","RequestParams":{"persId":132,"jahr":2021,"monat":4}},"Stage":"Test","ProgramName":"iii.zzzzzzzz.API","Host":"zzz13350"}



I noticed when I use indexed_extractions=json all fields are extracted properly- When I use kv_mode=json then  the last correct extracted field is   exception.innerexception.targetside.
The search result isn't properly formatted for both (no json-structure that can be unfolded).
I could use indexed_extractions as an emergency solution, but I would prefer to use the more storage saving kv_mode=json.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Sahansral,

did you tried to insert the option TRUNCATE = 1000000 in your props.conf?

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...