Raspi - Wiki

Installation de RaspiOS

Outils pour utilisateurs

Outils du site


web:access_log

Ceci est une ancienne révision du document !


Access Log

Pour parser les acces Log Nginx il est préférable de modifier le fichier /etc/nginx/nginx.conf :
on modifie le format des logs, ainsi que la destination des fichiers:

/etc/nginx/nginx.conf
	##
	# Logging Settings
	##
	log_format perso '$time_local | '
			 '$status | '
			 '$http_x_forwarded_for | '
			 '$remote_addr | '
			 '$remote_user | '
			 '$body_bytes_sent | '
			 '$http_referer | '
			 '$request | '
			 '$http_user_agent';
	access_log /home/pi/logs/nginx/access.log perso;
	error_log /home/pi/logs/nginx/error.log;

et voici le résultat:

05/Mar/2022:10:57:30 +0100 | 200 | - | 192.168.1.79 | - | 5 | - | GET /meteo/php/logs.php?Host=ESP-16&Vent=2.51&Rafale=3.23&Compas=279 HTTP/1.1 | ESP8266HTTPClient
05/Mar/2022:10:57:40 +0100 | 200 | - | 192.168.6.111 | - | 5 | - | GET /meteo/php/logs.php?Host=ESP-15&PluRel=0.00&PluInt=0.00 HTTP/1.1 | ESP8266HTTPClient
05/Mar/2022:10:58:00 +0100 | 200 | - | 192.168.1.79 | - | 5 | - | GET /meteo/php/logs.php?Host=ESP-16&&Vent=0.89&Rafale=2.42&Compas=166 HTTP/1.1 | ESP8266HTTPClient
05/Mar/2022:10:58:11 +0100 | 200 | - | 192.168.6.89 | - | 5 | - | GET /meteo/php/logs.php?Host=ESP-04&Tmp=9.72&Hum=69.01&TBME=11.44&HBME=67.75&PR=1021.21&PA=1012.88 HTTP/1.1 | ESP8266HTTPClientESP8266HTTPClient
web/access_log.1646579310.txt.gz · Dernière modification : 2022/03/06 16:08 de michel