70
modifications
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
'''GoAccess tuto débutant complet Debian 11 Bullseyes et Apache''' | '''GoAccess tuto débutant complet Debian 11 Bullseyes et Apache''' | ||
copyleft Petitchat | |||
----- | ----- | ||
Ligne 186 : | Ligne 187 : | ||
<code> | <code> | ||
#! /bin/sh | #!/bin/sh | ||
# /etc/systemd/system/goaccessd.sh | # /etc/systemd/system/goaccessd.sh | ||
### BEGIN INIT INFO | ### BEGIN INIT INFO | ||
# Provides: goaccessd.sh | # Provides: goaccessd.sh | ||
# Required-Start: $local_fs | # Required-Start: $local_fs | ||
# Required-Stop: $local_fs | # Required-Stop: $local_fs | ||
# Default-Start: 2 3 4 5 | # Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | # Default-Stop: 0 1 6 | ||
# Short-Description: génération en temps réel d'une page web synthétique des logs | # Short-Description: génération en temps réel d'une page web synthétique des logs | ||
# Description: génération en temps réel d'une page web synthétique des logs | # Description: génération en temps réel d'une page web synthétique des logs | ||
### END INIT INFO | ### END INIT INFO | ||
export HOME=/home | export HOME=/home | ||
/bin/goaccess /var/log/apache2/other_vhosts_access .log -a -o /var/www/webreport.html --log-format=VCOMBINED --real-time-html –daemonize | /bin/goaccess /var/log/apache2/other_vhosts_access .log -a -o /var/www/webreport.html --log-format=VCOMBINED --real-time-html –daemonize | ||
</code> | </code> | ||
Ligne 268 : | Ligne 269 : | ||
<code> | <code> | ||
###################################### | ###################################### | ||
# Log Format Options (required) | # Log Format Options (required) | ||
###################################### | ###################################### | ||
# | # | ||
# The log-format variable followed by a space or \t for | # The log-format variable followed by a space or \t for | ||
# tab-delimited, specifies the log format string. | # tab-delimited, specifies the log format string. | ||
# | # | ||
# NOTE: If the time/date is a timestamp in seconds or microseconds | # NOTE: If the time/date is a timestamp in seconds or microseconds | ||
# %x must be used instead of %d & %t to represent the date & time. | # %x must be used instead of %d & %t to represent the date & time. | ||
# NCSA Combined Log Format | # NCSA Combined Log Format | ||
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" | log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" | ||
# NCSA Combined Log Format with Virtual Host | |||
log-format %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" | |||
# | # Common Log Format (CLF) | ||
log-format | log-format %h %^[%d:%t %^] "%r" %s %b | ||
# Common Log Format (CLF) | # Common Log Format (CLF) with Virtual Host | ||
log-format %h %^[%d:%t %^] "%r" %s %b | log-format %v:%^ %h %^[%d:%t %^] "%r" %s %b | ||
# | # W3C | ||
log-format % | #log-format %d %t %h %^ %^ %^ %^ %r %^ %s %b %^ %^ %u %R | ||
# | # Squid native log format | ||
#log-format % | #log-format %^ %^ %^ %v %^: %x.%^ %~%L %h %^/%s %b %m %U | ||
# | # AWS | Amazon CloudFront (Download Distribution) | ||
#log-format % | #log-format %d\t%t\t%^\t%b\t%h\t%m\t%^\t%r\t%s\t%R\t%u\t%^ | ||
# | # Google Cloud Storage | ||
#log-format % | #log-format "%x","%h",%^,%^,"%m","%U","%s",%^,"%b","%D",%^,"%R","%u" | ||
# | # AWS | Elastic Load Balancing | ||
#log-format | #log-format %dT%t.%^ %^ %h:%^ %^ %T %^ %^ %^ %s %^ %b "%r" "%u" | ||
# | # AWSS3 | Amazon Simple Storage Service (S3) | ||
#log-format % | #log-format %^[%d:%t %^] %h %^"%r" %s %^ %b %^ %L %^ "%R" "%u" | ||
# | # Virtualmin Log Format with Virtual Host | ||
#log-format %^[%d:%t %^] | #log-format %h %^ %v %^[%d:%t %^] "%r" %s %b "%R" "%u" | ||
# | # Kubernetes Nginx Ingress Log Format | ||
#log-format %h %^ | #log-format %^ %^ [%h] %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u" %^ %^ [%v] %^:%^ %^ %T %^ %^ | ||
# In addition to specifying the raw log/date/time formats, for | |||
# simplicity, any of the following predefined log format names can be | |||
# supplied to the log/date/time-format variables. GoAccess can also | |||
# In addition to specifying the raw log/date/time formats, for | # handle one predefined name in one variable and another predefined | ||
# simplicity, any of the following predefined log format names can be | # name in another variable. | ||
# supplied to the log/date/time-format variables. GoAccess can also | # | ||
# handle one predefined name in one variable and another predefined | log-format COMBINED | ||
# name in another variable. | log-format VCOMBINED | ||
# | log-format COMMON | ||
log-format COMBINED | log-format VCOMMON | ||
log-format VCOMBINED | #log-format W3C | ||
log-format COMMON | #log-format SQUID | ||
log-format VCOMMON | #log-format CLOUDFRONT | ||
#log-format W3C | #log-format CLOUDSTORAGE | ||
#log-format SQUID | #log-format AWSELB | ||
#log-format CLOUDFRONT | #log-format AWSS3 | ||
#log-format CLOUDSTORAGE | |||
#log-format AWSELB | ###################################### | ||
#log-format AWSS3 | # UI Options | ||
###################################### | |||
###################################### | |||
# UI Options | |||
###################################### | |||
</code> | </code> | ||
Ligne 342 : | Ligne 343 : | ||
Par défaut la page html générée par goaccess contient de nombreux panneaux ; certains sont plus utiles que d'autres, cacher les panneaux qu'on juge inutiles accroît de beaucoup la lisibilité des informations. Dans la section « Parse Options » il y a un bloc « ignore-panel » en bas ; il est possible de décommenter des lignes pour ignorer telle ou telle donnée. L'exemple suivant ignore les panneaux « Requests static », « Not Found », « Referreres », « Keaphrases » et « status_codes » : | Par défaut la page html générée par goaccess contient de nombreux panneaux ; certains sont plus utiles que d'autres, cacher les panneaux qu'on juge inutiles accroît de beaucoup la lisibilité des informations. Dans la section « Parse Options » il y a un bloc « ignore-panel » en bas ; il est possible de décommenter des lignes pour ignorer telle ou telle donnée. L'exemple suivant ignore les panneaux « Requests static », « Not Found », « Referreres », « Keaphrases » et « status_codes » : | ||
</code> | |||
###################################### | ###################################### | ||
# Parse Options | # Parse Options | ||
###################################### | ###################################### | ||
... | ... | ||
# Ignore parsing and displaying the given panel. | # Ignore parsing and displaying the given panel. | ||
# | # | ||
#ignore-panel VISITORS | #ignore-panel VISITORS | ||
#ignore-panel REQUESTS | #ignore-panel REQUESTS | ||
ignore-panel REQUESTS_STATIC | ignore-panel REQUESTS_STATIC | ||
ignore-panel NOT_FOUND | ignore-panel NOT_FOUND | ||
#ignore-panel HOSTS | #ignore-panel HOSTS | ||
#ignore-panel OS | #ignore-panel OS | ||
#ignore-panel BROWSERS | #ignore-panel BROWSERS | ||
#ignore-panel VISIT_TIMES | #ignore-panel VISIT_TIMES | ||
#ignore-panel VIRTUAL_HOSTS | #ignore-panel VIRTUAL_HOSTS | ||
ignore-panel REFERRERS | ignore-panel REFERRERS | ||
#ignore-panel REFERRING_SITES | #ignore-panel REFERRING_SITES | ||
ignore-panel KEYPHRASES | ignore-panel KEYPHRASES | ||
ignore-panel STATUS_CODES | ignore-panel STATUS_CODES | ||
#ignore-panel REMOTE_USER | #ignore-panel REMOTE_USER | ||
#ignore-panel CACHE_STATUS | #ignore-panel CACHE_STATUS | ||
#ignore-panel GEO_LOCATION | #ignore-panel GEO_LOCATION | ||
</code> | |||
=== 5.3 Changer le format des logs d'Apache === | === 5.3 Changer le format des logs d'Apache === |
modifications