CN104182321A - Access error monitoring method and access error monitoring device - Google Patents

Access error monitoring method and access error monitoring device Download PDF

Info

Publication number
CN104182321A
CN104182321A CN201410063571.XA CN201410063571A CN104182321A CN 104182321 A CN104182321 A CN 104182321A CN 201410063571 A CN201410063571 A CN 201410063571A CN 104182321 A CN104182321 A CN 104182321A
Authority
CN
China
Prior art keywords
access
server
errors
watch
access errors
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410063571.XA
Other languages
Chinese (zh)
Inventor
杨财智
杨井
李磊
张志家
王明五
邹美亮
吴操
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Tvmining Juyuan Media Technology Co Ltd
Original Assignee
Wuxi Tvmining Juyuan Media Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Tvmining Juyuan Media Technology Co Ltd filed Critical Wuxi Tvmining Juyuan Media Technology Co Ltd
Priority to CN201410063571.XA priority Critical patent/CN104182321A/en
Publication of CN104182321A publication Critical patent/CN104182321A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides an access error monitoring method, which comprises the following steps of reading an access log file of a server; matching each line of contents of the log file to find a log with an access error; adding the log with the access error into a monitoring list; monitoring the access error according to the monitoring list. The embodiment of the invention also provides a corresponding access error monitoring device at the same time. When the access error monitoring method and the access error monitoring device provided by the embodiment of the invention are adopted, the log analysis efficiency can be improved, and meanwhile, the log analysis real-time performance is enhanced.

Description

A kind of method for supervising of access errors and device
Technical field
The present invention relates to communication technical field, relate in particular to a kind of method for supervising and device of access errors.
Background technology
Apache Server is the web page server of an open source code of Apache Software Foundation, may operate on nearly all widely used computer platform, because it is cross-platform and security is widely used, be one of current most popular Web server end software.The access log of Apache Server has recorded the information of server reception & disposal request.By access log being analyzed to the operation conditions that just can effectively grasp server, strengthen the management to access resources.At present conventional Apache daily record monitoring has the instrument of much increasing income, as awstats, weblizer etc.
The mistake more often occurring when 404 mistakes are accessing WWW website, mean that the webpage that link is pointed to does not exist, the URL that is original web page lost efficacy, such as: webpage URL create-rule changes, web page files is renamed or shift position, importing link misspelling etc., all can cause original URL address to access; When Web server is received similar request, can return to 404 status codes, the resource of telling browser to ask does not exist.
At present, when the system journal of operation Apache Server is monitored, also can analyze the reason of 404 mistakes that wherein occur, but it is different according to the form of Apache access log file mostly this analysis is, configure different regular expressions and analyze, versatility is poor, and is mostly a kind of analysis of afterwards doing, mistake and the reason that cannot to supervisory system feedback, occur timely, real-time is poor.
Summary of the invention
The embodiment of the present invention provides a kind of method for supervising and device of access errors, poor to solve the Apache Server daily record monitoring versatility existing in prior art, the problem that real-time is low.
On the one hand, the embodiment of the present invention provides a kind of method for supervising of access errors, comprising:
Read the access log file of server;
Every a line content of mating described journal file, the daily record of searching access errors;
The daily record of described access errors is added to watch-list;
According to described watch-list, described access errors is monitored.
On the other hand, the embodiment of the present invention provides a kind of supervising device of access errors, comprising:
Reading unit, for reading the access log file of server;
Search unit, for mating every a line content of the described journal file that described reading unit reads, the daily record of searching access errors;
Watch-list generation unit, for adding watch-list by described daily record of searching the described access errors that unit finds;
Monitoring unit, for the described watch-list generating according to described watch-list generation unit, monitors described access errors.
Method for supervising and the device of the access errors that the employing embodiment of the present invention provides, by every a line content of coupling journal file, search predetermined error log, without configuring different regular expressions according to the different-format of journal file, can improve significantly the versatility of log analysis, and then improve analysis efficiency; On the other hand, the mistake of discovery can be added in watch-list, to offer supervisory system and monitor in real time, solve the poor problem of existing log analysis real-time.
Accompanying drawing explanation
It shown in Fig. 1, is the schematic diagram of the method for supervising of a kind of access errors of providing of the embodiment of the present invention;
It shown in Fig. 2, is the process flow diagram of the method for supervising of a kind of access errors of providing of the embodiment of the present invention;
It shown in Fig. 3, is the structural representation of the supervising device of a kind of access errors of providing of the embodiment of the present invention.
Embodiment
In embodiments of the present invention, supervisory system is by every a line content of coupling journal file, search predetermined error log, without configuring different regular expressions according to the different-format of journal file, the daily record of access errors is added to watch-list simultaneously, can realize the real-time monitoring to access errors.
Below describe the method for supervising of the access errors that the embodiment of the present invention provides in detail.
Figure 1 shows that the schematic diagram of the method for supervising of the access errors that one embodiment of the invention provides, according to this figure, each step be described in detail in detail as follows:
Step 101, read the access log file of server;
Wherein, described server is Apache Server, described in read the access log file of server, for:
Use tail-f order to read the access log file of described Apache Server.
Step 102, every a line content of mating described journal file, the daily record of searching access errors;
Wherein, in one embodiment of the invention, use tail-f order to read the access log file of described Apache Server under Apache Server, every a line content of the described journal file of described coupling, comprising:
Every a line content of access log file described in use matching regular expressions.
Wherein, described regular expression is write according to the form of described access log file.
Step 103, the daily record of described access errors is added to watch-list;
Wherein, described watch-list comprises:
Visitor's IP address, the IP address of the server of access, and the journal file of described access errors deposit path.
Step 104, the described watch-list of foundation are monitored described access errors.
Wherein, the described watch-list of described foundation is monitored described access errors, comprising:
According to the path of depositing of the journal file of described access errors, read the journal file of described access errors, and in conjunction with the IP address of described visitor's IP address and the server of described access, judge the reason of described access errors.
Described access errors former is because the IP address of the server of described access is incorrect, described visitor's network failure, or the server failure of described access.
The daily record of the access errors of wherein, mentioning in previous embodiment can be for recording the daily record of HTTP404 mistake.
The method for supervising of the access errors that the employing embodiment of the present invention provides, by every a line content of coupling journal file, search predetermined error log, without configuring different regular expressions according to the different-format of journal file, can improve significantly the versatility of log analysis, and then improve analysis efficiency; On the other hand, the mistake of discovery can be added in watch-list, to offer supervisory system and monitor in real time, solve the poor problem of existing log analysis real-time.
Figure 2 shows that the schematic flow sheet of the method for supervising of a kind of access errors that one embodiment of the invention provides.Following according to this figure, introduce the detailed process of access errors method for supervising.
The apache server of take under linux system in the present embodiment, describes as example.
Step 201, under linux system, use " tail – f " order to read the access log file (acess.log) of apache;
Step 202, use regular expression mate each row of log content, find out the daily record of all access 404 mistakes.Regular expression can be write according to the concrete form of access log;
Step 203, the daily record of 404 mistakes that match is added in watch-list, particularly, watch-list can replace by array, wherein can deposit visitor's IP, the file path of 404 mistakes etc.;
Step 204, supervisory system are monitored access errors in real time according to watch-list.
The method for supervising of the access errors that the employing embodiment of the present invention provides, by every a line content of coupling journal file, search predetermined error log, without configuring different regular expressions according to the different-format of journal file, can improve significantly the versatility of log analysis, and then improve analysis efficiency; On the other hand, the mistake of discovery can be added in watch-list, to offer supervisory system and monitor in real time, solve the poor problem of existing log analysis real-time.
Below introduce a kind of supervising device of access errors, in order to realize the method for supervising of disclosed access errors in previous embodiment.
Figure 3 shows that the structural representation of the supervising device of a kind of access errors that one embodiment of the invention provides.According to this figure, each ingredient that this device is described in detail in detail is as follows:
Reading unit 301, for reading the access log file of server;
Wherein, described server is Apache Server, and described reading unit reads the access log file of server, for:
Use tail-f order to read the access log file of described Apache Server.
Search unit 302, for mating every a line content of the described journal file that described reading unit 301 reads, the daily record of searching access errors;
Wherein, described in search the described journal file of unit 302 coupling every a line content, comprising:
Every a line content of access log file described in use matching regular expressions.
Watch-list generation unit 303, for adding watch-list by described daily record of searching the described access errors that unit 302 finds;
Wherein, described watch-list comprises:
Visitor's IP address, the IP address of the server of access, and the journal file of described access errors deposit path.
Monitoring unit 304, for the described watch-list generating according to described watch-list generation unit 303, monitors described access errors.
Described monitoring unit 304 is monitored described access errors according to described watch-list, comprising:
According to the path of depositing of the journal file of described access errors, read the journal file of described access errors, and in conjunction with the IP address of described visitor's IP address and the server of described access, judge the reason of described access errors.
Described access errors former is because the IP address of the server of described access is incorrect, described visitor's network failure, or the server failure of described access.
The method for supervising of the access errors that the employing embodiment of the present invention provides, by every a line content of coupling journal file, search predetermined error log, without configuring different regular expressions according to the different-format of journal file, can improve significantly the versatility of log analysis, and then improve analysis efficiency; On the other hand, the mistake of discovery can be added in watch-list, to offer supervisory system and monitor in real time, solve the poor problem of existing log analysis real-time.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of programmed instruction, aforesaid program can be stored in read/write memory medium, this program, when carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc, CD, network node, schedulers.
Finally it should be noted that: these are only the preferred embodiments of the present invention, be not limited to the present invention, although the present invention is had been described in detail with reference to previous embodiment, for a person skilled in the art, its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (14)

1. a method for supervising for access errors, is characterized in that, comprising:
Read the access log file of server;
Every a line content of mating described journal file, the daily record of searching access errors;
The daily record of described access errors is added to watch-list;
According to described watch-list, described access errors is monitored.
2. method according to claim 1, is characterized in that, described server is Apache Server, described in read the access log file of server, for:
Use tail-f order to read the access log file of described Apache Server.
3. method according to claim 2, is characterized in that, every a line content of the described journal file of described coupling, comprising:
Every a line content of access log file described in use matching regular expressions.
4. method according to claim 3, is characterized in that, described regular expression is write according to the form of described access log file.
5. method according to claim 1, is characterized in that, described watch-list comprises:
Visitor's IP address, the IP address of the server of access, and the journal file of described access errors deposit path.
6. method according to claim 5, is characterized in that, the described watch-list of described foundation is monitored described access errors, comprising:
According to the path of depositing of the journal file of described access errors, read the journal file of described access errors, and in conjunction with the IP address of described visitor's IP address and the server of described access, judge the reason of described access errors.
7. method according to claim 6, is characterized in that, described access errors former is because the IP address of the server of described access is incorrect, described visitor's network failure, or the server failure of described access.
8. according to the method described in any one in claim 1-7, it is characterized in that, the daily record of described access errors is HTTP404 error log.
9. a supervising device for access errors, is characterized in that, comprises;
Reading unit, for reading the access log file of server;
Search unit, for mating every a line content of the described journal file that described reading unit reads, the daily record of searching access errors;
Watch-list generation unit, for adding watch-list by described daily record of searching the described access errors that unit finds;
Monitoring unit, for the described watch-list generating according to described watch-list generation unit, monitors described access errors.
10. device according to claim 9, is characterized in that, described server is Apache Server, and described reading unit reads the access log file of server, for:
Use tail-f order to read the access log file of described Apache Server.
11. devices according to claim 10, is characterized in that, described in search journal file described in units match every a line content, comprising:
Every a line content of access log file described in use matching regular expressions.
12. devices according to claim 9, is characterized in that, described watch-list comprises:
Visitor's IP address, the IP address of the server of access, and the journal file of described access errors deposit path.
13. devices according to claim 12, is characterized in that, described monitoring unit is monitored described access errors according to described watch-list, comprising:
According to the path of depositing of the journal file of described access errors, read the journal file of described access errors, and in conjunction with the IP address of described visitor's IP address and the server of described access, judge the reason of described access errors.
14. devices according to claim 13, is characterized in that, described access errors former is because the IP address of the server of described access is incorrect, described visitor's network failure, or the server failure of described access.
CN201410063571.XA 2014-02-24 2014-02-24 Access error monitoring method and access error monitoring device Pending CN104182321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410063571.XA CN104182321A (en) 2014-02-24 2014-02-24 Access error monitoring method and access error monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410063571.XA CN104182321A (en) 2014-02-24 2014-02-24 Access error monitoring method and access error monitoring device

Publications (1)

Publication Number Publication Date
CN104182321A true CN104182321A (en) 2014-12-03

Family

ID=51963388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410063571.XA Pending CN104182321A (en) 2014-02-24 2014-02-24 Access error monitoring method and access error monitoring device

Country Status (1)

Country Link
CN (1) CN104182321A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105242969A (en) * 2015-11-11 2016-01-13 浪潮(北京)电子信息产业有限公司 Method for executing commands through multiple servers based on SSHxcute class library

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085667A1 (en) * 2001-06-12 2006-04-20 Koji Kubota Access log analyzer and access log analyzing method
CN102063360A (en) * 2010-11-29 2011-05-18 深圳市五巨科技有限公司 Remote server monitoring and warning method and device
CN102957550A (en) * 2011-08-23 2013-03-06 中兴通讯股份有限公司 System and method for alarming based on log detection
CN103248707A (en) * 2013-05-22 2013-08-14 北京奇虎科技有限公司 File access method, system and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085667A1 (en) * 2001-06-12 2006-04-20 Koji Kubota Access log analyzer and access log analyzing method
CN102063360A (en) * 2010-11-29 2011-05-18 深圳市五巨科技有限公司 Remote server monitoring and warning method and device
CN102957550A (en) * 2011-08-23 2013-03-06 中兴通讯股份有限公司 System and method for alarming based on log detection
CN103248707A (en) * 2013-05-22 2013-08-14 北京奇虎科技有限公司 File access method, system and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105242969A (en) * 2015-11-11 2016-01-13 浪潮(北京)电子信息产业有限公司 Method for executing commands through multiple servers based on SSHxcute class library

Similar Documents

Publication Publication Date Title
US11258814B2 (en) Methods and systems for using embedding from Natural Language Processing (NLP) for enhanced network analytics
EP3516657A1 (en) Methods and systems for endpoint device operating system in an asset intelligence platform
US20200364525A1 (en) Rf tag operating system with iot connector core
US20120099478A1 (en) Method and Device for Auto-Generating Goose Signal Connection Topology from Substation Level
CN105243159A (en) Visual script editor-based distributed web crawler system
US20080215389A1 (en) Model oriented business process monitoring
CN104598376A (en) Data driving layered automation test system and method
CN103793479A (en) Log management method and log management system
US11570214B2 (en) Crowdsourced innovation laboratory and process implementation system
CN102882710A (en) Cross-machine event log interrelation
CN109600258A (en) Industrial protocol message accounting device and method
CN103716174A (en) Test log acquisition system and method for the same
CN103268183A (en) Processing method and device for information report
CN102594618A (en) Method and device for realizing storage device test of storage area network (SAN)
CN104239353B (en) WEB classification control and log audit method
CN103544095A (en) Server program monitoring method and system of server program
CN103067198A (en) Method and system related to Cookie identity (ID) of user
Sanjappa et al. Analysis of logs by using logstash
CN105205167A (en) Log data system
CN103152391A (en) Journal output method and device
CN109510721A (en) A kind of network log management method and system based on Syslog
CN103109293A (en) User motion processing system and method
CN105207832A (en) Server stress testing method and device
CN103297485A (en) Distributed cache automatic management system and distributed cache automatic management method
US10089167B2 (en) Log file reduction according to problem-space network topology

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141203