CN106155852A - The collection method of Apache service error event and system - Google Patents
The collection method of Apache service error event and system Download PDFInfo
- Publication number
- CN106155852A CN106155852A CN201610491114.XA CN201610491114A CN106155852A CN 106155852 A CN106155852 A CN 106155852A CN 201610491114 A CN201610491114 A CN 201610491114A CN 106155852 A CN106155852 A CN 106155852A
- Authority
- CN
- China
- Prior art keywords
- service error
- apache service
- destination host
- apache
- test data
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
Abstract
The invention discloses the collection method of a kind of Apache service error event, including: send test data to destination host, and receive the target data that described destination host is replied;Obtain the conditional code in described target data;If detecting described destination host according to described conditional code Apache service error occurs, then generate Apache service error information;By the Apache service error event that described Apache service error information integration is predetermined file form, and store to data base;Visible, in the present embodiment, collect Apache service error event by sending test data to destination host, it is achieved that the collection of Apache service error event, prevent from causing Web site normally to use because Apache service makes a mistake;The invention also discloses the collection system of a kind of Apache service error event, above-mentioned technique effect can be realized equally.
Description
Technical field
The present invention relates to error event collection technique field, more particularly, it relates to a kind of Apache service error event
Collection method and system.
Background technology
Along with the progress in epoch, the fast development of the Internet, life style and quality to people bring the biggest changing
Become.Either live, learn or work and all be unable to do without the Internet and computer.The Internet culture greatly meets the need of people
Ask, widened thinking and the visual field of people simultaneously, substantial amounts of document and data can be inquired about, improved traditional learning style.
Everyone can browse webpage, and generally providing such service is Apache service.Apache supports numerous characteristics, safety, visit
Ask that speed is main characteristic soon because it again performance all ratios in terms of function, performance and safety more prominent, can be preferable
The application demand meeting Web server user.Therefore, how to collect the error event of Apache service, prevent because of Apache
Service makes a mistake and causes Web site normally to use, be those skilled in the art need solve problem.
Summary of the invention
It is an object of the invention to provide collection method and the system of a kind of Apache service error event, to realize collecting
Apache service error event, prevents from causing Web site normally to use because Apache service makes a mistake.
For achieving the above object, following technical scheme is embodiments provided:
A kind of collection method of Apache service error event, including:
Send test data to destination host, and receive the target data that described destination host is replied;
Obtain the conditional code in described target data;
If detecting described destination host according to described conditional code Apache service error occurs, then generate Apache service mistake
False information;
By the Apache service error event that described Apache service error information integration is predetermined file form, and store
To data base.
Wherein, before destination host sends test data, also include:
Verify whether the network to described destination host transmission test data can be with proper communication;
If of course, then sending test data to destination host.
Wherein, send test data to destination host, and receive the target data that described destination host is replied, including:
Create socket descriptor, and send the test data of relief area to described destination host;Wherein, described test number
According to including described socket descriptor;
Receive the target data that described destination host is replied, and described target data is copied to buff from described relief area
In.
Wherein, by the Apache service error event that described Apache service error information integration is predetermined file form,
And store to data base, including:
Extract the critical data of described Apache service error information, and be integrated into the Apache service of predetermined file form
Error event, stores to data base.
Wherein, if detecting described destination host according to described conditional code Apache service error occurs, including:
Interval range according to described conditional code, it is judged that whether described destination host Apache service error occurs;Wherein,
Described Apache service error includes: client end mistake, server end mistake.
Wherein, also include:
Generate the journal file collecting described Apache service error event.
Wherein, described Apache service error event is stored to data base, also includes:
Described Apache service error event is sent to fault detection system as event source.
A kind of collection system of Apache service error event, including:
Sending module, for sending test data to destination host;
Receiver module, for receiving the target data that described destination host is replied;
Acquisition module, for obtaining the conditional code in described target data;
, there is Apache service error for detecting described destination host according to described conditional code in error message generation module
Time, generate Apache service error information;
Memory module, for servicing mistake by the Apache that described Apache service error information integration is predetermined file form
Cause delay part, and store to data base.
Wherein, also include:
Whether authentication module, can be with proper communication to the network of described destination host transmission test data for checking;If
Of course, then trigger described sending module and send test data to destination host.
Wherein, also include:
Journal file generation module, for generating the journal file collecting described Apache service error event.
By above scheme, the collection method of a kind of Apache service error event that the embodiment of the present invention provides,
Including: send test data to destination host, and receive the target data that described destination host is replied;Obtain described target data
In conditional code;If detecting described destination host according to described conditional code Apache service error occurs, then generate Apache clothes
Business error message;By the Apache service error event that described Apache service error information integration is predetermined file form, and
Store to data base;Visible, in the present embodiment, collect Apache service error by sending test data to destination host
Event, it is achieved that the collection of Apache service error event, prevents from causing the Web site cannot be just because Apache service makes a mistake
Often use;The invention also discloses the collection system of a kind of Apache service error event, above-mentioned technique effect can be realized equally.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to
Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the collection method schematic flow sheet of a kind of Apache service error event disclosed in the embodiment of the present invention;
Fig. 2 is the collection system structural representation of a kind of Apache service error event disclosed in the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise
Embodiment, broadly falls into the scope of protection of the invention.
The embodiment of the invention discloses collection method and the system of a kind of Apache service error event, to realize collecting
Apache service error event, prevents from causing Web site normally to use because Apache service makes a mistake.
See Fig. 1, the collection method of a kind of Apache service error event that the embodiment of the present invention provides, including:
S101, to destination host send test data, and receive described destination host reply target data;
Wherein, before destination host sends test data, also include:
Verify whether the network to described destination host transmission test data can be with proper communication;
If of course, then sending test data to destination host.
Concrete, in the present embodiment before destination host sends test data, need according to destination host and port
Checking network whether up to, if up to, send test data to destination host the most again.
Wherein, send test data to destination host, and receive the target data that described destination host is replied, including:
Create socket descriptor, and send the test data of relief area to described destination host;Wherein, described test number
According to including described socket descriptor;
Receive the target data that described destination host is replied, and described target data is copied to buff from described relief area
In.
Concrete, in the present embodiment, by creating socket descriptor and sending the data in relief area, then receive buffering
In data copy to buff in district, finally by obtaining conditional code, obtain error message, example according to the interval range of conditional code
Such as client end mistake, server end mistake etc..
S102, the conditional code obtained in described target data;
If S103 detects described destination host according to described conditional code Apache service error occurs, then generate Apache
Service error information;
Wherein, if detecting described destination host according to described conditional code Apache service error occurs, including:
Interval range according to described conditional code, it is judged that whether described destination host Apache service error occurs;Wherein,
Described Apache service error includes: client end mistake, server end mistake.
S104, by the Apache service error event that described Apache service error information integration is predetermined file form,
And store to data base.
Wherein, by the Apache service error event that described Apache service error information integration is predetermined file form,
And store to data base, including:
Extract the critical data of described Apache service error information, and be integrated into the Apache service of predetermined file form
Error event, stores to data base.
Concrete, integrate according to the critical data extracted in Apache service error in the present embodiment, set system
One error event form, such as ereport.service.network.apache.network_unreachable, generates
Apache service error event.
Based on technique scheme, this programme also includes:
Generate the journal file collecting described Apache service error event.
Based on technique scheme, described Apache service error event is stored to data base, also includes by this programme:
Described Apache service error event is sent to fault detection system as event source.
Concrete, the well-known Web site great majority built by linux at present be all employ Apache and service, and it has
The advantage that safety, access speed are fast, can preferably meet the application demand of Web server user.Therefore, collect in linux
The error event that Apache service occurs is critically important, and user can classify according to event and process, and prevents
Because Apache service makes a mistake the phenomenon causing Web site normally to use, and the application have employed and takes Apache
The error event that business is collected carries out being managed collectively and following the mode of same form, it is ensured that Apache service error thing in linux
The collection management of part, the most in the future process to Apache service error event.
The collection system provided the embodiment of the present invention below is introduced, and collection system described below is with described above
Collection method can be cross-referenced.
See Fig. 2, the collection system of a kind of Apache service error event that the embodiment of the present invention provides, including:
Sending module 100, for sending test data to destination host;
Receiver module 200, for receiving the target data that described destination host is replied;
Acquisition module 300, for obtaining the conditional code in described target data;
For detecting described destination host according to described conditional code, error message generation module 400, occurs that Apache services
During mistake, generate Apache service error information;
Memory module 500, for taking the Apache that described Apache service error information integration is predetermined file form
Business error event, and store to data base.
Based on technique scheme, this programme also includes:
Whether authentication module, can be with proper communication to the network of described destination host transmission test data for checking;If
Of course, then trigger described sending module and send test data to destination host.
Based on technique scheme, this programme also includes:
Journal file generation module, for generating the journal file collecting described Apache service error event.
The collection method of a kind of Apache service error event that the embodiment of the present invention provides, including: send out to destination host
Send test data, and receive the target data that described destination host is replied;Obtain the conditional code in described target data;If according to
Described conditional code detects described destination host and Apache service error occurs, then generate Apache service error information;By described
Apache service error information integration is the Apache service error event of predetermined file form, and stores to data base;It is visible,
In the present embodiment, by collecting Apache service error event to destination host transmission test data, it is achieved that Apache
The collection of service error event, prevents from causing Web site normally to use because Apache service makes a mistake;The present invention also public affairs
Open the collection system of a kind of Apache service error event, above-mentioned technique effect can have been realized equally.
In this specification, each embodiment uses the mode gone forward one by one to describe, and what each embodiment stressed is and other
The difference of embodiment, between each embodiment, identical similar portion sees mutually.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses the present invention.
Multiple amendment to these embodiments will be apparent from for those skilled in the art, as defined herein
General Principle can realize without departing from the spirit or scope of the present invention in other embodiments.Therefore, the present invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and principles disclosed herein and features of novelty phase one
The widest scope caused.
Claims (10)
1. the collection method of an Apache service error event, it is characterised in that including:
Send test data to destination host, and receive the target data that described destination host is replied;
Obtain the conditional code in described target data;
If detecting described destination host according to described conditional code Apache service error occurs, then generate Apache service error letter
Breath;
By the Apache service error event that described Apache service error information integration is predetermined file form, and store to number
According to storehouse.
Collection method the most according to claim 1, it is characterised in that before destination host sends test data, also wrap
Include:
Verify whether the network to described destination host transmission test data can be with proper communication;
If of course, then sending test data to destination host.
Collection method the most according to claim 2, it is characterised in that send test data to destination host, and receive institute
State the target data that destination host is replied, including:
Create socket descriptor, and send the test data of relief area to described destination host;Wherein, in described test data
Including described socket descriptor;
Receive the target data that described destination host is replied, and described target data is copied to buff from described relief area.
Collection method the most according to claim 3, it is characterised in that be pre-by described Apache service error information integration
Determine the Apache service error event of file format, and store to data base, including:
Extract the critical data of described Apache service error information, and be integrated into the Apache service error of predetermined file form
Event, stores to data base.
Collection method the most according to claim 4, it is characterised in that if detecting described destination host according to described conditional code
Apache service error occurs, including:
Interval range according to described conditional code, it is judged that whether described destination host Apache service error occurs;Wherein, described
Apache service error includes: client end mistake, server end mistake.
6. according to the collection method described in any one in claim 1-5, it is characterised in that also include:
Generate the journal file collecting described Apache service error event.
Collection method the most according to claim 6, it is characterised in that described Apache service error event is stored to number
According to storehouse, also include:
Described Apache service error event is sent to fault detection system as event source.
8. the collection system of an Apache service error event, it is characterised in that including:
Sending module, for sending test data to destination host;
Receiver module, for receiving the target data that described destination host is replied;
Acquisition module, for obtaining the conditional code in described target data;
Error message generation module, during for Apache service error occurring according to described conditional code detection described destination host,
Generate Apache service error information;
Memory module, for by Apache service error thing that described Apache service error information integration is predetermined file form
Part, and store to data base.
Collection system the most according to claim 8, it is characterised in that also include:
Whether authentication module, can be with proper communication to the network of described destination host transmission test data for checking;If of course,
Then trigger described sending module and send test data to destination host.
Collection system the most according to claim 9, it is characterised in that also include:
Journal file generation module, for generating the journal file collecting described Apache service error event.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610491114.XA CN106155852A (en) | 2016-06-28 | 2016-06-28 | The collection method of Apache service error event and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610491114.XA CN106155852A (en) | 2016-06-28 | 2016-06-28 | The collection method of Apache service error event and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106155852A true CN106155852A (en) | 2016-11-23 |
Family
ID=57350286
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610491114.XA Pending CN106155852A (en) | 2016-06-28 | 2016-06-28 | The collection method of Apache service error event and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106155852A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101217425A (en) * | 2008-01-04 | 2008-07-09 | 中兴通讯股份有限公司 | Web testing method and device |
CN102937931A (en) * | 2012-09-25 | 2013-02-20 | 北京奇虎科技有限公司 | Method and system of log data transmission |
CN103051500A (en) * | 2013-01-04 | 2013-04-17 | 北京邮电大学 | Test method and system of service network system |
US20140325661A1 (en) * | 2011-01-26 | 2014-10-30 | Viaforensics, Llc | Systems, methods, apparatuses, and computer program products for forensic monitoring |
CN105281948A (en) * | 2015-09-08 | 2016-01-27 | 小米科技有限责任公司 | Event processing method and apparatus |
CN105471665A (en) * | 2014-08-21 | 2016-04-06 | 北京奇虎科技有限公司 | Website function testing method, website function testing system and website server |
-
2016
- 2016-06-28 CN CN201610491114.XA patent/CN106155852A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101217425A (en) * | 2008-01-04 | 2008-07-09 | 中兴通讯股份有限公司 | Web testing method and device |
US20140325661A1 (en) * | 2011-01-26 | 2014-10-30 | Viaforensics, Llc | Systems, methods, apparatuses, and computer program products for forensic monitoring |
CN102937931A (en) * | 2012-09-25 | 2013-02-20 | 北京奇虎科技有限公司 | Method and system of log data transmission |
CN103051500A (en) * | 2013-01-04 | 2013-04-17 | 北京邮电大学 | Test method and system of service network system |
CN105471665A (en) * | 2014-08-21 | 2016-04-06 | 北京奇虎科技有限公司 | Website function testing method, website function testing system and website server |
CN105281948A (en) * | 2015-09-08 | 2016-01-27 | 小米科技有限责任公司 | Event processing method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1937589B (en) | Routing configuration validation apparatus and methods | |
US8792385B2 (en) | Method and device for auto-generating goose signal connection topology from substation level | |
CN104980289B (en) | Information push method, device and system | |
CN106778260A (en) | Attack detection method and device | |
CN105991412A (en) | Method and device for pushing message | |
CN108712457A (en) | Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys | |
CN102148844A (en) | Memory leak positioning method, server, client and system | |
CN105657677A (en) | Short message sending method, short message gateway and service platform | |
KR101329034B1 (en) | System and method for collecting url information using retrieval service of social network service | |
CN109495383A (en) | A kind of data processing method, device, communication system and the network equipment | |
CN109495530A (en) | A kind of real time traffic data transmission method, transmitting device and Transmission system | |
CN109525645A (en) | A kind of method and system for collecting the log of distributed storage cluster | |
CN103995901B (en) | A kind of method for determining back end failure | |
CN104348905B (en) | A kind of method and device of off-line PUSH message | |
CN103634166A (en) | Equipment survival detection method and equipment survival detection device | |
CN103023704B (en) | Virtual network service equipment access method and system | |
CN102932209A (en) | Method and device for detecting state of server cluster | |
CN109803030A (en) | A kind of anonymity intermediate proxy server and its communication means | |
CN103888435A (en) | Service admission control method, device and system | |
US9172607B2 (en) | Transmitting of configuration items within a network | |
CN106155852A (en) | The collection method of Apache service error event and system | |
CN106294058A (en) | The target strategy processing problems of operation document determines method and device | |
US20100268784A1 (en) | Data synchronization system and method | |
CN103457934B (en) | Virus defense method based on gateway device, gateway device and server | |
CN106452861B (en) | A kind of method and apparatus of synchronizing information |
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 |
Application publication date: 20161123 |
|
RJ01 | Rejection of invention patent application after publication |