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

Test configuration parse failed #17

Open
jcmartins opened this issue Dec 6, 2017 · 1 comment
Open

Test configuration parse failed #17

jcmartins opened this issue Dec 6, 2017 · 1 comment

Comments

@jcmartins
Copy link

jcmartins commented Dec 6, 2017

kapacitor-unit -dir ./tickscript/ -influxdb http://localhost:8086 -kapacitor http://localhost:9092 --tests tests_conf.yaml -logtostderr

cat tickscript/cpu_alert.tick
stream
|from()
.database('telegraf')
.retationPolicy('autogen')
.measurement('cpu')
.where(lambda: "host" == 'ni-77000-0')
|alert()
.warn(lambda: int("usage_idle") < 70)
.log('/tmp/alerts.log')

cat tests_conf.yaml
tests:
name: Alert
cpu: warning
description: Task should trigger Warning when usage_idle < 70
task_script: cpu_alert.tick
db: telegraf
rp: autogen
data:
- cpu,host=ni-77000-0 usage_idle < 70
expects: warning

@gpestana
Copy link
Owner

gpestana commented Mar 4, 2018

Hey @jcmartins thanks for opening the issue. Could you explain better what is the problem?

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