Analytics Dashboard#72
Conversation
…er" and header parser
…er" and header parser
- Hasher decorator - MySQL decorator also fixes a bug with header parsing Todo: redis decorator, cleanup / remove legacy code, finalise interfaces
- Compressor decorator - Header decorator - Redis decorator Other: Moved events to its own package so that they can be used by backend without getting into circular dep. Guerrilla embeds events directly instead of wrapping the function Todo: , cleanup / remove legacy code, finalise interfaces, change processor initialize to use events. Use a channel for backend errors.
…er and shutdowner
- processor lines can configured via config and built during initialization - backend gateway manages creating of processor lines and starting / stopping workers that use these lines - TODO: lots of cleanup, change to allow multiple rcpt to, more comments, test backend shutdown/restart on config reload
- add comments at the start of all processors
- Remove initializers / shutdowners once backend is shutdown - redis processor: propagate close error - mysql processor: propaget close error - add more comments
- Added in type support to Backend's extractConfig func - saveStatus contains queued instead of hash, better semantically - BackendGateway default config if processor_line not present, or save_workers_size not present - added queued id to envelope, a temporary default id is generated too
…reation - Made some symbols public, ie. Service.ExtractConfig, BaseConfig - Envelope: added a NewRreader() function that returns a reader for the processed email - Moved resetting the envelope from client.go to envelope itself. - Added a Reseed() function that seeds the envelope with data at the start of a connection
# Conflicts: # .gitignore # .travis.yml # README.md # api.go # api_test.go # backends/backend.go # backends/gateway.go # backends/gateway_test.go # backends/p_mysql.go # backends/p_redis.go # backends/processor.go # backends/validate.go # client.go # cmd/guerrillad/serve.go # cmd/guerrillad/serve_test.go # config.go # config_test.go # event.go # glide.lock # goguerrilla.conf.sample # guerrilla.go # log/log.go # mail/envelope.go # mail/envelope_test.go # server.go # tests/guerrilla_test.go
- Start blocks until Stop() is called (using a non-blocking version of ListenAndServe)
|
Made the following changes:
Also, started writing tests. It would be good if we could add more tests for this. Now trying to figure out this problem, when pointing the browser to http: it was doing this before the changes.. My dashboard config: "dashboard": {
"is_enabled": true,
"listen_interface": ":8081",
"tick_interval": "5s",
"max_window": "24h",
"ranking_aggregation_interval": "6h"
}The 8081 port is forwarded via ssh |
|
That might be because the |
|
thanks; didn't do that - will try that soon! |
|
It seems like the statik package is missing from the repo. Could you pls commit when you get a chance? Thanks. |
|
@flashmob So I deliberately didn't include the statik package because it's a build artifact, and it's pretty big (~7MB). If it's committed each time a change is made to the dashboard, that'll increase the repo size pretty quickly, but it's an option. In order to use the dashboard you need to:
This is a somewhat long process so it certainly shouldn't be part of building Another option would be to add a one-time build step to the Makefile called Installation process would then be like: |
inject dashboard hook to logger form the guerrilla package
Lock ranking buffers while aggregating
…backend Fix concurrent read/write of ranking buffers in dashboard Remove some console logs from js util fix a typo in backend
- point log to use log from go-guerrilla/log package so the logger can be injected - dashboard coverage increased to > 80%
|
Is this ready to be committed to Master ? Dashboard is useful for me. |
- fix out of bounds error
|
This branch (dashboard) has been updated with the latest master. If you require the dashboard, you may git checkout this branch and build according to this doc https://github.com/flashmob/go-guerrilla/wiki/Dashboard |
|
Todo in the future:
|
Todo:
[x] Update main README with info about analytics
[x] Update sample config with dashboard config
[x] Add mitigation for HELO spamming