#logstash

/

      • jmreicha
        Is there a verbose flag when running logstash-forwarder by hand?
      • torrancew
        cully: exactly!
      • pemontto1 has left the channel
      • jerius has quit
      • pieterl
        hi... i'm having a really hard time trying to figure out how @timestamp gets set.
      • i'm using a syslog input and i'm relaying from my central rsyslog server with the RSYSLOG_ForwardFormat macro
      • torrancew
        pieterl: by deafult, ls assigns the time it received the event to @timestamp
      • but you can use the date filter to adjust it
      • pieterl
        ah, right.. but then it sets the wrong time :)
      • torrancew
        do NOT adjust it by hand, as it's not a string, it's a ruby Time object (or Date, or something like that)
      • how so?
      • revolt has quit
      • pieterl
        i'm UTC+2 (Europe/Amsterdam) and it's showing Z at the end
      • torrancew
        yes, LS *STORES* all times in UTC
      • but at the UI layer, you can *DISPLAY* however you'd like
      • it's done for normalization
      • pieterl
        yeah i get that :) but it's logging events from now "in the UTC future" as it were
      • torrancew
        what exactly is the cause of trouble in your case?
      • pieterl
        2014-07-30T23:00:37+02:00 is in my central rsyslog "to file" storage, so rsyslog is receiving the correct time
      • FortySix2 has quit
      • torrancew
        mhm
      • pieterl
        but when i look at logstash (rubydebug) 2014-07-30T23:00:37Z would get logged in @timestamp
      • for the same event/entry
      • torrancew
        ah, I see, so it's not actually converting to the RIGHT UTC time?
      • pieterl
        there's only one UTC time as i understand it :p
      • kepper joined the channel
      • and for me, logstash is 2 hours off hehe
      • torrancew
        what I mean is, that the timestamp it's generating, is not the actual UTC time of your event...
      • pieterl
        yes
      • torrancew
        so that's fixable
      • can you share your config?
      • at least the relevant sectiosn here
      • pieterl
        yeah lemme copy paste some gists
      • hold on.. and thanks :)
      • torrancew
        specifically, where you capture the rsyslog time (probably in grok), and the date filter that uses it
      • np
      • sorry for the miscommunication
      • doign like a billion things at once :)
      • pieterl
        arent we all :)
      • blalor is now known as blalor_afk
      • what'd you need except for the logstash.conf and rsyslog.conf?
      • kepper has quit
      • gster joined the channel
      • gster has quit
      • gster_ joined the channel
      • logstashbot
      • pieterl
        and, if i needed to grok that data first, that's fine.. :) i just figured i'd try a very simple setup first
      • there's some logs that cannot be parsed (grokerror tag) and they do receive the correct timestamp
      • torrancew
        pieterl: do you not have a filter section?
      • FortySix2 joined the channel
      • FortySix2 has quit
      • FortySix2 joined the channel
      • pieterl
        no
      • this is it for logstash itself
      • hugespoon has quit
      • darthbator has left the channel
      • torrancew
        pieterl: I'm not following
      • kepper joined the channel
      • MartinCleaver has quit
      • pieterl
        there is nothing else configured regarding logstash
      • willejs joined the channel
      • torrancew
        ah, I see
      • willejs_ joined the channel
      • pieterl: you've discovered one of the many short-comings of my least favorite input - syslog
      • pieterl
        ohw :(
      • torrancew
        pieterl: let me give you my own, unprofessional, biased opinion on the syslog input
      • it's a meta-filter
      • syslog is sugar, around tcp/udp inputs, combined with implicit grok and date filters
      • and it's the source of all pain in the universe, I suspect ;)
      • mostly because no 2 vendors agree on what "sending syslog protocol" actually means
      • Sketch
        i think the only thing everyone agrees on is "ascii on port 514"
      • torrancew
        Sketch: yup
      • pieterl
        true.. but rsyslog is quite versatile and.. would seem to be accommodating logstash here
      • bradgignac joined the channel
      • torrancew
        pieterl: the problem isn't rsyslog. its' that no matter what logstash does, it won't match every syslog ever. It's probably a "bug" in the syslog input, but fixing that bug probably breaks some *other* syslog shipper
      • kepper has quit
      • I would highly recommend to anyone using the syslog input, that you consider rolling your own - tcp/udp, syslog_pri, grok and date should be all you really need
      • pieterl
        damn. :)
      • torrancew
        and in that way, you're free to adjust and work around the input's shortcomings
      • pieterl
        syslog_pri?
      • torrancew
        at one point, syslog was even deprecated as an input
      • it's afilter
      • that takes the <xx> priority, and parses it into actual fields
      • willejs has quit
      • willejs_ is now known as willejs
      • pieterl
        ah
      • torrancew
        it's what creates facility/facility-label, and the severity analogs
      • I bet GSwithELK has an example for that
      • pieterl
        so.. any way i can monkey patch around this? rewrite @timestamp?
      • MartinCleaver joined the channel
      • torrancew
        pieterl: short of my suggestion, not really
      • the syslog input is throwing away your tz info
      • though...
      • pieterl: is the timezone on that server also +02:00?
      • shubhang joined the channel
      • brad4094 has quit
      • pieterl
        yeah every server is +02:00
      • Europe/Amsterdam in /etc/localtime
      • torrancew
        ok, then in that case, yes, you can
      • add a filter section, with a date filter
      • use "timestamp" (not @timestamp) as the match
      • kepper joined the channel
      • what that'll do, is go back to what syslog captured for you. you'll need to specify the right pattern for the filter, but if there's no tz, date will assume to use the server's local time
      • beata
        what if any the perfered choice udp or TCP as an input?
      • torrancew
        beata: it's somewhat philosophical/depends on your needs
      • I use TCP-based inputs
      • stonevil has quit
      • evvel2_ is now known as evvel2
      • stonevil joined the channel
      • beata
        performance is a main factor im looking at a high ingest rate.
      • torrancew
        no real difference AFAIK
      • stonevil_ joined the channel
      • tcp overhead is pretty minimal on a modern box
      • kepper has quit
      • beata
        got ya
      • stonevil has quit
      • clarkfischer
        Anybody have any experience with logstash-forwarder?
      • I'm getting: Failed to tls handshake with 172.17.0.12:5043 tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config
      • I can hit that endpoint with curl -k
      • kepper joined the channel
      • torrancew
        clarkfischer: it's the -k bit that's the problem :)_
      • cert needs to be valid for the name/ip you're calling it by
      • it was more permissive in the past, but a golang change upstream forced our hand
      • awheeler has quit
      • well, "our"
      • willejs has quit
      • clarkfischer
        so I can't use a self-signed cert?
      • I followed the guide in the readme
      • torrancew
        clarkfischer: what do you know of SSL/PKI?
      • awheeler joined the channel
      • bradgignac has quit
      • (yes, you can use a self-signed cert, it just needs to be built correctly)
      • clarkfischer
        I know there's a certificate chain, and that if it's self-signed, that chain doesn't go anywhere useful
      • torrancew
        do you know the term "CN" (or Common Name)? (in the PKI context)
      • clarkfischer
        Can't say I do
      • torrancew
        kk, one sec
      • kewball joined the channel
      • jmreicha_ joined the channel
      • kepper has quit
      • clarkfischer
        the .crt doesn't have a CN section
      • kewball
        Beginner Q: is there a monolithic jar anymore? I found 1.1.9 but it doesn't run well.
      • awheeler has quit
      • Killsudo_ has quit
      • kepper joined the channel
      • clarkfischer
        kewball: I don't believe so... Everything is now executed via "bin/logstash," and there's no more agent, etc
      • torrancew
        clarkfischer: so here's the deal
      • kewball
        OK. THanks.
      • torrancew
        clarkfischer: you try to connect to foo.com via TLS/SSL, on some port
      • it presents you with a certificate, which you attempt to "validate"