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

Kapacitor 0.13.0: Simple task creation example in documentation isn't correct #545

Closed
mglazer opened this issue May 13, 2016 · 1 comment

Comments

@mglazer
Copy link

mglazer commented May 13, 2016

Page: https://github.com/influxdata/kapacitor/blob/master/client/API.md#tasks

Documentation example says you can do:

POST /kapacitor/v1/tasks/
{
    "id" : "TASK_ID",
    "type" : "stream",
    "dbrps": [{"db": "DATABASE_NAME", "rp" : "RP_NAME"}],
    "script": "stream\n    |from()\n        .measurement('cpu')\n"
}

However, doing so results in an error. You can make this work if you do:

POST /kapacitor/v1/tasks/
{
    "id" : "TASK_ID",
    "type" : "stream",
    "dbrps": [{"db": "DATABASE_NAME", "rp" : "RP_NAME"}],
    "script": "stream\n    |from()\n        .measurement('cpu')\n",
    "status": "enabled"
}
@nathanielc
Copy link
Contributor

@mglazer Thanks for filing these issues. I'll make sure we get a fix out today on these. Sorry for the hassle.

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