linuxwebguy: yeah, I've done exactly that in hte past with a ruby block
rastro
linuxwebguy: yes. compute the lag and drop the old ones.
neo_ joined the channel
torrancew
PsyanidE_: what exactly are you trying to test parsing?
PsyanidE_
yes
i want it for debugs
torrancew
debugs of what?
PsyanidE_
whatever I am troubleshooting
torrancew
how you configure LS depends largely on whatever data is coming in
JDiPierro has quit
differnet apps have different log formats, causing you to to write different regex patterns for thhem
there's not really a one-size-fits-al
all*
PsyanidE_
well since it will be TCP/UDP snmp stuff should work outta the box?
dm3 has quit
JahBurn1 joined the channel
torrancew
there is no such thing
there is no default config, no default listener, no default output or default filter
PsyanidE_
of course ha
torrancew
so you'll need to create a tcp/udp/whatever input to ingest your data
you /may/ need zero or more filters to massage the data into a format that is more useful
linuxwebguy
torrancew/rastro: so I could use a ruby block to calculate the lag, then evaluate, and drop. I like that approach. thanks
torrancew
and you'll need to create one or more outputs (if you plan on using kibana, you need at least an elasticsearch output)
PsyanidE_
apparently I have some work to do
torrancew
linuxwebguy: np
PsyanidE_
yes kibana
JahBurn has quit
rastro
linuxwebguy: i store the lag for everything, so I would compute it in the ruby block as a new field, then do a conditional drop{} back out in the regular LS config.
linuxwebguy
rasto: that makes sense
rastro thinks, "first time today!".
torrancew
I've done the opposite, of doing the calculations and dropping all within the ruby block
rastro
yeah, that makes no sense :)
torrancew
does if you're not using the field for anything else :)
linuxwebguy
it would be nice to see the lag
rastro
i have an ES health dashboard that shows the lag as a way of diagnosing problem.
linuxwebguy
then be able to graph, etc
torrancew
rastro: I only analyzed lag between LS and ES at the time
and even that, we did externally, by comparing ES API output and LS metrics output in graphite
rastro
torrancew: i've yet to find a good way to compute the lag between @timestamp and _timestamp. Love to have that available, too.
torrancew
yeah, that's why I did it externally
PsyanidE_ is now known as psyanide_
rastro: could do it with an es input, if you're careful to update the existing docs
read in event, use ruby filter to convert both _timestamp and @timestamp into ruby Time objects, subtract and store the diff in a new field, normalized as desired
rastro
torrancew: eek. updating documents is on my 'evil' list. Too much merging makes me nervous.
duck_tape joined the channel
torrancew
then in output{}, if [timestamp_lag_field] { elasticsearch { ### stuff to update doc goes here } } else { elasticsearch { ### Normal ES Output Here } }
yep, me too
rastro
torrancew: need a scripted field in my mapping or something.
Where can I find information about logstash-output-elasticsearch plugin and how it handles document_id. I have it setup to deduplicate if I rerun the same logs but version number isn't changing and it doesn't appear if I change field, the value updates
wopi joined the channel
MuneMunk3y
thanks rastro. anyone wanna take a look at my plugin and tell me why its choking up logstash after a few minutes of running properly
psyanide_ has quit
rastro
MuneMunk3y: probably impossible for me to spot just from glancing through your code. You might toss some logging in the filter and crank up debug in logstash.
duck_tape has quit
adaam has quit
MuneMunk3y
i am not a coder by profession just a sysadmin who likes to poke around.... basically i wrote this python code http://pastebin.com/Nk1PmubH thats called by the filter plugin and updates the log
MuneMunkey: you're at about the 10-foot level. If you bounced up to the 1,000-foot level, it might help. So, after reading more of your code, you're trying to do a lookup of an incoming event against another index?
MuneMunkey
yeah
rastro
MuneMunkey: have you seen the translate{} filter?
MuneMunkey
i admit i am noob at this and I am not a coder by anymeans