influxdata / influxdata/kapacitor

`-dbrp` argument behavior

Open
#2,768 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

Hi! I have a question about `-dbrp` argument in `kapacitor define ...` command. When I pass dbrp through this argument, my queries don't works because of the following error
> Error: enabling task X: batch query is not allowed to request data from "".""

It seems like no dbrp arg was applied.
The same behavior using

```bash
kapacitor define-template "${task_template}" -tick "${tick_file}"
kapacitor define "${task_name}" \
-template "${task_template}" \
-type ${task_type} \
-dbrp "${INFLUXDB}"."${RETENTION_POLICY}" \
-vars "${VARS_PATH}"
```

Documentation [says](https://docs.influxdata.com/kapacitor/v1.6/introduction/getting-started/#trigger-alerts-from-stream-data)
> If the database and retention policy aren’t included in the TICKscript (for example, dbrp "telegraf"."autogen"), use the kapacitor define command with the -dbrp flag followed by ""."" to specify them when adding the task.

If I specify it inside query inside `.tick` script it works as expected. This is expected behavior? Why do we need `-dbrp` argument if currently I have to define dbrp in the tick script?

I'm using `kapacitor:1.6.6-alpine` docker image.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported commands with Kapacitor 1.6.6, comparing `kapacitor define -dbrp` against a TICKscript that declares its own database and retention policy. Check the `kapacitor define` entry point and related task-definition handling; done when the documented `-dbrp` behavior works or its limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.