influxdata / influxdata/kapacitor

ERROR: cannot perform derivative

Open
#2,168 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Trying to setup detection w/ haproxy, here is the default influxdb query that ships w/ the default haproxy adapter:

SELECT non_negative_derivative(last("http_response.2xx"), 1s) AS "2xx" FROM "telegraf"."twoweeks"."haproxy" WHERE time > :dashboardTime: AND "host" = :host: GROUP BY time(:interval:)

I'm trying to convert that to a TICKs script:

var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement('haproxy')
.groupBy(groupBy)
|window()
.period(period)
.every(every)
.align()
|log()
|derivative('http_response.2xx')
.nonNegative()
.as('value')

I'm getting an error in the log: ERROR: cannot perform derivative

The log() is showing the data, it's all there. Just not sure what is causing this error.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the InfluxDB derivative query with the TICKscript pipeline, especially the window and derivative stages, and use the log() output to narrow down the failure. Check how the derivative stage handles the haproxy measurement and the http_response.2xx field. Done means the cause of the error is identified and derivative processing succeeds for this data.

Written by the indexing model from the issue text.

Assessment

Domain
observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.