Merge lp:~lucio.torre/graphite/add-events into lp:~graphite-dev/graphite/main
Status: | Merged |
---|---|
Approved by: | chrismd |
Approved revision: | 310 |
Merge reported by: | chrismd |
Merged at revision: | not available |
Proposed branch: | lp:~lucio.torre/graphite/add-events |
Merge into: | lp:~graphite-dev/graphite/main |
Diff against target: |
931 lines (+549/-38) 17 files modified
docs/install.rst (+2/-0) docs/who-is-using.rst (+1/-0) requirements.txt (+1/-0) setup.py (+4/-1) webapp/content/js/jquery.graphite.js (+152/-27) webapp/graphite/browser/urls.py (+1/-1) webapp/graphite/events/models.py (+49/-0) webapp/graphite/events/urls.py (+21/-0) webapp/graphite/events/views.py (+77/-0) webapp/graphite/graphlot/views.py (+4/-1) webapp/graphite/render/functions.py (+154/-2) webapp/graphite/settings.py (+2/-0) webapp/graphite/templates/browserHeader.html (+1/-0) webapp/graphite/templates/event.html (+30/-0) webapp/graphite/templates/events.html (+42/-0) webapp/graphite/templates/graphlot.html (+6/-5) webapp/graphite/urls.py (+2/-1) |
To merge this branch: | bzr merge lp:~lucio.torre/graphite/add-events |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
chrismd | Approve | ||
Sidnei da Silva (community) | Approve | ||
Review via email: mp+69142@code.launchpad.net |
Description of the change
Add events to graphite.
Events are instantaneous occurrences that we want to track and correlate with our current metrics. Sample events are rollouts, reboots, errors, etc.
Events store the following information: summary, date, tags and "extra data", where you can store whatever you might need. This can all be edited from the admin: http://
You can add events from the command line using curl:
$ curl -X POST http://
So its very easy to integrate with other tools.
You can see the list of events from: http://
Then, using the graphlot ui you can overlay events into a graph by selecting tags that would filter the events or just '*' to select all.
Events get overlayed in the graph, you get a tooltip with the summary when hovering over it and when you click on it you go to the details page.
In order to make developing/testing this easier, there are also some new functions that generate data, so you can see a plot for whatever date you want without having real data.
Looks pretty ok to me. A few comments, but none of them blockers:
[1] arrays_equal has a few issues the way it's implemented, but should work given how it's used. There's a really nice array comparison implementation here: http:// www.breakingpar .com/bkp/ home.nsf/ 0/87256B2800151 93F87256BFB0077 DFFD
[2] I'm worried about the use of 'autoescape off' here, since basically you could inject some javascript through post_event handler and have it rendered unsanitized into the template, but Lucio pointed out there's more templates already using 'autoescape off' in the tree. Probably deserves some checking all around. It doesn't seem like removing it from those newly introduced templates would break them though.