Updated documentation.

This commit is contained in:
Christian P. MOMON 2023-05-09 11:26:21 +02:00
parent 52090b3637
commit bb1820222f

View file

@ -82,19 +82,21 @@ Usage:
statoolinfos build <configurationfile> build property files from conf and input statoolinfos build <configurationfile> build property files from conf and input
statoolinfos clear <configurationfile> remove property files from conf statoolinfos clear <configurationfile> remove property files from conf
statoolinfos crawl <configurationfile> crawl all file from conf and input statoolinfos crawl <configurationfile> crawl all file from conf and input
statoolinfos format <fileordirectory> format property files in tiny way
statoolinfos htmlize <configurationfile> generate web pages from conf statoolinfos htmlize <configurationfile> generate web pages from conf
statoolinfos probe OPTION [<directory>|<configurationfile>] generate metrics files from conf statoolinfos probe OPTION [<directory>|<configurationfile>] generate metrics files from conf
OPTION = [-full|-today|-previousday|-NN] with NN a day count OPTION = [-full|-today|-previousday|-NN] with NN a day count
statoolinfos tagdate <fileordirectory> update the file.datetime file
statoolinfos uptime <configurationfile> update uptime journal statoolinfos uptime <configurationfile> update uptime journal
statoolinfos format <fileordirectory> format property files in tiny way statoolinfos list file <logfilesorconfigfile> display http access log files
statoolinfos list ip [-bot|-nobot] <fileordirectory> generate ip list from log file statoolinfos list log [-bot|-nobot] <logfilesorconfigfile> display http access log lines
statoolinfos list ua [-bot|-nobot] <fileordirectory> generate user agent list from log file statoolinfos list ip [-bot|-nobot] <logfiles> generate ip list from http log file
statoolinfos list visitors [-bot|-nobot] <fileordirectory> generate visitors (ip+ua) list from log file statoolinfos list ua [-bot|-nobot] <logfiles> generate user agent list from http log file
statoolinfos stat ip [-bot|-nobot] <fileordirectory> generate stats about ip from log file statoolinfos list visitor [-bot|-nobot] <logfiles> generate visitors (ip+ua) list from http log file
statoolinfos stat ua [-bot|-nobot] <fileordirectory> generate stats about user agent from log file statoolinfos stat ip [-bot|-nobot] <logfiles> generate stats about ip from http log file
statoolinfos stat visitors [-bot|-nobot] <fileordirectory> generate stats about visitors (ip+ua) from log file statoolinfos stat ua [-bot|-nobot] <logfiles> generate stats about user agent from http log file
statoolinfos tagdate <fileordirectory> update the file.datetime file statoolinfos stat visitor [-bot|-nobot] <logfiles> generate stats about visitor (ip+ua) from http log file
``` ```
@ -139,7 +141,7 @@ Configuration template:
conf.probe.types=Etherpad conf.probe.types=Etherpad
conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log*
conf.probe.httpaccesslog.pattern= conf.probe.httpaccesslog.pattern=
conf.probe.httpaccesslog.filepath= conf.probe.httpaccesslog.pathfilter=
# This parameter requires real ip proxy setting and log output setting. # This parameter requires real ip proxy setting and log output setting.
conf.probe.etherpad.logs=/var/log/etherpad/output.log conf.probe.etherpad.logs=/var/log/etherpad/output.log
# Database URL. Example of the most frequent cases: # Database URL. Example of the most frequent cases:
@ -170,7 +172,7 @@ Configuration template:
conf.probe.types=Gitea conf.probe.types=Gitea
conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log*
conf.probe.httpaccesslog.pattern= conf.probe.httpaccesslog.pattern=
conf.probe.httpaccesslog.filepath= conf.probe.httpaccesslog.pathfilter=
conf.probe.gitea.data=/opt/gitea/data conf.probe.gitea.data=/opt/gitea/data
conf.probe.gitea.api.url=https://forge.libre-service.eu/ conf.probe.gitea.api.url=https://forge.libre-service.eu/
conf.probe.gitea.token=b6598c616b1cd350b834258205da4e5e8b951005 conf.probe.gitea.token=b6598c616b1cd350b834258205da4e5e8b951005
@ -202,7 +204,7 @@ Configuration template:
conf.probe.types=LibreQR conf.probe.types=LibreQR
conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log*
conf.probe.httpaccesslog.pattern= conf.probe.httpaccesslog.pattern=
conf.probe.httpaccesslog.filepath= conf.probe.httpaccesslog.pathfilter=
conf.probe.libreqr.datafiles=/var/www/foo.bar.org/temp/ conf.probe.libreqr.datafiles=/var/www/foo.bar.org/temp/
conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties
``` ```
@ -245,7 +247,7 @@ Configuration template:
conf.probe.types=Nextcloud conf.probe.types=Nextcloud
conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log*
conf.probe.httpaccesslog.pattern= conf.probe.httpaccesslog.pattern=
conf.probe.httpaccesslog.filepath= conf.probe.httpaccesslog.pathfilter=
conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties
``` ```
@ -259,7 +261,7 @@ Configuration template:
conf.probe.types=PrivateBin conf.probe.types=PrivateBin
conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log*
conf.probe.httpaccesslog.pattern= conf.probe.httpaccesslog.pattern=
conf.probe.httpaccesslog.filepath= conf.probe.httpaccesslog.pathfilter=
conf.probe.privatebin.data=/var/www/paste.libre-service.eu/data/ conf.probe.privatebin.data=/var/www/paste.libre-service.eu/data/
conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties
``` ```
@ -270,22 +272,22 @@ Configuration template:
``` ```
conf.probe.types=HttpAccessLog, HttpErrorLog conf.probe.types=HttpAccessLog, HttpErrorLog
conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log*,/var/log/apache2/foo.bar.org-extraaccess.log*
conf.probe.httperrorlog.file=/var/log/apache2/foo.bar.org-error.log* conf.probe.httperrorlog.file=/var/log/apache2/foo.bar.org-error.log*,/var/log/apache2/foo.bar.org-extraerror.log*
conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org-metrics.properties
# Custom access log pattern with Java regex. # Custom access log pattern with Java regex.
# Default: ^(?<remoteAddress>[a-fA-F0-9\:\.]+) - (?<remoteUser>[^\[]+) \[(?<time>[^\]]+)\] "(?<request>.*)" (?<status>\d+) (?<bodyBytesSent>\d+) "(?<referer>.*)" "(?<userAgent>[^"]*)".*$ # Default: ^(?<remoteAddress>[a-fA-F0-9\:\.]+) - (?<remoteUser>[^\[]+) \[(?<time>[^\]]+)\] "(?<request>.*)" (?<status>\d+) (?<bodyBytesSent>\d+) "(?<referer>.*)" "(?<userAgent>[^"]*)".*$
conf.probe.httpaccesslog.pattern= conf.probe.httpaccesslog.pattern=
# Filter request with Java regex (without the initial '^' and without the final '$'). # Filter request with Java regex (without the initial '^' and without the final '$', see https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html).
# Example: filterpath=/.*well-known.* # Example: pathfilter=/.*well-known.*
conf.probe.httpaccesslog.pathfilter= conf.probe.httpaccesslog.pathfilter=
``` ```
Warning: to have month metric values, you have to set **retention log to 7 weeks or 50 days** in Nginx or Apache logrotate configuration. Warning: to have month metric values, you have to set **retention log to 7 weeks or 50 days** in Nginx or Apache logrotate configuration.
Pour Nginx, éditer le fichier `/etc/logrotate.d/nginx` : For Nginx, éditer le fichier `/etc/logrotate.d/nginx` :
``` ```
/var/log/nginx/*.log { /var/log/nginx/*.log {
weekly weekly
@ -293,7 +295,7 @@ Pour Nginx, éditer le fichier `/etc/logrotate.d/nginx` :
rotate 7 rotate 7
``` ```
Pour Apache, éditer le fichier `/etc/logrotate.d/apache2` : For Apache, éditer le fichier `/etc/logrotate.d/apache2` :
``` ```
/var/log/apache2/*.log { /var/log/apache2/*.log {
weekly weekly