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

[WIP]Tick aggregate functions #386

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

Conversation

holayeah
Copy link
Contributor

@holayeah holayeah commented Dec 21, 2016

Done

  • Added tick script model.
  • Added tick script report template

When you add a report, the tasks are added to kapacitor,
and when you delete report the task are deleted.

TODO:

Editing reports

@holayeah holayeah requested a review from jlark December 21, 2016 15:42
Copy link
Contributor

@jlark jlark left a comment

Choose a reason for hiding this comment

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

Looks good but type might be a reserved namespace in python. I would change that to script_type

}

kap = Kapacitor()
t = get_template('seshdash/kapacitor_tasks/aggregate_report.tick')
Copy link
Contributor

Choose a reason for hiding this comment

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

This is using the Django template for the tick script. The user should also be able to give his/her own custom tick script. using the tick script model object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we do if the function is given a tick script instance use that as default we have the template for reports

"""
This function adds a report task to kapacitor
"""
data = {
Copy link
Contributor

Choose a reason for hiding this comment

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

why is data hardcoded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was for testing ,Now the function accepts a report instance and pulls the data from the report instance.

@jlark
Copy link
Contributor

jlark commented Jan 9, 2017

Is this done?

@jlark
Copy link
Contributor

jlark commented Jan 28, 2017

are we there yet?

@holayeah
Copy link
Contributor Author

Yes we are there, but there is one issue.
Editing the duration of the reports is a problem since it would require to recreate the tasks in kapacitor.

@jlark
Copy link
Contributor

jlark commented Jan 30, 2017

Are we using the TICK model objects for the kapacitor tasks or the TICK script templates still? I couldnt see that in the code.

@holayeah
Copy link
Contributor Author

We are using the templates.

@jlark
Copy link
Contributor

jlark commented Jan 30, 2017

We should use the model object as this gives much more flexibility.

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.

2 participants