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

Slackbot for allerting #149

Open
JrtPec opened this issue Oct 18, 2016 · 4 comments
Open

Slackbot for allerting #149

JrtPec opened this issue Oct 18, 2016 · 4 comments

Comments

@JrtPec
Copy link
Member

JrtPec commented Oct 18, 2016

No description provided.

@saroele
Copy link
Member

saroele commented Oct 18, 2016

The idea:

  • each analysis computes a KPI per sensor/per device / per site
  • this KPI is compared to a threshold value, obtained from an alert config file
  • an alert is raised when the KPI is above the threshold
  • user feedback is gathered in case of an alert:
    ==> if the alert is correct, the threshold is kept
    ==> if an alert is a false positive, the threshold is lowered
  • when no alert is raised for xxx time, a thumbs-up report is sent to give more background and ask confirmation of the settings to the user.

@saroele
Copy link
Member

saroele commented Oct 18, 2016

Most important alert: when there is no data since xxx hours/days/...

@saroele
Copy link
Member

saroele commented Oct 18, 2016

to send an image without fysically writing a file to disk, this is probably a good start:
http://stackoverflow.com/questions/28102803/python-pil-image-how-to-save-image-to-a-buffer-so-can-be-used-later

@JrtPec
Copy link
Member Author

JrtPec commented Oct 19, 2016

I would use BytesIO instead of StringIO though, something like this:

from io import BytesIO
import requests

image_buffer = BytesIO()
plt.save_image(..., file=image_buffer)  # or whatever you do to save a plot to file

files = {'file': image_buffer.getvalue()}
r = request.post(url, files=files)

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