-
Notifications
You must be signed in to change notification settings - Fork 490
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
Conversation
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? |
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. |
Related: influxdata/telegraf#1580 |
@@ -0,0 +1,46 @@ | |||
// {alert_name} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Resolved the confusing naming issue. |
|
||
// Dataframe | ||
var data = batch | ||
|query('''SELECT used_percent AS stat FROM "telegraf"."autogen"."disk" WHERE path = '/' ''') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!!
Do I need to rebase this now? |
@jackzampolin Yes please. |
700e1ee
to
9e9c779
Compare
Squashed and rebased! |
9e9c779
to
5c228f3
Compare
|query('''SELECT mean(usage_user) AS stat FROM "telegraf"."autogen"."cpu" WHERE cpu = 'cpu-total' ''') | ||
.period(period) | ||
.every(every) | ||
.groupBy('host') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
726173b
to
31da0d6
Compare
|from() | ||
.measurement('net_udp_rcvbuferrors') | ||
.groupBy('host') | ||
|derivative('value') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
31da0d6
to
1b4d0b2
Compare
Required for all non-trivial PRs
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.