Kapacitor: [Feature Request] Add validate TICKscript command to kapacitor CLI program.

Created on 22 Apr 2017  路  6Comments  路  Source: influxdata/kapacitor

It would be great if there was a way to validate a tickScript source file to make sure it is syntactically correct before posting it to the kapacitor server. This way users can handle any syntax errors locally before executing the define command

Something like

Kapacitor validate_syntax cpuAlert.tick

Most helpful comment

I see. I had installed via homebrew and it doesn't look to be part of that install. I do see it as part of the rpms and tarballs however, thanks. As an additional feature request it would be good if it was part of the brew install as well

All 6 comments

The packages we provide ship with a binary called tickfmt which will validate and format a TICKscript file.

I like the idea of adding a command for it to the CLI.

@nathanielc what package is that binary part of? Is there any documentation on how to invoke it?

It is a part of any of the Kapacitor packages we provide on the downloads page, i.e the rpm, deb and even the tars. If you installed via the package it should be in your PATH, and the binary has a simple usage/help message.

$ tickfmt -h
Usage: tickfmt [options] [path...]

    If no source files are provided reads from STDIN.

Options:
  -b    create backup files with extension '.orig'.
  -w    write formatted contents to source file instead of STDOUT.

I see. I had installed via homebrew and it doesn't look to be part of that install. I do see it as part of the rpms and tarballs however, thanks. As an additional feature request it would be good if it was part of the brew install as well

@rconn01 Agreed. Thanks

@nathanielc - Is there a tickfmt binary compatible with OSX? The downloads page instructs users to download kapacitor via homebrew for OSX and as @rconn01 mentioned the tickfmt binary isn't included as part of the brew install.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haowells picture haowells  路  6Comments

juise picture juise  路  7Comments

mgresser picture mgresser  路  4Comments

OrangeTux picture OrangeTux  路  9Comments

phemmer picture phemmer  路  5Comments