From c21dc1ba0d1073de8f0ed1779f626ee8b132c9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20P=C3=A9rez=20Crespo?= <jaime.perez@uninett.no> Date: Fri, 24 Jan 2014 16:35:58 +0000 Subject: [PATCH] Issue #612, documentation fixes on statistics module. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3331 44740490-163a-0410-bde0-09ae8108e29a --- modules/statistics/docs/statistics.txt | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/statistics/docs/statistics.txt b/modules/statistics/docs/statistics.txt index e8c70cf1b..3d752e1fc 100644 --- a/modules/statistics/docs/statistics.txt +++ b/modules/statistics/docs/statistics.txt @@ -14,7 +14,7 @@ The simpleSAMLphp statistics module ## Configure your logs -Reccomended to use syslog for logging. Then a separate loglevel is +It's recommended to use syslog for logging, then a separate loglevel is dedicated to statistics. You need to get all statistics log entries in one log file. Here is how I do it in syslog.conf: @@ -48,38 +48,38 @@ First enable the statistics module, as you enable any other module: Then take the configuration template: - cp modules/statistics/config-templats/*.php config/ + cp modules/statistics/config-templates/*.php config/ Configure the path of the log file: - 'inputfile' => '/tmp/stat', + 'inputfile' => '/var/log/simplesamlphp.stat', Make sure the stat dir is writable. SimpleSAMLphp will write data here: - 'statdir' => '/tmp/stats/', + 'statdir' => '/var/lib/simplesamlphp/stats/', ### Configuring the syntax of the logfile Syslog uses different date formats on different environments, so you need to do some manual tweaking to make sure that simpleSAMLphp knows how to interpret the logs. -There is three parameter values you need to make sure is correct. +There are three parameter values you need to make sure are correct. 'datestart' => 1, 'datelength' => 15, 'offsetspan' => 21, -The first `datestart` is 1 when the date start from the begginning of the line. The `datelength` parameter tells how many character long the date is. +The first `datestart` is 1 when the date starts from the beginning of the line. The `datelength` parameter tells how many characters long the date is. -The `offsetspan` parameter shows on which character the first column starts, such that the STAT keyword becomes in column number 3. +The `offsetspan` parameter shows on which character the first column starts, such that the STAT keyword becomes column number 3. -Use the `loganalyzer` script with the `--debug` parameter to debug whether your configuration is correct. Then it easy to see what is wrong. In example if the STAT keyword is not in column 3. +Use the `loganalyzer` script with the `--debug` parameter to debug whether your configuration is correct. If not, then it easy to see what is wrong, for example if the STAT keyword is not in column 3. -Here is example output: +Here is some example output: $ cd modules/statistics/bin $ ./loganalyzer.php --debug - Statistics directory : /tmp/stats/ + Statistics directory : /var/lib/simplesamlphp/stats/ Input file : /Users/andreas/Desktop/simplesamlphp.log Offset : 4237200 ---------------------------------------- @@ -98,8 +98,8 @@ Here is example output: In the debug output, please verify four things: - 1. That the first field in the date parse line contains all the characters that are part of the timestamp, compare with the log line on the line above. - 2. Verify that the second field in the date parse line is correct - corresponding to the input timestamp. + 1. That the first field in the date parse line contains all the characters that are part of the timestamp, compared with the log line on the line above. + 2. Verify that the second field in the date parse line is correct: corresponding to the input timestamp. 3. That the first `[0]` field contains all the characters from the first column. 4. That column `[3]` is STAT. @@ -111,22 +111,22 @@ You also should setup the cron module: cd modules/cron touch enable -### Alternatively to use the cron module +### Alternative to using the cron module -Alternatively to use the cron module you can run the -script`statistics/bin/loganalyzer.php`. +As an alternative to using the cron module you can run the +script `statistics/bin/loganalyzer.php` manually. ## Presentation of the statistics -At the installation page there will be a link "show statitics", go there and if simpleSAMLphp finds the statistics files in the `statdir` generated from cron or the script you will see statistics. Enjoy. +At the Installation page there will be a link "show statistics", go there and if simpleSAMLphp finds the statistics files in the `statdir` generated from cron or the script you will see statistics. Enjoy. Support ------- If you need help to make this work, or want to discuss simpleSAMLphp with other users of the software, you are fortunate: Around simpleSAMLphp there is a great Open source community, and you are welcome to join! The forums are open for you to ask questions, contribute answers other further questions, request improvements or contribute with code or plugins of your own. -- [simpleSAMLphp homepage (at Feide RnD)](http://rnd.feide.no/simplesamlphp) -- [List of all available simpleSAMLphp documentation](http://rnd.feide.no/view/simplesamlphpdocs) -- [Join the simpleSAMLphp user's mailing list](http://rnd.feide.no/content/simplesamlphp-users-mailinglist) -- [Visit and contribute to the simpleSAMLphp wiki](https://ow.feide.no/simplesamlphp:start) +- [simpleSAMLphp homepage (at Feide RnD)](http://simplesamlphp.org) +- [List of all available simpleSAMLphp documentation](http://simplesamlphp.org/docs/stable/) +- [Join the simpleSAMLphp user's mailing list](http://simplesamlphp.org/lists) +- [Visit and contribute to the simpleSAMLphp wiki](https://openwiki.uninett.no/simplesamlphp:start) -- GitLab