#logstash

/

      • Simon_k
        Sure, one sec
      • ghanima joined the channel
      • ghanima
        hello all
      • can some tell me how one sets the HEAP size for logstash
      • torrancew
        ghanima: LS_HEAP or something like that IIRC
      • coolacid has quit
      • Simon_k
        restro: Here is part of the text. arg="" realm="NX:Secure"
      • Lots of stuff like that in the message
      • ghanima
        torrancew: so I am running this inside my shell
      • export LS_HEAP='20g'
      • rastro
        ghanima: LS_HEAP_SIZE in /etc/sysconfig/logstash for me.
      • torrancew
        ghanima: how do you start logstash?
      • ghanima
        bin/logstash -f configfile
      • torrancew
        by hand?
      • Simon_k
        rastro: here is the pattern: gsub => [ "message" , "\"" , "Null " ]
      • torrancew
        oh sorry
      • ghanima
        torrancew: yes I am testing something locally right now
      • torrancew
        LS_HEAP_SIZE as rastro said
      • rastro
        Simon_k: are you using the kv filter?
      • torrancew
        NOT LS_HEAP
      • Simon_k
        rastro: yes
      • rastro
        Simon_k: did you try trim there?
      • datajunkie joined the channel
      • Simon_k
        I am gsubing than using kv. otherwise kv gets wrong fields
      • ghanima
        torrancew: so in my case this is still not getting set correct when looking at the -Xmx setting
      • I am seeing this -Xmx1g
      • coolacid joined the channel
      • xeorex
        rastro: Thank you so much. This did it. I own you a beer :-)
      • torrancew
        can you possibly share some actual pastes?
      • we have no real way to know if you're doing this "correctly" (though I dislike that term)
      • Simon_k
        sure, one min
      • rastro
      • logstashbot
      • rastro
        xeorex: glad it worked.
      • Simon_k: maybe we can help you gey kv working. it's usually much nicer than the alternatives.
      • Simon_k
        Here is the log I am working on. I figured I would replace the quotes with null, than KV would be able to handle it.
      • id=firewall time="2016-06-28 15:30:01" pri=6 fw=x.x.x.x vpn=ive user=Nx\xxxx realm="Nx:Secure" roles="Nx" proto= src=x.xxx.x.xx dst= dstname= type=vpn op= arg="" result= sent= rcvd= agent="" duration= msg="xxxxxxxxxxxxxxx "
      • But the log differs in length and sometimes feilds are empty with just a blank space and sometimes just has an empty quotes.
      • ghanima
        torrancew: is the me setting the variable and executing logstash http://pastebin.com/tgWRMFgE
      • logstashbot
        Title: [centos@ip-10-1-1-180 logstash-5.0.0-alpha3]$ export LS_HEAP='20g' [centos@ip-1 - Pastebin.com (at pastebin.com)
      • Simon_k
        But obviously many times those fields are not empty and they hold valuable info
      • cliles has quit
      • rastro
        Simon_k: ah, you'll probably get caught by this one, too: https://github.com/logstash-plugins/logstash-fi...
      • logstashbot
      • ghanima
        torrancew: this is full java args when that process runs http://pastebin.com/NxA1qyzu
      • logstashbot
        Title: Full java process /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX: - Pastebin.com (at pastebin.com)
      • torrancew
        ah, 5.0alpha?
      • Simon_k
        rastro: sop far that has not affected me but its possible
      • torrancew
        could e a bug or that the flag has changed
      • cliles joined the channel
      • rastro
        Simon_k: in your example, you had msg="xxxxxxxx " which would technically fail.
      • torrancew
        ghanima: try setting the JVM opts you want directly via "LS_JAVA_OPTS"
      • ghanima: it looks like this is changing come 5.0
      • xeorex has quit
      • rastro
        Simon_k: so i take back my recommendation for kv{} :(
      • Simon_k
        rastro: Ah I see, so then my non-empty quotes will fail as well.
      • rastro
        Simon_k: "foo" is fine. "foo bar" will break.
      • Simon_k
        Ah got it.
      • ghanima has quit
      • rastro
        Simon_k: and since gsub is broken, i think that leave you ruby{}.
      • Simon_k
        Then I am not really sure how to parse this log. Especially since there are fields which are not in every log, and the log length differes.
      • That is one issue I have not been able to figure out in Logstash, how to treat logs that are not always the same.
      • fatdragon joined the channel
      • rastro
        Simon_k: kv{} is normally a good solution for that, if you have a good separator.
      • Simon_k: e.g. urls with "&"
      • mspo joined the channel
      • Simon_k
        I will look into this. can kv{} only be performed if there is an = sign present?
      • fabiobat_ has quit
      • hugh_jass has quit
      • ghanima joined the channel
      • hugh_jass joined the channel
      • ghanima
        torrancew: sorry had to reconnect did you have a chance to look at my pastebins
      • fabiobatalha joined the channel
      • niklasye joined the channel
      • rastro
        Simon_k: you can change the separator with value_split.
      • Simon_k
        awesome. I really appreciate your help. I am still wrapping my head around the parsing. I will look further into this.
      • mhickey joined the channel
      • fabiobat_ joined the channel
      • atlas__ has quit
      • rastro
        Simon_k: sorry there wasn't better news. too many open bugs.
      • fabiobatalha has quit
      • Simon_k
        yeah, looking forward to an update :)
      • datajunkie has quit
      • atlas__ joined the channel
      • aconite33 joined the channel
      • aconite33
        I'm having difficulties using winlogbeat via logstash.
      • I keep running into these two errors:
      • ERR Failed to publish events caused by: EOF
      • ERR Failed to publish events caused by: read tcp
      • torrancew
        ghanima: I looked at the 5.0 stuff and it seems the LS_HEAP_SIZE setting went away. Use LS_JAVA_OPTS and set your jvm flags directly.
      • ghanima
        torrancew: thank you sir
      • Julinux has quit
      • torrancew
        good luck
      • please report back if it works
      • (or doesn't
      • Simon_k has quit
      • jmg_ has quit
      • hugh_jass has quit
      • hugh_jass joined the channel
      • chakatz has quit
      • sarkis joined the channel
      • jmg_ joined the channel
      • sarkis
        hey all - we are getting random failures connecting to logstash: 2016-06-28T20:35:16Z ERR SSL client failed to connect with: dial tcp X.X.X.X:5044: i/o timeout
      • it's happening on all of our filebeat procs... and its completely random
      • any idea on where to start debugging something like this?
      • iamchrisf joined the channel
      • mspo
        sarkis: telnet?
      • torrancew
        not gonna help much with ssl. s_client maybe
      • sarkis
        the issue is that its intermittent
      • mspo
        io timeout sounds more like a network connect error
      • torrancew
        but often that points to some part of the pipeline taking too long
      • sarkis
        i just noticed we are using logstash-input-beats 2.0.3
      • torrancew
        filebeat waits for LS to ack each batch, unless the timeout fails. Sounds like the timeout is failing
      • Dambles joined the channel
      • niklasye has quit
      • sarkis
        i should probably upgrade the plugin too
      • torrancew
        never a bad start.
      • mspo
      • logstashbot
        Title: src/net/net.go - The Go Programming Language (at golang.org)
      • Dambles
        where is the default patterns dir for logstash if I installed from a .dep?
      • torrancew
        mspo: sure, though that's not particularly useful data
      • fenris02 has quit
      • mspo
        torrancew: neither is the error message
      • torrancew
        Not contesting that
      • iamchrisf
        Is there a way to parse tags and use them as vars? ie. path => “logpath/%{TAG1}/${TAG2}/etc.log
      • mspo
        is logstash jumping version numbers?
      • torrancew
        iamchrisf: "tags" is an array. No clever tricks available on it, what you describe is more like a "normal" field
      • mspo: clarify?
      • mspo
        from 2.x to 5.0?
      • torrancew
        ah, yeah, all ELK products are going to converge ona shared version
      • and kibana already went up to 4
      • so they all had to go to 5
      • iamchrisf
        torrancew: yea i was wondering how I can reference the individual elements in the array
      • torrancew
        you can index in, I think
      • but nothing fancier than that
      • [tags][0] maybe
      • "%{[tags][0]}"
      • iamchrisf
        torrancew: yea I think that will work.
      • Going to give it a shot. thanks
      • yardenbar has quit
      • torrancew
        good luck!
      • Gen joined the channel
      • sarkis
        ah ok u guys are right looking at hte logs...
      • {:timestamp=>"2016-06-28T20:58:18.304000+0000", :message=>"Beats input: the pipeline is blocked, temporary refusing new connection.", :reconnect_backoff_sleep=>0.5, :level=>:warn}
      • hugh_jass has quit
      • TRich1 has quit
      • hugh_jass joined the channel
      • aconite33
        Anyone know why I'm getting EOF errors and read tcp i/o timeout errors?
      • using winlogbeat?
      • jwd has quit