One: summary1. Summary of required configurationDefining log formatsSplit field for log: ^aLog format: IP address ^a server time ^a request parameterConfigure location, log request log to Local diskStore data in a given log format to a local diskTwo: Configuration1. Go to th
A. Download
Download Address: http://goaccess.io/
Two. Installation
-y install glib2 glib2-devel ncurses ncurses-devel GeoIP*
./configure –enable-geoip –enable-utf8
Three. Use
1. Direct view of the command line
-f access.log-c-a
2. Output to HTML
Configuring the ~/.goaccessrc File
0%d/%b/%Y%h%^[%d:%^] “%r%s%b “%R” “%u%T
Generate commands
-f /web/nginx/logs/access.log-a> report.html
Reference:http://my.oschina.net/mrco/blog/181737
The above describe
Recently, in the company's Nginx log analysis, one of the requirements is to extract the daily access to the TOP10 page this month, and its number of visits.
To do this, the first thing to do is to clean up effective page access. I use the exclusion method to remove the. js. css and other access. But initially, I was not able to fully understand the request to remove the suffix.
Cleaning, sampling, cleaning
Copy Code code as follows:
Location/{
Proxy_redirect off;
Proxy_set_header Host $host;
Proxy_set_header X-real-ip $remote _addr;
Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;
Proxy_pass HTTP://MMT;
if ($remote _addr!= 192.168.0.2) {Access_log/var/log/nginx/nginx_access_abres.log;}}
Note: 192.168.0.2 is the F5 intranet address.
The following configuration was te
It is accidentally found that access. log is 21 GB big, so it is cut.
Nginx is a lightweight Web server with many advantages such as small size, high performance, and fast speed. However, there are also shortcomings. For example, the access log file generated by the log file is always one and will not be automaticall
Nginx is a very lightweight Web server, small size, high performance, fast, and many other advantages. But shortcomings are also shortcomings, such as the resulting access log file has been one, will not be automatically cut, if the traffic is very large, will result in a very large log file size, not easy to manage. Of course, we do not want to see such a large
A about Nginx log
We observe the nginx.conf in the Nginx installation directory
You can see similar information like this
#access_log Logs/host.access.log Main;
This indicates that the server, its access log file is Logs/host.access.log,
Format used for "main" format.
In addition to the main format, you can customi
Ideas:
1, back up yesterday's log, while deleting the five days before the backup data.
2, copy the log file, and set the original log file is empty
Shell
#!/bin/bash
#function: Cut nginx log files
#author Kung
log_path= '/home/wwwlogs/' log_bak_path= '
/ home/wwwlogs_b
Nginx log and monitoring
Address: http://nginx.com/resources/admin-guide/logging-and-monitoring/Logging and Monitoring
Log and monitoring
This section describes how to configure logging of errors and processed requests, as well as how to use the runtime monitoring service of NGINX and
The first step is to rename the log file without having to worry about renaming the log file and losing the log when Nginx is not found. Before you reopen the log file for the original name, Nginx still writes to the file you rena
In general, the client side of the log collection scheme needs to install an additional agent to collect logs, such as Logstash, Filebeat, and so on, and the additional program means that the environment is complex and the resource is occupied, is there a way to implement log collection without the need for an additional installation program? Rsyslog is the answer you're looking for!
Rsyslog
Rsyslog is a
Nginxhttps encryption and nginx log configuration and management use the advantages of Nginx as a WEB server, Nginx is highly efficient in processing static files, index files, and automatic indexing. As a proxy server, Nginx can implement non-cache reverse proxy to improve
Zabbix as a monitoring software is very flexible, supporting the data types are very rich, such as digital (no plus or minus), digital (floating-point), log, text and so on. All we need to do is use the script to collect the data, then Zabbix collect and draw, and set the alarm line. Here we learn to use Zabbix to monitor memcached, PHP-FPM, Tomcat, Nginx, MySQL, and web logs. memcached MonitoringCustom Key
First, the purposeThe Nginx log is synced to the local server in real time via the Rsync public key authentication method, and then processed using the Elk program.Second, the problem encountered and the way to solve the idea1. File permissions: Nginx Log default permissions are as follows:[[email protected] ~]# ll/var
First, the script idea
The first step is to rename the log file without having to worry about renaming the log file and losing the log when Nginx is not found. Before you reopen the log file for the original name, Nginx still wri
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.