#logstash

/

      • rashidkpc
        gotcha
      • cnf
        come to antwerpen
      • we got beer :P
      • jlambert121 has left the channel
      • electrical
        rashidkpc, if ur smart you go in early, find a nice spot and stay there :p usually near a bar :p
      • Shenril joined the channel
      • rashidkpc
        i think the amstelveld is the winner
      • central, not just techno djs
      • electrical
        hehe yeah
      • pblittle joined the channel
      • jessemdavis joined the channel
      • kldavis4 joined the channel
      • kldavis4 has left the channel
      • h0cin joined the channel
      • OG_ joined the channel
      • juicer2 joined the channel
      • BlackMaria joined the channel
      • jfluhmann has quit
      • tubit joined the channel
      • tubit
        hi
      • kjstone00 has quit
      • swkide_ is now known as swkide
      • joeblow750 joined the channel
      • electrical
        im off to home. take care all
      • electrical has quit
      • kjstone00 joined the channel
      • hankinnyc joined the channel
      • hankinnyc has quit
      • hankinnyc joined the channel
      • swkide has quit
      • swkide joined the channel
      • mbaxa joined the channel
      • mbaxa has quit
      • mbaxa joined the channel
      • Garo_
        Some of my log messages have an attribute called 'level' and some doesn't. How do I use mutate(?) filter to add a default level for those messages which doesn't have it by default?
      • Spredzy has quit
      • jlambert121 joined the channel
      • stackedsax joined the channel
      • kjstone00 has quit
      • jameshyde joined the channel
      • shub-niggurath has quit
      • szhem has quit
      • Spredzy joined the channel
      • pblittle has quit
      • pblittle joined the channel
      • shub-niggurath joined the channel
      • bsr has quit
      • devOpsEv joined the channel
      • Electrical joined the channel
      • jfluhmann joined the channel
      • Electrical
        hi all
      • devOpsEv
        howdy Electrical
      • Electrical
        how you doing devOpsEv?
      • devOpsEv
        not bad, hanging in there
      • Electrical
        hehe okay :-)
      • sudoSamurai
        hey all
      • so I managed to get grok working over the weekend, and I'm pumped. I have a question though. All of the fields that it is creating are prefaced by @fields. in the search. Do I need to use mutate to drop that prefix?
      • tubit has quit
      • devOpsEv
        sudoSamurai: no, and you don't need to use the @fields in the search in Kibana
      • sudoSamurai
        oh, sweet. Check that out
      • devOpsEv
        pretty much for everything, ignore that that "@fields" bit is there
      • I believe it's going away in Logstash anyway
      • sudoSamurai
        very cool
      • I'm getting closer to something workable
      • Garo_
        I'm getting an Output thread exception {:plugin=><LogStash::Outputs::Gelf .... NoMethodError: undefined method `downcase' for nil:NilClass
      • I feel that it's because I'm trying to %{myvariable} in some of the parameters, but the message doesn't tell me which parameter nor in which message :(
      • gl0balthreats joined the channel
      • neur0x has quit
      • devOpsEv
        Garo_: paste config and log output somewhere so we can take a look
      • Spredzy
        Garo_: what are you downcasing ?
      • %{myvariable} ?
      • neur0x joined the channel
      • Electrical
        Could be that the variable you use in the gelf output can be empty? when its empty ( not existing ) it throws that kind of error
      • devOpsEv
        Spredzy: Logstash / Gelf output don't allow to directly downcase in the config, I believe that it's in the code
      • rhys_ joined the channel
      • io_syl has quit
      • Spredzy
        devOpsEv: Actually I was trying to guess where the downcase could be called from since it says nil. I - yet - never played with Gelf output
      • Garo_
      • logstashbot
        Title: gist:7c4db57ecb299094b4ff (at gist.github.com)
      • devOpsEv
        Well it's trying to downcase in the gelf output
      • Garo_
        yep
      • devOpsEv
        your second log message doesn't have a level
      • Garo_
        yes. One of the first two grok filters should match, so there should be "level" in there.
      • if the level is missing, then the level => "%{level}" rule in gelf output will trigger the exception
      • devOpsEv
        yep
      • Garo_
        but the exception doesn't say if it was "level" which was missing, or if "where" was missing etc
      • devOpsEv
        well either way you need some more specific filtering/outputting to avoid the exception
      • Electrical
        Garo_: that's because the debugging isn't that extended :-)
      • Garo_
        so it's kinda hard to debug. obiviously there's some log message which will trigger this, but I don't have yet any good ideas how to find it
      • logstashbot
        New news from newjiraissues: Dick Davies created LOGSTASH-940 - 1.1.10-dev amqp/rabbitmq output causes high CPU usage <https://logstash.jira.com/browse/LOGSTASH-940>;
      • Garo_
        I'll try to turn the stdout output on to try to catch the message which caused the exception
      • devOpsEv
        Garo_: are you using -vv?
      • Garo_
        no
      • devOpsEv
        use cmd line flag -vv when launching logstash, make sure oyu're logging to file
      • that will give you the most verbose debug output
      • Garo_
        ok. thanks. I'll try that
      • devOpsEv
        it may not give the exact debug you're looking for but it will give you the parameters being sent by gelf output
      • which could tell you which one is blank for each message
      • Spredzy
        Garo_: did you make sure you had no _grokparsefailure ?
      • Electrical
        phrawzty: ping
      • devOpsEv
        Spredzy: he has tag_on_failure = false
      • phrawzty
        Electrical: pong
      • Garo_
        devOpsEv: yeah, I've currently designed the filters so that one of the first two grok filters need to match
      • devOpsEv
        I see what's happening though
      • Spredzy
        Sorry I just verified what tag_on_failure was actually doing, my bad
      • devOpsEv
        when something matches the second grok pattern
      • level and where are both going to be blank
      • so those messages will always throw an exception on that output
      • Spredzy
        because of the add_field => ??
      • devOpsEv
        as will ip
      • yes
      • adding the field but not populating it with anything before the output
      • Garo_
        but the add_field will set level, where and ip fields?
      • devOpsEv
        it will add the fields but not put values in them
      • bfulton has quit
      • Garo_
        I'm pretty sure it will set level => "debug", where => "N/A" and ip => "N/A"
      • at least that's what I'm getting into graylog2
      • devOpsEv
        oh duh
      • yeah sorry, forgot that was a hash
      • Garo_
        no problem =)
      • devOpsEv
        use ' instead of " around N/A
      • literals and all that
      • gbrown has quit
      • guess it shouldn't really matter
      • Spredzy
        Im lost on one thing, was your statement correct devOpsEv ? On the fact that it will create level with blank value ? Was that the error ?
      • devOpsEv
        no
      • no, add_field is a hash so with one thing like add_field => ["some_field", "some_value"] some_value will be the value of some_field
      • I just wasn't thinking
      • szhem joined the channel
      • Spredzy
        ok
      • sudoSamurai
        hey all, in the "pattern =>" area, is there a way to make one or more of the fields optional?
      • devOpsEv
        Garo_: debugging would be easier if you output to something like ES and could use Kibana to verify your fields are populating correctly
      • sudoSamurai, "pattern => " for what, grok?
      • sudoSamurai
        yeah, sorry
      • in grok
      • devOpsEv
        no, it's regex so you can do whatever field validation you want
      • but you can't make a field optional
      • sudoSamurai
        I'm looking at some logs, and if there is an "ok" status, it ends there, but if it fails, it is followed by the error message. Right now the only messages that are being split into fields are the error lines because the OK lines are missing a field
      • devOpsEv
        you can use | as an OR statement
      • Garo_
        devOpsEv: thanks for the idea. I might try that out
      • devOpsEv
        . will match a space
      • shub-niggurath has quit
      • zdunn joined the channel
      • Garo_
        I just first tried out graylog2 as many suggested it as a better alternative than the logstash own frontend
      • devOpsEv
        so you could do (.+ | someotherpattern)
      • Garo_: yeah, but the logstash web interface sucks. Kibana and ES are not Logstash
      • sudoSamurai
        this is in the grok pattern statement?
      • devOpsEv
        sudoSamurai: .+ will match blank spaces
      • sudoSamurai: and the | says either
      • Electrical
        Garo_ you did checkout kibana? :-)