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

HttpOut should emit same node it received #366

Closed
rubycut opened this issue Mar 22, 2016 · 1 comment
Closed

HttpOut should emit same node it received #366

rubycut opened this issue Mar 22, 2016 · 1 comment

Comments

@rubycut
Copy link

rubycut commented Mar 22, 2016

For debugging purposes, I should be able to insert httpOut node wherever I want, like so:

var data = stream.from().database('telegram').retentionPolicy('biweekly')
  .measurement('cassandra')
  .where(lambda: "table" == 'metrics3')

data.derivative('local_write_count').NonNegative()
    .window().period(300s).every(60s)
       .mapReduce(influxql.mean('local_write_count'))
.httpOut('local_write_count')
.alert()
        .crit(lambda: "mean" < 3500)
        .message('Cassandra local writes for metics3 table is below 3500 per second.')
        .stateChangesOnly().pagerDuty()

But currently, this is not working:
invalid task: No method or property "alert" on *pipeline.HTTPOutNode

So, now just to debug, I have to rewrite it like this:

var data = stream.from().database('telegram').retentionPolicy('biweekly')
  .measurement('cassandra')
  .where(lambda: "table" == 'metrics3')

var s1 = data.derivative('local_write_count').NonNegative()
    .window().period(300s).every(60s)
       .mapReduce(influxql.mean('local_write_count'))
s1.httpOut('local_write_count')
s1.alert()
        .crit(lambda: "mean" < 3500)
        .message('Cassandra local writes for metics3 table is below 3500 per second.')
        .stateChangesOnly().pagerDuty()

And now it looks ugly.

@nathanielc
Copy link
Contributor

@rubycut This is a simple fix. Also note that a LogNode was just added that does work the way you want and it logs all data it receives to the Kapacitor log. You can try it in last nights build.

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

2 participants