I have a question related to using Grok in logstash. Does Grok not support non-capturing matching groups?
For example. With the string ' productname-1.0-el-6-x86_64.tar.gz ' and the regex ' ^(?:[^-]*\-){1}([0-9/.]*) ' it matches the '1.0'. Within the Grok debugger though, it matches ' productname-1.0 ' .
It appears that it doesn't support (or I am not correctly using) the non-capturing groups. It actually appears (or, again, I am not using correctly) matching groups at all.
Does anyone have any insight into this?
to not support matching groups at all*
avleen_ is now known as avleen
matanya_ is now known as matanya
bnzmnzhnz has quit
matanya has quit
nmische_ has quit
kindjal joined the channel
kimchy has quit
deni
faxm0dem: ok so collectd is sending stuff to logstash. i'm using kibana and i have not idea how to set this sutff up to show me for example just cpu logs of host A
faxm0dem: can you advise?
mp___
deni: in the query box: host:<hostname>
or expand out the filters, add one there
whack
RichardRaseley: why escape the '-' ?
mp___
or click on the 'host' in the table view at the bottom, filter from there
RichardRaseley
I am... not?
whack: ^^
concertman has quit
wilmoore has quit
concertman joined the channel
whack: Oh, derp. While true, still doesn't relate to the core question I posed above.
kimchy joined the channel
concertman has quit
concertman joined the channel
bnzmnzhnz joined the channel
whack
ahh, no idea; I can't test at the moment due to other work
bnzmnzhnz has quit
concertman has quit
pblittle has quit
wateronsand has left the channel
shubhang has quit
pblittle joined the channel
gudmundur has quit
deni
mp___: host:hostname gives me a parse error....just typing the hostname shows some data but not sure what
mp___
deni: host:"hostname"?
deni
mp___: that works...but i think it yields the same effect as just "hostname" (without the quotes)
rustyrazorblade has quit
mp___: what about parsing on specific things? ie cpu from collectd?
chrisgilmerproj joined the channel
mp___
deni: it's all just fields / queries
deni: there's a link to help with the query language in kibana itself
fedesilva joined the channel
tessier
Do any of you use logstash for system monitoring? I currently use nagios and nsca to report results back to nagios but I'm wondering if it might be reasonable to log the info I need with logstash and then parse it and send alerts to nagios based on that. That way I don't have to run nsca and logstash/redis.
cwebber_ has quit
santosharakere has quit
santosh__ has quit
deni
mp___: i regret not going to all those elastic search talks on all those conferences right about now.
mp___
hah.
whack
RichardRaseley: your pattern matches just fine
nelmo has quit
RichardRaseley: filter { grok { match => { "message" => "^(?:[^-]*\-){1}([0-9/.]*)" } } } matches productname-1.0-el-6-x86_64.tar.gz for me
colinsurprenant has quit
RichardRaseley
whack: Exactly - it isn't honoring the non-capturing groups. It shouldn't be capturing anything before the first '-' as indicated by ^(?:[^-]*\-){1}
^^ not really seeing what you're calling out? It matches just the '1.0' in ruby.
Grok doesn't capture anything because you didn't tell it to capture anything
rasputnik has quit
I want you to get this working, but I think I'm confused.
RichardRaseley
whack: So perhaps I am thinking about this incorrectly. Let me restate and try to ask the right question.
jlawson has quit
whack: For string ' productname-1.0-el-6-x86_64.tar.gz ' and regex ' ^(?:[^-]*\-){1}([0-9/.]*) ' the first match group consists of just ' 1.0 '. Yet if I do something like ' (?<version>^(?:[^-]*\-){1}([0-9/.]*)) ' in the grok debugger it returns ' productname-1.0 '. How can I ask grok to only capture the first match group?
My expectation for the output of ' (?<version>^(?:[^-]*\-){1}([0-9/.]*)) ' was ' 1.0 '.
whack
(?:[^-]*\-){1}(?<version>[0-9/.]*)
your pattern asks to capture everything as 'version'
not just the nuumber part
RichardRaseley
whack: Wow
Whack OK
jotterbot1234 joined the channel
whack: OK *
whack
I screw that stuff up alllll the time
deni
time to revist all those honza's talks that i missed i guess :D
*revisit
RichardRaseley
whack: That is a tremendous help. I have to embed what I want Grok to capture right in the regex, not rely on the whole regex to spit out the thing that grok will capture
whack
yup!
RichardRaseley: in the common case you probably could just do this
RichardRaseley
whack: :: clouds part ::
whack
[^-]+-%{NUMBER:version}
rather
^[^-]+-%{NUMBER:version}
juicer2 has quit
match anything not a dash up to the first dash, then capture a number called 'version'
chrisgilmerproj has left the channel
RichardRaseley
whack: Well, I have some things to think about.
=P
whack
hehe
%{...} is grok's syntax for including a known regexp pattern
anyhoo, back to working ;)
RichardRaseley
whack: Thanks!
keldwud has quit
kimchy has quit
Outlander joined the channel
chruggle has quit
kimchy joined the channel
_officeguy has quit
goqu joined the channel
freezey has quit
kindjal has quit
santosharakere joined the channel
santosha_ joined the channel
bradgignac has quit
sk_admin has quit
bentis__ has quit
wilmoore joined the channel
bentis_ joined the channel
tjr9898 has quit
kimchy has quit
csa2 is now known as ClausA
santosha_ has quit
santosharakere has quit
rastro1 has left the channel
cwebber joined the channel
kimchy joined the channel
pyr0^ has quit
dblessing has quit
kimchy has quit
kimchy joined the channel
shubhang joined the channel
spuder has quit
doug_f
Ga just tried updating ES and Kibana.
Nothing in Kibana seems to work.
cully
doug_f what version of ES?
doug_f
ES 0.90.7 -> 1.0.1
slackorama has quit
cully
someone mentioned earlier that the output section on logstash needs to be es_http instead of es
to account for the changes from 0.90 and 1.x
doug_f
Is there a recommended version of ES for the latest kibana? I am already using the ES_http
I was expecting to shut down update and startup and have my old indexes work.
kimchy has quit
kjstone00 has quit
ksclarke has quit
Kibana now just complains about indexes matching timespan.
Druide_ joined the channel
[diecast]
what's a good way to grab supervisord logs?
doug_f
no indexes I mean.
cully
I'm running 0.90.7 with logstash/kibana @ 1.3.3
as for the other questions I really don't know enough to answer
(like how to fix the no indexes, etc)
doug_f
So I ran into a bug it seemed with kibana. . . Looked at the kibana-3.0.0milestone5.zip which I thought was the one I was running and found it differed. Updated got prompted to update ES to at least 0.90.7 and figured I would go for broke.