Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when testing stream scripts with -fast option, test is stuck #333

Closed
rubycut opened this issue Mar 15, 2016 · 0 comments
Closed

when testing stream scripts with -fast option, test is stuck #333

rubycut opened this issue Mar 15, 2016 · 0 comments

Comments

@rubycut
Copy link

rubycut commented Mar 15, 2016

This happens only if I use stats() method in tick script. For example:

var data = stream.from()
   .database('telegram')
   .retentionPolicy('default')
   .measurement('influxdb_httpd')

var dead = data
    .stats(20s)
    .derivative('emitted').unit(1m).nonNegative()
    .window().period(90s).every(20s)
       .mapReduce(influxql.mean('emitted'))

    dead.alert()
        .message('No incoming data in influxdb_httpd')
        .crit(lambda: "mean" <= 1)
        .stateChangesOnly()
        .pagerDuty()
        .log('/tmp/deadman')

    dead.httpOut('dead')

    dead.influxDBOut()
            .database('kapacitor')
            .retentionPolicy('default')
            .measurement('influxdb_httpd_deadman')


data.derivative('pointsWrittenOK').NonNegative()
    .window().period(180s).every(60s)
       .mapReduce(influxql.mean('pointsWrittenOK'))
    .alert()
        .id('kapacitor_350')
        .crit(lambda: "mean" < 350)
        .message('kapacitor check influxdb pointsWrittenOk is below 350 is {{ .Level }}.')
        .stateChangesOnly()
        .pagerDuty()
        .log('/tmp/influxdb_points.log')

Kapacitor is nigthly kapacitor-0.11.0~n1457942747-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant