22:40 PM
cek
that is, from different hosts, if you write in one file without proper locking
22:40 PM
RobertDupont
look up multiline logstash
22:40 PM
BaM`
log-courier does multiline
22:40 PM
RobertDupont
cek, you should separate files for each host
22:41 PM
willejs has quit
22:41 PM
cek
that will create a mess
22:41 PM
RobertDupont
if it's mess, even by reading the logs you cannot make sense of it if you have multiline
22:41 PM
BaM`
yeah your logs have to at least be understandable
22:41 PM
cek
can anything accept HTTP PUT and feed logstash?
22:42 PM
ILikeToNguyen has quit
22:42 PM
BaM`
we had some guys wanting us to process stuff that had lines truncated by other lines
22:42 PM
it was messy
22:43 PM
cek: why will individual files be messy?
22:43 PM
cek
million of hosts, for ex
22:43 PM
BaM`
millions?
22:43 PM
JDiPierro has quit
22:43 PM
cek
yeah, why not
22:43 PM
rhoml joined the channel
22:44 PM
ycombinator has quit
22:44 PM
BaM`
how many do you actually have?
22:44 PM
millions of hosts writing multiline to a single file is gonna be a headache too
22:44 PM
ycombinator joined the channel
22:45 PM
rhoml has quit
22:45 PM
cek
i don't want it to write to that 1 file, i want data to be fed to logstash
22:45 PM
>Codec support is available which allows multiline processing at the sender side
22:45 PM
log-courier sounds promissing
22:45 PM
BaM`
22:45 PM
logstashbot
22:45 PM
thehybridtech has quit
22:46 PM
BaM`
it's not gonna sort out interleaved multiline for you though
22:46 PM
redbeard has quit
22:46 PM
cek
have you seen modsec audit log ?
22:46 PM
BaM`
nope
22:46 PM
but I can tell you the multiline bit in LC will just match a pattern to decide if the line continues
22:47 PM
so if there's anything else in between it's not going to work very well
22:48 PM
rwhavens has quit
22:49 PM
depending on the number of hosts you have (i.e., < 1 million) if you write to separate files and give LC a wildcard path it will pick them all up
22:49 PM
cek
22:49 PM
BaM`
ovbiously it will have to be much less than 1 million
22:49 PM
logstashbot
22:50 PM
BaM`
so there's a line feed between entries?
22:50 PM
or they all start with "--"
22:50 PM
rastro has 5% of 1% of a million.
22:51 PM
cek
yep. and "entries" themselves aren't predefined, they can contain multiple events
22:51 PM
logcourier can be used to ship each server's log to logstash
22:52 PM
i just wanted to use mlogc to http PUT to logstash server via some app possibly
22:52 PM
BaM`
I think the kv filter can help there if you get them all on one line
22:52 PM
cek
i won't get them in one line, that's impossible
22:52 PM
ad1ous joined the channel
22:52 PM
"[`;\\|&\\r\\n].*?(\\.exe)?(\\s+[-/])?.+[&<>\\|]*?" you won't get this in one sane line
22:52 PM
that should all be structured/wrapped in json or something
22:53 PM
Now I'm thinking, is there any app that would accept HTTP PUT request with data and ship that to logstash?
22:53 PM
millions of PUTs (thus, no memleaks please)
22:54 PM
RobertDupont
it's gonna be a pain to parse that thing
22:54 PM
wt0f has quit
22:54 PM
you might want to write some intermediate parser that converts this thing to json
22:55 PM
Guest6113 has left the channel
22:55 PM
and outputs a json file
22:55 PM
cek
there's one already
22:55 PM
well, not json, its a logstash thing
22:55 PM
RobertDupont
which one?
22:56 PM
cek
22:56 PM
logstashbot
22:57 PM
spooker_ joined the channel
22:58 PM
wt0f joined the channel
22:59 PM
BaM`
cek: can't you just send multiline based on lines that don't start with "--" and parse it with that then?
22:59 PM
zebrarage joined the channel
22:59 PM
i.e., if a line doesn't start with "--" then it's part of the previous line
22:59 PM
...based on your paste
22:59 PM
nemothekid joined the channel
22:59 PM
cek
that paste is only 1 event
23:00 PM
BaM`
oic
23:00 PM
BaM` notices the event numbers
23:00 PM
I suppose there's a regex that can match those based on the first capture
23:00 PM
but I suck at writing regexes
23:01 PM
maybe someone else here can confirm that
23:02 PM
cek
that you suck at regexes? ;)
23:02 PM
rastro
BaM`: confirm that you suck at regexps? :_
23:02 PM
BaM`
why not both?
23:02 PM
rastro
lol
23:04 PM
machty joined the channel
23:05 PM
rhoml joined the channel
23:06 PM
machty
do people use ELK stack w Heroku and similar stacks? or is it more common if you're using a more custom infrastructure? i'm new to this stuff and can't seem to get a straight answer
23:06 PM
ycombinator has quit
23:06 PM
ycombinator joined the channel
23:06 PM
zebrarage has quit
23:09 PM
kepper joined the channel
23:11 PM
rojem has quit
23:12 PM
RobertDupont
23:12 PM
logstashbot
23:12 PM
RobertDupont
make sure to add an 'if [type] == "mod_security" in the whole filter if you are parsing more than just mod_sec
23:12 PM
daidoji joined the channel
23:13 PM
kireevco has quit
23:13 PM
kireevco joined the channel
23:15 PM
daidoji
hey, can someone help me with a big picture view of elkstack?
23:16 PM
tell me if I'm doing this right?
23:16 PM
supersheep joined the channel
23:16 PM
rastro
daidoji: try us!
23:16 PM
daidoji
23:16 PM
logstashbot
Title: bigfootproject/python-logstash ยท GitHub (at
github.com )
23:16 PM
daidoji
logstash then stores that to /var/logs?
23:16 PM
then elasticsearch picks that up somehow...
23:17 PM
and then I can view it with Kibanna?
23:17 PM
jstoiko joined the channel
23:17 PM
BaM`
logstash should be listening with the lumberjack input
23:17 PM
daidoji
I guess what I'm having trouble with is configuring it correctly because I apparently need indexes?
23:17 PM
rastro
daidoji: nope. logstash doesn't write files (usually), it just filters the messages it receives and forwards them to ES.
23:17 PM
daidoji
rastro: oh okay
23:17 PM
rastro
daidoji: LS will create any indexes that don't exist.
23:18 PM
daidoji
rastro: roger. How do I hook up elasticsearch to kibanna then?
23:18 PM
rastro
daidoji: other way around - you hook kibana (the UI) to ES (the data store).
23:18 PM
23:19 PM
daidoji: ES accepts requests via an interface, and kibana talks to that interface to pull data to draw.
23:19 PM
cek has left the channel
23:19 PM
hemphill has quit
23:19 PM
daidoji
ahhh thanks for the link. Don't know why that doesn't pop up in my top list of google results
23:20 PM
rastro: but okay
23:20 PM
rastro: so if my kibanna is complaining that no indexes are set, I should be looking in kibanna config?
23:20 PM
rastro
daidoji: no time for SEO :)
23:21 PM
daidoji
rastro: ahhh
23:21 PM
rastro
daidoji: you do need to tell kibana which indexes (or, usually, index patterns) you want to use. But it should walk you through that if it finds indexes.
23:21 PM
daidoji: i would guess that your data isn't flowing LSF->LS->ES
23:22 PM
daidoji
rastro: ahhh okay
23:22 PM
rastro
23:22 PM
daidoji
rastro: ahhh, thanks a lot
23:22 PM
rastro
daidoji: yw
23:22 PM
daidoji
well I'll keep plugging away, I appreciate all your help
23:23 PM
jbehrends has quit
23:23 PM
radiocats joined the channel
23:23 PM
rastro
daidoji: go slowly and ask lots of questions!
23:24 PM
radiocats joined the channel
23:30 PM
dhanasekaran1 joined the channel
23:30 PM
RobertDupont
rastro: is it your blog?
23:31 PM
rastro
RobertDupont: svops? yeah.
23:31 PM
RobertDupont: comments welcome!
23:31 PM
RobertDupont
I came across it several times before, very helpful
23:31 PM
rastro
RobertDupont: ah, so it *does* show up in google :)
23:31 PM
RobertDupont: glad it helped.
23:31 PM
RobertDupont
;)
23:32 PM
I got to go
23:32 PM
bye
23:32 PM
dhanasekaran has quit
23:34 PM
soccerhaotian has quit
23:35 PM
jbehrends joined the channel
23:36 PM
RobertDupont has quit
23:36 PM
ycombinator has quit
23:37 PM
iamchrisf joined the channel
23:39 PM
iamchrisf joined the channel
23:42 PM
kepper has quit
23:42 PM
filenox joined the channel