19:05 PM
torrancew
use date{}, set target to the field name you want to create
19:05 PM
aaaaaawwww: so, you'll do this in 3 phases:
19:06 PM
1) grok out the two timestamps into two separate fields
19:06 PM
2) date{} for start time, set target accordingly
19:06 PM
3) date{} for end time, set target accordingly
19:09 PM
aaaaaawwww
torrancew: thank you ... now how I can add %{DATE}:%{HAPROXYTIME} to a single field ?
19:10 PM
pcmerc_w_ joined the channel
19:10 PM
torrancew
aaaaaawwww: you can use a "native" regex concept called a named capture
19:10 PM
(?<field_name_goes_here>%{DATE}:%{HAPROXYTIME})
19:11 PM
basically, (?<field_name>PATTERN)
19:12 PM
aaaaaawwww
Thank you ... torrancew
19:13 PM
pcmerc_work has quit
19:15 PM
TandyUK
ok whats wrong with this?
19:15 PM
tag_on_failure => "_grokparsefailure_yealink"
19:15 PM
and thm im trying to write all matching logs to a file using
19:15 PM
olivier joined the channel
19:15 PM
19:15 PM
logstashbot
19:15 PM
TomasNunez joined the channel
19:16 PM
idwer joined the channel
19:16 PM
torrancew
looks fine offhand, TandyUK
19:18 PM
smarthall joined the channel
19:18 PM
TandyUK
ah i see, im getting it filtered by syslog by mistake
19:19 PM
ah ffs i know why
19:19 PM
TandyUK throws somethign at yealink phone
19:19 PM
oh why yealink do you force me to use port 514 for syslog
19:20 PM
thats why i added my 'clienttags' filter
19:22 PM
lokulin joined the channel
19:24 PM
torrancew
:)
19:24 PM
plaurina joined the channel
19:24 PM
TandyUK
how can i output the raw event using file { }
19:25 PM
torrancew
codecs, generally
19:25 PM
TandyUK
yeah, plain?
19:25 PM
torrancew
codec => json will probably be the most sane
19:25 PM
well
19:25 PM
plain will dump the timestamp + "message" field IIRC
19:25 PM
but you can override that
19:25 PM
however, "json" will just serialize the event to json and dump that
19:26 PM
TandyUK
yeah, im going for readable :P
19:26 PM
data > input > fails to parse > output > raw log, as recieved, to file
19:26 PM
torrancew
TandyUK: then you'll have to muck with plain and its settings
19:26 PM
TandyUK
ok
19:26 PM
torrancew
hmmm
19:26 PM
yeah
19:27 PM
so let's back up a sec
19:27 PM
willa has quit
19:27 PM
the ability to do that exists
19:27 PM
but depends /heavily/ on how you mutate your events
19:27 PM
TandyUK
apparantly plain is default for file
19:27 PM
torrancew
yeah
19:28 PM
by default, will use plain
19:28 PM
and will dump timestamp + message field
19:28 PM
if that's enough, you can call it a day
19:28 PM
but if you need to tune it, then the plain codec has some settings to help there
19:28 PM
but requires knowledge of the fields you've already parsed
19:29 PM
TandyUK
its ouputting json regardless lol
19:29 PM
torrancew
hmmmm
19:29 PM
hulta has quit
19:29 PM
doc bug, maybe
19:29 PM
manually set codec => plain ?
19:29 PM
TandyUK
perhaps, done thats lol
19:29 PM
how to output just "message" fro mthe json?
19:29 PM
torrancew
TandyUK: do you mean that you ahve "codec => plain" and you are still seeing json?
19:29 PM
TandyUK
yes
19:29 PM
torrancew
k, one sec
19:30 PM
(don't futz with that codec much myself)
19:30 PM
19:30 PM
logstashbot
19:30 PM
torrancew
oops, typo there at the end
19:30 PM
anyway
19:30 PM
try this: file { codec => plain { format => "%{@timestamp} %{message}" } }
19:31 PM
forgot the path => but you get it
19:31 PM
sorry, head is killing me today
19:32 PM
TandyUK
yeah np :P
19:33 PM
19:33 PM
logstashbot
19:33 PM
t4nk721 joined the channel
19:33 PM
torrancew
looks good
19:33 PM
working?
19:34 PM
TandyUK
actual log line pmed
19:34 PM
no lol
19:34 PM
torrancew
10-4
19:34 PM
TandyUK: what logstash version?
19:36 PM
TandyUK
just upgraded to the latest 1.5
19:37 PM
1.5.4-1 from the repo
19:37 PM
torrancew
cannot reproduce :/
19:38 PM
TandyUK
cd /etc/logstash << might not work so well in here :P
19:38 PM
torrancew
haha
19:38 PM
19:38 PM
logstashbot
19:38 PM
TandyUK
one of the few downsides of multi screens
19:38 PM
torrancew
that's me attempting a clean reproduction of this
19:38 PM
TandyUK
cursor should type in the window im looking at dammit :P
19:38 PM
torrancew
(output buffering fail, btw)
19:38 PM
haha
19:40 PM
TandyUK
i'm like the 'mind controlled computer' interface designers worst nightmare
19:40 PM
like now for example, id want to be able to run commands in one of the 4 ssh windows on screen 2, while still looking at irc :P
19:41 PM
torrancew
tiling window managers ftw
19:41 PM
:)
19:42 PM
yourname has quit
19:42 PM
t4nk721
Has anyone gotten the kafka input plugin attribute decode_class to work? When I use it, I get a class not found exception at run time, no matter where I put the class or the jar that contains is. Using logstash 1.5.4.
19:43 PM
torrancew
t4nk721: i've not tried, but let me peek at the code and see if i can help
19:44 PM
yourname joined the channel
19:45 PM
jerryitt has quit
19:45 PM
knite has quit
19:45 PM
t4nk721: have you mucked with the java env vars to add the jar to the classpath
19:46 PM
t4nk721
yes, every way I try to modify it seems to be ignored.
19:46 PM
including on the command line of logstash
19:47 PM
torrancew
interesting
19:47 PM
TandyUK
19:47 PM
logstashbot
19:47 PM
qqp has quit
19:47 PM
bipul has quit
19:47 PM
knite joined the channel
19:48 PM
torrancew
agreed, it should
19:49 PM
TandyUK
and rubydebug and json should be completely different right?
19:50 PM
pcmerc has quit
19:50 PM
torrancew
yeah, rubydebug is kinda like json, but multiline, and it's technically a ruby serialization, not a json one
19:50 PM
techminer joined the channel
19:51 PM
techminer has quit
19:51 PM
TandyUK
ok, well diff thinks yealink-debug.log and yealink-raw.log are identical
19:51 PM
torrancew
o.O
19:51 PM
seems not right
19:51 PM
TandyUK
indeed
19:51 PM
torrancew
i don't use the file input much, and when I do its to generate json
19:51 PM
got a meeting shortly, but will try to repro
19:51 PM
s/input/output/
19:51 PM
TandyUK
:)
19:52 PM
i can dump real logs to an ip if you want
19:53 PM
i _should_ just be able to give you yealink-raw.log lol
19:54 PM
torrancew
I'll let you know if it comes to that
19:54 PM
I try to avoid it coming to that, though
19:54 PM
I've gotten pretty good at debugging things via sample data, source code and configs
19:56 PM
TandyUK
feel free to clone that repo
19:56 PM
torrancew
I may just
19:56 PM
but for now, gotta go turn up traffic to a new dc!
19:56 PM
(dayjob stuff; ls is just a hobby of sorts for me)
19:56 PM
TandyUK
all im doing from ansible is copying /roles/aggregator/templates/logstash/* to /etc/logstash/conf.d
19:57 PM
torrancew
ok cool
19:57 PM
TandyUK
nice one, thanks for your help
19:57 PM
arinov has quit
19:58 PM
TomasNunez has quit
20:01 PM
gkoch_ joined the channel
20:02 PM
TomasNunez joined the channel
20:10 PM
JDiPierro has quit
20:12 PM
techminer joined the channel
20:12 PM
techminer has quit
20:13 PM
techminer joined the channel
20:15 PM
techminer has quit
20:15 PM
aaaaaawwww
HI guys ... a stupid question .... should I use %{SPACE} for spaces in the logs or just I put a space ?