| CODENOTIFIER | HelpYou are not signed inSign in |
Project: ejabberd-modules
Revision: 712
Author: badlop
Date: 03 Sep 2008 17:39:34
Changes: * src/mod_statsdx.erl: If client answers with unexpected response,
forget stanza instead of crashing.
* src/mod_statsdx.erl: The option 'hooks' in mod_statsdx is
disabled by default.
* README.txt: Likewise
* README.txt: Several cosmetic changes.
Files:| ... | ...@@ -1,3 +1,14 @@ | |
| 1 | 2008-09-03 Badlop <badlop@process-one.net> | |
| 2 | ||
| 3 | * src/mod_statsdx.erl: If client answers with unexpected response, | |
| 4 | forget stanza instead of crashing. | |
| 5 | ||
| 6 | * src/mod_statsdx.erl: The option 'hooks' in mod_statsdx is | |
| 7 | disabled by default. | |
| 8 | * README.txt: Likewise | |
| 9 | ||
| 10 | * README.txt: Several cosmetic changes. | |
| 11 | ||
| 1 | 12 | 2007-12-26 Badlop <badlop@process-one.net> |
| 2 | 13 | |
| 3 | 14 | * src/mod_statsdx.erl: Translate menu items of webadmin hooks in |
| ... | ...@@ -5,7 +16,8 @@ | |
| 5 | 16 | |
| 6 | 17 | 2007-08-31 Badlop <badlop@ono.com> |
| 7 | 18 | |
| 8 | * src/mod_statsdx.erl: Added pages to Web Admin. Apply Emacs-mode indentation. | |
| 19 | * src/mod_statsdx.erl: Added pages to Web Admin. Apply Emacs-mode | |
| 20 | indentation. | |
| 9 | 21 | * src/ejabberd_web_admin.erl: No need to patch core web admin file. |
| 10 | 22 | * Emakefile: Idem. |
| 11 | 23 |
| ... | ...@@ -1,25 +1,40 @@ | |
| 1 | 1 | |
| 2 | 2 | mod_statsdx - Calculates and gathers statistics actively |
| 3 | 3 | |
| 4 | Homepage: http://ejabberd.jabber.ru/mod_statsdx | |
| 4 | Homepage: http://www.ejabberd.im/mod_statsdx | |
| 5 | 5 | Author: Badlop |
| 6 | Module for ejabberd SVN | |
| 6 | Requirements: ejabberd 2.0.x | |
| 7 | ||
| 8 | ||
| 9 | mod_statsdx | |
| 10 | ============== | |
| 11 | ||
| 12 | Measures several statistics, and provides a new section in ejabberd | |
| 13 | Web Admin to view them. | |
| 7 | 14 | |
| 8 | 15 | |
| 9 | 16 | CONFIGURE |
| 10 | 17 | --------- |
| 11 | 18 | |
| 12 | Add to ejabberd.cfg, 'modules' section the basic configuration: | |
| 13 | {mod_statsdx, []}, | |
| 19 | Enable the module in ejabberd.cfg for example with a basic configuration: | |
| 20 | {modules, [ | |
| 21 | ... | |
| 22 | {mod_statsdx, []} | |
| 23 | ]}. | |
| 14 | 24 | |
| 15 | 25 | Configurable options: |
| 16 | hooks: Set to 'false' to remove hooks and related statistics if you don't need them (default: true) | |
| 26 | hooks: Set to 'true' to enable hooks and related statistics. | |
| 27 | This option by default 'false' because it is expected to | |
| 28 | consume many resources in very populated servers. | |
| 17 | 29 | |
| 18 | 30 | |
| 19 | 31 | EXAMPLE CONFIGURATION |
| 20 | 32 | --------------------- |
| 21 | 33 | |
| 22 | {mod_statsdx, [{hooks, false}]}, | |
| 34 | {modules, [ | |
| 35 | ... | |
| 36 | {mod_statsdx, [{hooks, true}]} | |
| 37 | ]}. | |
| 23 | 38 | |
| 24 | 39 | |
| 25 | 40 | FEATURE REQUESTS |
| ... | ...@@ -34,27 +49,6 @@ | |
| 34 | 49 | |
| 35 | 50 | |
| 36 | 51 | |
| 37 | ejabberd_web_admin | |
| 38 | ================== | |
| 39 | ||
| 40 | Adds additional statistics provided by mod_statsdx to the Web Interface | |
| 41 | ||
| 42 | This patched version of the Web Interface | |
| 43 | does not work with ejabberd 1.1.3 or older. | |
| 44 | ||
| 45 | ||
| 46 | CONFIGURE | |
| 47 | --------- | |
| 48 | ||
| 49 | This patch requires mod_statsdx. | |
| 50 | Several new statistics are available on the web interface. | |
| 51 | No specific configuration is required. | |
| 52 | ||
| 53 | Screenshots: http://ejabberd.jabber.ru/mod_statsdx | |
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | ||
| 58 | 52 | mod_stats2file |
| 59 | 53 | ============== |
| 60 | 54 | |
| ... | ...@@ -70,13 +64,16 @@ | |
| 70 | 64 | |
| 71 | 65 | This module requires mod_statsdx. |
| 72 | 66 | |
| 73 | Add to ejabberd.cfg, 'modules' section the basic configuration: | |
| 74 | {mod_stats2file, []}, | |
| 67 | Enable the module in ejabberd.cfg for example with a basic configuration: | |
| 68 | {modules, [ | |
| 69 | ... | |
| 70 | {mod_stats2file, []} | |
| 71 | ]}. | |
| 75 | 72 | |
| 76 | 73 | Configurable options: |
| 77 | 74 | interval: Time between updates, in minutes (default: 5) |
| 78 | 75 | type: Type of output. Allowed values: html, txt, dat (default: html) |
| 79 | basefilename: Base filename, including absolute path (default: "/tmp/ejasta") | |
| 76 | basefilename: Base filename including absolute path (default: "/tmp/ejasta") | |
| 80 | 77 | split: If split the statistics in several files (default: false) |
| 81 | 78 | hosts: List of virtual hosts that will be checked. By default all |
| 82 | 79 | |
| ... | ...@@ -84,6 +81,14 @@ | |
| 84 | 81 | EXAMPLE CONFIGURATION |
| 85 | 82 | --------------------- |
| 86 | 83 | |
| 87 | {mod_stats2file, [{interval, 60}, {type, txt}, {split, true}, | |
| 88 | {basefilename, "/var/www/stats"}, {hosts, ["localhost", "server3.com"]} | |
| 89 | ]}, | |
| 84 | {modules, [ | |
| 85 | ... | |
| 86 | {mod_stats2file, [{interval, 60}, | |
| 87 | {type, txt}, | |
| 88 | {split, true}, | |
| 89 | {basefilename, "/var/www/stats"}, | |
| 90 | {hosts, ["localhost", "server3.com"]} | |
| 91 | ]} | |
| 92 | ]}. | |
| 93 | ||
| 94 |
| ... | ...@@ -31,7 +31,7 @@ | |
| 31 | 31 | %% ------------------- |
| 32 | 32 | |
| 33 | 33 | start(Host, Opts) -> |
| 34 | Hooks = gen_mod:get_opt(hooks, Opts, true), | |
| 34 | Hooks = gen_mod:get_opt(hooks, Opts, false), | |
| 35 | 35 | %% Default value for the counters |
| 36 | 36 | CD = case Hooks of |
| 37 | 37 | true -> 0; |
| ... | ...@@ -611,7 +611,12 @@ | |
| 611 | 611 | |
| 612 | 612 | %% cuando el virtualJID recibe una respuesta iqversion, |
| 613 | 613 | %% almacenar su JID/USR + client + OS en una tabla |
| 614 | received_response(From, _To, {xmlelement, "iq", Attrs, Elc}) -> | |
| 614 | received_response(From, _To, El) -> | |
| 615 | try received_response(From, El) | |
| 616 | catch | |
| 617 | _:_ -> ok | |
| 618 | end. | |
| 619 | received_response(From, {xmlelement, "iq", Attrs, Elc}) -> | |
| 615 | 620 | User = From#jid.luser, |
| 616 | 621 | Host = From#jid.lserver, |
| 617 | 622 | Resource = From#jid.lresource, |