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

Tickscripts for Telegraf #780

Merged
merged 1 commit into from
Aug 8, 2016
Merged

Tickscripts for Telegraf #780

merged 1 commit into from
Aug 8, 2016

Conversation

jackzampolin
Copy link
Contributor

Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated
  • Sign CLA (if not already signed)

This is a start on providing standardized tickscripts for each telegraf plugin. I have included a README for the standard format and will be opening a PR on /telegraf/CONTRIBUTING.md to nudge contributors into write tickscripts for their telegraf plugins.

@nathanielc
Copy link
Contributor

These look good. Do you want to add something to the top level README that explains you can find lots of examples and link to the examples/telegraf/README?

@jackzampolin
Copy link
Contributor Author

Got that added in! Tossed it at the end of the getting started section. They install telegraf there and checking out a bunch of Telegraf TICKscripts after that would be great.

@jackzampolin
Copy link
Contributor Author

Related: influxdata/telegraf#1580

@@ -0,0 +1,46 @@
// {alert_name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are templates for your examples and I like it. Do you think naming this a batch_template will later confuse this script with actual TICKscript templates?

Maybe we should call these generic examples or something? Or maybe convert them to real templates? Thoughts?

Copy link
Contributor Author

@jackzampolin jackzampolin Aug 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. generic_batch_example and generic_stream_example could be good. What about blueprint or model? I agree that calling them templates invites confusion with kapacitor templates.

@jackzampolin
Copy link
Contributor Author

Resolved the confusing naming issue.


// Dataframe
var data = batch
|query('''SELECT used_percent AS stat FROM "telegraf"."autogen"."disk" WHERE path = '/' ''')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also apply the mean function here? So that it is consistent with the stream version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching that!!

@jackzampolin
Copy link
Contributor Author

Do I need to rebase this now?

@nathanielc
Copy link
Contributor

@jackzampolin Yes please.

@jackzampolin
Copy link
Contributor Author

jackzampolin commented Aug 5, 2016

Squashed and rebased!

|query('''SELECT mean(usage_user) AS stat FROM "telegraf"."autogen"."cpu" WHERE cpu = 'cpu-total' ''')
.period(period)
.every(every)
.groupBy('host')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, but inconsistent indentation. Everywhere else it's 2 spaces, here it's 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching that!

@jackzampolin jackzampolin force-pushed the jz-tick4telegraf branch 4 times, most recently from 726173b to 31da0d6 Compare August 8, 2016 21:20
|from()
.measurement('net_udp_rcvbuferrors')
.groupBy('host')
|derivative('value')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add unit and nonNegative here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@nathanielc nathanielc merged commit 0326784 into master Aug 8, 2016
@nathanielc nathanielc deleted the jz-tick4telegraf branch August 8, 2016 22:59
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

Successfully merging this pull request may close these issues.

3 participants