Kapacitor: Cannot use lookahead in regex

Created on 13 Dec 2016  路  1Comment  路  Source: influxdata/kapacitor

While trying to use lookahead in a regex in my TICKScript i get an error:
"Error parsing regexp: invalid or unsupported Perl syntax: '(?!'.
I'm using Kapcitor 1.0.0
TICKScript:

stream
    |from()
        .measurment('SendSucessCounter$')
    |Where(lamba: "server_name" = 'MyServer' AND "path" =~ /^\.(?:(?!Hey|Hello)[^\.]+)\.Output\.SendSucessCounter)
    |alert()
        .id(MyServer_SendSuccessCounter)
        .info(lamba: ("value" = 0) OR ("value" > 0))
        .crit(lamba: ("value" = 0))
        .post('http://TestUrl:8080/Kapacitor')

Is there any other way i could do a negative lookahead kind of thing, or maybe is there a way to enable it?

>All comments

Lookahead assertions are not supported by Kapacitor, since they are not supported by Go's regexp library. You can find all supported syntax here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidhiendl picture davidhiendl  路  6Comments

evan-ty picture evan-ty  路  5Comments

seb-koch picture seb-koch  路  5Comments

ASKozienko picture ASKozienko  路  7Comments

R4scal picture R4scal  路  4Comments