Getting Data In

Why is linecount 2 when it's clearly 1?

danielbb
Motivator

For multiple sourcetypes, linecount is 2, while clearly, it should be 1. Has anybody encountered this case?

Labels (4)
Tags (1)
0 Karma

livehybrid
Super Champion

Hi @danielbb 

Please could you share a sample event and screenshot of this so we try and repeat this issue and/or diagnose?

🌟 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

danielbb
Motivator

Thank you, @livehybrid@richgalloway, I'll get screenshots but, a related question, how do I access the second line of _raw?

0 Karma

isoutamo
SplunkTrust
SplunkTrust
In splunk _raw is only one line, but it can contains e.g. \n character.
You could see it e.g. “table _raw”

danielbb
Motivator

@isoutamo  I'm running the following - 

index = <my_index> linecount=2
| table _raw 

and everything shows up as one line, I don't see any sign of \n, what do I miss? 

I also checked with an encoding tool and it doesn't show either the 13 ascii code or the 10 one within these lines. 

My biggest confusion is the fact that for this sourcetype I have -  

SHOULD_LINEMERGE=FALSE

And therefore, how come, sometimes the events have multiple lines? 

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Hoe you have defined line breaking?

danielbb
Motivator

I came across an identical thread at Re: How does Splunk calculate linecount? - Splunk Community

0 Karma

livehybrid
Super Champion

Hi @danielbb 

It could be something like a field extraction happening after the line breaking which is causing this, or something else. Without access to your instance we could do with seeing some sample logs along with a btool output ($SPLUNK_HOME/bin/splunk btool props list <sourceTypeName>) for your event's sourcetype. 

The thread you posted from 2013 looks like could have been related to the events having a line-break in.

Please let us know if you're able to provide a sample + props output. 

Thanks

richgalloway
SplunkTrust
SplunkTrust

Example?  Screenshot?

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...
OSZAR »