distributedINFORMATION
mySpending info
WikiRing.com
WikiRing Blog
Copes With Change Poorly
Michael Daum
Lynnwood Brown
Open street map
NabazTag Blog
twiki/bin run ./rest TWikiStatsPlugin.collate.
This is best done from a Cronjob every minute or so
# m h dom mon dow command * * * * * cd /var/twiki411_stats/bin ; ./rest TWikiStatsPlugin.collate > /var/twiki411_stats/data/TWikiStatsPlugin.log
twiki/bin run ./rest TWikiStatsPlugin.importApache filename /var/log/apache/access_log.20070717.
This is best run after the apache log file is 'rolled over'.
Note that no attempt is made to prevent you from re-importing the same log information more than once. Doing so will produce
incorrect results (the new imported log entries will be added to the previously imported ones).
If you choose to not use the live collation method above, turn off tick file generation by turning off
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{UseTickFiles} in configure.
createTables restHandler twiki/bin run ./rest TWikiStatsPlugin.createTables.
runAnalysis restHandler twiki/bin run ./rest TWikiStatsPlugin.runAnalysis.
runReport restHandler twiki/bin run ./rest TWikiStatsPlugin.runReport report TWikiStatsReport.
Best run from cron.
# m h dom mon dow command * * * * * cd /var/twiki411_stats/bin ; ./rest TWikiStatsPlugin.runReport report TWiki.TWikiStatsReport > /var/twiki411_stats/data/TWikiStatsReport.log
TWIKISTATS DEFAULT - the output format
count - the number of results to show - uses period and step to determine step size (1 by default)
relativetime - used to offset the initial time (goes backwards in time - so relativetime="12" period="month" would start 12 months in the past
period - which results table to use (and the basic interval) one of minute, hour, day, month (defaults to hour)
step - how many periods to increment each output value by (used to add the xaxis to the Flot Charts)
separator - the separator used if count is greater than one ($n by default)
unset - used for any value that has no entry in the database
relativetime counter.
The DEFAULT output format can contain the following $count -
$timeKey - the datetime of the datapoint being output (in the form of the relevant substring of=YY-MM-DD HH:MM= )
$totalAccessCount - the count of all log entries that are filtered into the database
unique{METRIC} - the count of normalised (or unique) {METRIC} accessed (ie. if there are only 12 requests for Main the unquie count == 1)
new{METRIC} - the count of normalised (or unique) {METRIC} accessed this period that were not last period
total{METRIC} - the total number of {METRIC} occurring in the log
max{METRIC} - The the maximum value of {METRIC} (ie, if the most requested topic was Main, $maxTopicsName ($maxTopics) would return Main.WebHome (12))
max{METRIC}Name - The Username (if a peruser metric) or Value Name that has the maximum value of {METRIC}
ratio{METRIC} - Average number of Accesses per unique {METRIC} (analogous to total{METRIC} / unique{METRIC}
maxratio{METRIC} - the percentage of the {METRIC} total (analogous to 100% * max{METRIC} / total{METRIC}
{METRIC} can be any one of Topicsperuser - unique topic count vs user (can be used to find out who has accessed the most different topics)
Filesperuser - unique file count vs user
Agentsperuser - unique agent count vs user
Statusperuser - unique status count vs user
Users
Topics - TWiki Topic accesses
Files - direct attachment accesses
Agents
Scripts
Status
TWIKITOPSTATS DEFAULT - the metric to show - same names as can be in the DEFAULT parameter of %TWIKISTATS% above
format - $name, $value, $total, $percent and the values specified for the DEFAULT parameter of %TWIKISTATS% above (defaults to ' * $name - $value')
count - the number of name value pairs to list (10 by default)
relativetime - used to offset the initial time (goes backwards in time - so relativetime="12" period="month" would start 12 months in the past
period - which results table to use (and the basic interval) one of minute, hour, day, month (defaults to hour)
separator - the separator used if count is greater than one ($n by default)
unset - used for any value that has no entry in the database
users this month (342)
|
users today (105)
|
users last hour (17)
|
users this hour (9)
|
topics this month (1267)
|
topics today (708)
|
topics last hour (30)
|
topics this hour (10)
|
files this month ((no statistics gathered for 08-08 yet)) |
files today ((no statistics gathered for 08-08-15 yet)) |
files last hour ((no statistics gathered for 08-08-15 15:00 yet)) |
files this hour ((no statistics gathered for 08-08-15 16:00 yet)) |
scripts this month (8)
|
scripts today (2)
|
scripts last hour (1)
|
scripts this hour (1)
|
agents this month (27)
|
agents today (14) |
agents last hour (10)
|
agents this hour (4)
|
configure interface (Go to Plugins->Find More Extensions) .zip or .tgz archives
perl <module>_installer )
configure and enable the module, if it is a plugin.
,v files in your existing install (take care not to lock the files when you check in)
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{ScriptFilter} = qr/^.*$/;
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{WebDotTopicFilter} = qr/^.*$/;
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{FileNameFilter} = qr/^.*$/;
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{UserFilter} = qr/^.*$/;
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{RemoteHostFilter} = qr/^.*$/;
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{RemoteAgentFilter} = qr/^.*$/;
$TWiki::cfg{Plugins}{TWikiStatsPlugin}{StatusFilter} = qr/^.*$/;
| Plugin Author(s): | TWiki:Main.SvenDowideit - http://distributedINFORMATION.com a WikiRing founding partner |
||||||
| Copyright: | © SvenDowideit@distributedINFORMATION.com | ||||||
| License: | GPL (Gnu General Public License) | ||||||
| Plugin Version: | 0 (07 Feb 2008) | ||||||
| Change History: | |||||||
| Dependencies: |
|
||||||
| SQLite3 >= 3.2.6 (for smaller systems) and MySQL? >= 4.1. | |||||||
| Plugin Home: | http://twiki.org/cgi-bin/view/Plugins/TWikiStatsPlugin | ||||||
| Feedback: | http://twiki.org/cgi-bin/view/Plugins/TWikiStatsPluginDev | ||||||
| Appraisal: | http://twiki.org/cgi-bin/view/Plugins/TWikiStatsPluginAppraisal |