|
| 1 | +Web Monitoring |
| 2 | +-------------- |
| 3 | + |
| 4 | +Webmon executes plugins against assets (URLs, originally). |
| 5 | + |
| 6 | +The API will contain groups of calls, divided in asset management, |
| 7 | +statistics gathering and execution. |
| 8 | + |
| 9 | +Asset Management involves URL management, adding, modifying and removing |
| 10 | +items (i.e "https://somesite.net, http://some.other.server/somespecificURI, |
| 11 | +etc"). |
| 12 | + |
| 13 | +Statistics Gathering will provide statistical information about said assets. |
| 14 | + |
| 15 | +Execution will provide the necessary means to push jobs to the work queue. |
| 16 | + |
| 17 | +Storage is implemented in Redis |
| 18 | + |
| 19 | + |
| 20 | +Work Queue |
| 21 | +---------- |
| 22 | + |
| 23 | +The Jobs API (A Ronald Class) will send jobs to a Messaging Queue (zeromq). |
| 24 | +This Queue will be read by the Dispatcher, which is a standalone module. |
| 25 | + |
| 26 | + |
| 27 | +Statistics |
| 28 | +---------- |
| 29 | + |
| 30 | +The statistics API will provide information about assets. Information will |
| 31 | +come from the different plugins that the Executor enables. All plugins will |
| 32 | +be executed for each Asset. |
| 33 | + |
| 34 | + |
| 35 | +Executor Module (standalone) |
| 36 | +---------------------------- |
| 37 | + |
| 38 | +The Executor Module will be a Task Worker, using the standard zeromq |
| 39 | +Streamer: http://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/devices/streamer.html |
| 40 | + |
| 41 | +Dispatcher Module (standalone) |
| 42 | +------------------------------ |
| 43 | + |
| 44 | +The Dispatcher Module will act as a broker. The Jobs API class will use zeromq |
| 45 | +to communicate with the Dispatcher, indicating Job IDs. |
| 46 | + |
| 47 | +Protocols |
| 48 | +--------- |
| 49 | + |
| 50 | +Each executor will have access to all plugins, directly, hence no need to do |
| 51 | +unsafe things like transporting code. The executor is NOT a generic 'worker' |
| 52 | +node. The transport between Jobs API <-> Dispatcher <-> Executor is zeromq. |
| 53 | + |
| 54 | +The transport between Executor and Storage is Redis. |
| 55 | + |
| 56 | + |
| 57 | +TO DO LIST |
| 58 | +---------- |
| 59 | + |
| 60 | +In consideration to https://redis.io/topics/persistence, snapshots will be |
| 61 | +triggered after each important API call, and whenever the Dispatcher gets a |
| 62 | +"SNAPSHOT NOW" command over its zeromq control channel. |
| 63 | + |
| 64 | +The AOF (Append-Only-File) is a persistence method for |
| 65 | +Redis Key-Value noSQL storage system). It is comparable to a Changelog. |
| 66 | + |
| 67 | +The RDB (Redis Database) is the snapshot-style persistence method. This is |
| 68 | +what we will be using. |
| 69 | + |
| 70 | +https://www.fullstackpython.com/blog/install-redis-use-python-3-ubuntu-1604.html |
| 71 | + |
| 72 | +https://redis.io/commands/save |
| 73 | + |
| 74 | +https://redis.io/commands/bgsave |
| 75 | + |
| 76 | +PLUGINS |
| 77 | +------- |
| 78 | + |
| 79 | +* HtmlStats: uses numpy to create standard deviation statistical |
| 80 | + calculations to detect excessive changes between different parameters such |
| 81 | + as html tags, pagesize in bytes, etc. |
| 82 | + |
| 83 | +There are other plugins included. |
0 commit comments