Movatterモバイル変換


[0]ホーム

URL:


CN106055608B - The method and apparatus of automatic collection and analysis interchanger log - Google Patents

The method and apparatus of automatic collection and analysis interchanger log
Download PDF

Info

Publication number
CN106055608B
CN106055608BCN201610355156.0ACN201610355156ACN106055608BCN 106055608 BCN106055608 BCN 106055608BCN 201610355156 ACN201610355156 ACN 201610355156ACN 106055608 BCN106055608 BCN 106055608B
Authority
CN
China
Prior art keywords
log
switch
logs
interchanger
analyzing
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.)
Active
Application number
CN201610355156.0A
Other languages
Chinese (zh)
Other versions
CN106055608A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co LtdfiledCriticalBeijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201610355156.0ApriorityCriticalpatent/CN106055608B/en
Publication of CN106055608ApublicationCriticalpatent/CN106055608A/en
Application grantedgrantedCritical
Publication of CN106055608BpublicationCriticalpatent/CN106055608B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

This application discloses the method and apparatus of a kind of automatic collection and analysis interchanger log.One specific embodiment of the method includes: to acquire the log that all interchangers generate in Internet data center;By the log according to scheduled rule-based filtering, retain the log for meeting scheduled rule;It carries out structuring to the log of the reservation to handle to form structural data, wherein the structural data includes: interchanger ID, timestamp, type of message and detail message;By the structured data transfer into storage equipment;Analyze the structural data in the storage equipment.The embodiment realizes automation collection, transmission, storage, structuring, inquiry and the analysis of interchanger log.

Description

The method and apparatus of automatic collection and analysis interchanger log
Technical field
This application involves field of computer technology, and in particular to Internet technical field more particularly to automatic collection and pointThe method and apparatus for analysing interchanger log.
Background technique
With the explosive increase of internet data and increasing for business, many Internet enterprises are to the throwing from establishing networkEnter also increasing, the network equipment being related in IDC (Internet Data Center, Internet data center) is also more nextIt is more, especially switch device.
Interchanger log is the significant data that switch device generates in time to live, can be obtained by interchanger logThe state for taking interchanger, shake, board faults, power failure of shake, agreement including port etc., and traditional monitoring of toolsSystem is all based on interchanger log, by specific rule match log, to find fault point and alarm.InterchangerLog analysis problems faced is huge and physical location dispersion, the complication of device model of scale, engineer's troubleshootingWhen need one by one logging device check log, and rubbish log present on equipment can severe jamming troubleshooting efficiency.Existing prisonControl system carries out real-time matching to log, and off-line data can discard, and it is very likely that there is valences in this part off-line dataThe information of value.
Summary of the invention
The purpose of the application is to propose the method and apparatus of a kind of automatic collection and analysis interchanger log, come solve withThe technical issues of upper background technology part is mentioned.
In a first aspect, this application provides a kind of methods of automatic collection and analysis interchanger log, which comprisesAcquire the log that all interchangers generate in Internet data center;By the log according to scheduled rule-based filtering, apertureClose the log of scheduled rule;It carries out structuring to the log of the reservation to handle to form structural data, wherein the knotStructure data include: interchanger ID, timestamp, type of message and detail message;The structured data transfer is set to storageIn standby;Analyze the structural data in the storage equipment.
In some embodiments, the log to the reservation carries out structuring processing to form structural data, wrapsIt includes: parsing interchanger ID and timestamp from the log of the reservation;Remove interchanger ID in the log of the reservation andTimestamp;Participle duplicate removal is carried out to the log using Lucene;Using clustering algorithm by the day with identical structure or meaningWill is divided into one kind to extract type of message and detail message.
In some embodiments, the log that all interchangers generate in the acquisition Internet data center, comprising: pass throughTwo Core servers acquire the log that all interchangers generate in the Internet data center, wherein two coresServer is mutually redundant and supports breakpoint transmission.
In some embodiments, it is described by the structured data transfer into storage equipment, comprising: using there are twoThe flume framework of transmission node, described two transmission nodes share a virtual IP address.
In some embodiments, the storage equipment includes MySQL database and Hadoop distributed file system.
In some embodiments, the structural data in the analysis storage equipment, comprising: by describedMySQL database inquires the real-time architecture data of the interchanger in the predetermined time;Pass through the distributed text of the HadoopPart system analyzes the log size of the interchanger, alerts friendship if the log size of the interchanger is greater than threshold valueIt changes planes exception.
Second aspect, this application provides the devices of a kind of automatic collection and analysis interchanger log, which is characterized in that instituteStating device includes: acquisition unit, is configured to the log that all interchangers generate in acquisition Internet data center;Filtering is singleMember is configured to the log retaining the log for meeting scheduled rule according to scheduled rule-based filtering;Structuring unit,It is configured to the log to the reservation and carries out structuring processing to form structural data, wherein the structural data packetIt includes: interchanger ID, timestamp, type of message and detail message;Transmission unit is configured to arrive the structured data transferIt stores in equipment;Analytical unit is configured to analyze the structural data in the storage equipment.
In some embodiments, the structuring unit is configured to: parsing interchanger from the log of the reservationID and timestamp;Remove interchanger ID and the timestamp in the log of the reservation;The log is divided using LuceneWord duplicate removal;Clustering algorithm is used to be divided into the log with identical structure or meaning a kind of to extract type of message and disappear in detailBreath.
In some embodiments, the acquisition unit is further configured to: by described in two Core server acquisitionsThe log that all interchangers generate in Internet data center, wherein two Core servers are mutually redundant and support to breakPoint resumes.
In some embodiments, the transmission unit is configured to: it uses there are the flume framework of two transmission nodes,Described two transmission nodes share a virtual IP address.
In some embodiments, the storage equipment includes MySQL database and Hadoop distributed file system.
In some embodiments, the analytical unit is further configured to: being inquired by the MySQL database predeterminedThe real-time architecture data of the interchanger in time;By the Hadoop distributed file system to the interchangerLog size is analyzed, and interchanger exception is alerted if the log size of the interchanger is greater than threshold value.
The method and apparatus of automatic collection provided by the present application and analysis interchanger log, by acquisition internet dataThe log that intracardiac all interchangers generate, formation structural data is transferred to storage again after the log is carried out cleaning pretreatmentIn equipment, and the structural data in the storage equipment is analyzed, can be good at handling extensive polytypic complexity and setThe acquisition of interchanger log statistic, structuring and concentration under standby environment check, analyze the O&M for being able to ascend O&M engineerEfficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is otherFeature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for the automatic collection and analysis interchanger log of the application;
Fig. 3 is the signal according to an application scenarios of the method for the automatic collection and analysis interchanger log of the applicationFigure;
Fig. 4 is the process according to another embodiment of the method for the automatic collection and analysis interchanger log of the applicationFigure;
Fig. 5 is the structural representation according to one embodiment of the device of the automatic collection and analysis interchanger log of the applicationFigure;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouchedThe specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order toConvenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phaseMutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the automatic collection that can apply the application and the method for analyzing interchanger log or automatic collection and dividesAnalyse the exemplary system architecture 100 of the embodiment of the device of interchanger log.
As shown in Figure 1, system architecture 100 may include interchanger 101,102,103, network 104 and server 105.NetNetwork 104 between interchanger 101,102,103 and server 105 to provide the medium of communication link.Network 104 may includeVarious connection types, such as wired, wireless communication link or fiber optic cables etc..
The log of interchanger 101,102,103 is transferred to server 105 by network 104.On interchanger 101,102,103The client of various log collection tools can be installed, such as be equipped with and can be transferred to its internal log information remotelyLog server rsyslog etc..
Interchanger 101,102,103, which can be, provides the electric signal exclusively enjoyed for any two network node of access switchThe network equipment of access, including but not limited to Ethernet switch, fast ethernet switch, gigabit ethernet switch,FDDI interchanger, ATM switch and token ring switch etc..
Server 105 can be to provide the server of various services, such as the log of acquisition interchanger 101,102,103,Structuring, storage, analysis are carried out to collected log.
It should be noted that automatic collection provided by the embodiment of the present application and analysis interchanger log method generally byServer 105 executes, and correspondingly, the device of automatic collection and analysis interchanger log is generally positioned in server 105.
It should be understood that the number of interchanger, network and server in Fig. 1 is only schematical.According to realize needs,It can have any number of interchanger, network and server.
With continued reference to Fig. 2, a reality of the method for the automatic collection and analysis interchanger log according to the application is shownApply the process 200 of example.The method of the automatic collection and analysis interchanger log, comprising the following steps:
Step 201, the log that all interchangers generate in Internet data center is acquired.
In the present embodiment, automatic collection and analysis interchanger log method operation thereon electronic equipment (such asServer shown in FIG. 1) log collection tool can be passed through from internet by wired connection mode or radio connectionAll interchangers acquire interchanger log in data center.
In some optional implementations of the present embodiment, the internet data is acquired by two Core serversThe log that all interchangers generate in center, wherein two Core servers are mutually redundant and support breakpoint transmission.ExampleIt such as, can be by collected interchanger log buffer in local, after network recovery again in the case where there is network failureBreakpoint transmission is carried out, maximum disaster tolerance can be 200,000 logs.
Step 202, log is retained into the log for meeting scheduled rule according to scheduled rule-based filtering.
In the present embodiment, after log being filtered out to useless log, then carry out log transmission, for example, filter out byA large amount of useless logs caused by BUG.
Step 203, structuring is carried out to the log of reservation to handle to form structural data.
In the present embodiment, the log retained after filtering can be carried out to structuring to handle to form structural data,In, the structural data includes: interchanger ID, timestamp, type of message and detail message.
Step 204, by structured data transfer into storage equipment.
In the present embodiment, by structured data transfer into storage equipment.Wherein the storage equipment can be Fig. 1 instituteThe server shown is also possible to other remote servers
It is described using there are the flume framework of two transmission nodes in some optional implementations of the present embodimentTwo transmission nodes share a virtual IP address, realize load balancing and disaster tolerance.
In some optional implementations of the present embodiment, the storage equipment includes MySQL database and HadoopDistributed file system.For example, MySQL database is used to save one week time, rule of thumb, line is also substantially checked within one weekThe maximum time window of upper problem
Step 205, the structural data in analysis storage equipment.
In the present embodiment, the structural data in analysis storage equipment.In order to promote the troubleshooting efficiency of O&M engineer,The log of all structurings can be provided and uniformly check entrance.After the log of all devices is focused on storage equipment, takeLog unified query platform is built, O&M engineer can check any one computer room, a kind of model, an equipment any time periodDetail message.For example, counted to the scale of Web logs of each switch device, by scale anomaly there may beThe switch device of problem.If the scale of Web logs of an equipment is abnormal, it is more likely that be to open DEBUG mode or interchangerThere are BUG.Therefore, it is necessary to handle these equipment in time, interference of the rubbish log to engineer's troubleshooting is reduced.
In some optional implementations of the present embodiment, inquired in the predetermined time by the MySQL databaseThe real-time architecture data of the interchanger;By the Hadoop distributed file system to the log size of the interchangerIt is analyzed, interchanger exception is alerted if the log size of the interchanger is greater than threshold value.
With continued reference to the applied field that Fig. 3, Fig. 3 are according to the method for the automatic collection and analysis interchanger log of the present embodimentOne schematic diagram of scape.In the application scenarios of Fig. 3, log collection unit 302 acquires the log of multiple switch 301, will adoptStorage equipment MySQL304 and HDFS (Hadoop distribution are transferred to by log transmission unit 303 after the log filtering collectedFile system) in 305.Structuring log in MySQL304 is inquired for engineer, and the log in HDFS can be used for carrying out logIt analyzes and provides original off-line data for offline excavation, log compression algorithm.
The method provided by the above embodiment of the application passes through to the automation collection of interchanger log, transmission, storage, knotStructure, inquiry and analysis, can be good at handling under extensive polytypic complex device environment log statistic acquisition, structureThe O&M efficiency changed and statistics is concentrated to check, be able to ascend O&M engineer.
With further reference to Fig. 4, it illustrates another embodiments of automatic collection and the method for analysis interchanger logProcess 400.The process 400 of the automatic collection and the method for analysis interchanger log, comprising the following steps:
Step 401, the log that all interchangers generate in Internet data center is acquired.
Step 402, log is retained into the log for meeting scheduled rule according to scheduled rule-based filtering.
Step 401-402 is identical with step 201-202, therefore repeats no more.
Step 403, interchanger ID and timestamp are parsed from the log of reservation.
In the present embodiment, interchanger ID and timestamp are parsed from the log of reservation, as shown in table 1.
Original interchanger log is unstructured data, can not directly carry out the statistic of classification of log, and structuringDifficult point is the diversification of the format under complicated interchanger model.It is structured that treated that structural data is as shown in table 1:
Table 1
Wherein, interchanger ID is the unique identification of switch device, and generalling use management IP and title indicates, as well asIts attaching relation, as shown in table 2:
IDCManage IPTitleArea type
xxx192.168.x.xxx-xx-xx-xx.IntINT_SWITCH
xxx192.168.x.xxx-xx-xx-xx.ExtINT_SWITCH
xxx192.168.x.xxx-xx-xx-xx.AdminINT_SWITCH
Table 2
Wherein, managing IP and title can be extracted using general regular expression, and IDC and area type needs are passingLabel (using the journal formatting function of Rsyslog) is added to log when defeated.
Step 404, interchanger ID and the timestamp in the log of reservation are removed.
In the present embodiment, interchanger ID and the timestamp in the log of reservation are removed.
The difficult point of formatting first is that offseting the extraction of breath type, the message type format of each model interchanger is not unitedOne in addition the interchanger journal formats of same model different editions can also have any different.In order to solve this problem, we are right firstThe interchanger of same model is pre-processed, removal variable (number, management IP, title, timestamp etc.).
Step 405, participle duplicate removal is carried out to log using Lucene.
In the present embodiment, participle duplicate removal is carried out to log using Lucene.Lucene is a famous Open-Source Tools,It can use the tool to be segmented.The log for removing variable is inputted into the tool, then can export word segmentation result.
Step 406, use clustering algorithm that the log with identical structure or meaning is divided into one kind to extract type of messageStructural data is formed with detail message.
In the present embodiment, Term Frequency-Inverse Document is extracted to pretreated dataFrequency (TF-IDF) simultaneously converts numerical value for log text, using K-means algorithm cluster, will have identical structure orThe log of meaning is divided into one kind, then extracts the regular expression of type of message, as shown in table 3:
Table 3
Then, the type of message in log is extracted using the regular expression of type of message.
When extracting detail message, need to reject all structured parts from original log, while needing to locateSome spcial characters, such as * .% etc. at log beginning are managed, detail message is as shown in table 4:
Detail message
Interface ethernet 1/2/2,state up
VLAN 4094Port 1/2/2State->BLOCKING(PortDown)
2/3optic rx power low alarm
Optic is not Foundry qualified(port 7)
Table 4
Step 407, by structured data transfer into storage equipment.
Step 408, the structural data in analysis storage equipment.
Step 407-408 is identical as step 204-205, therefore repeats no more.
Figure 4, it is seen that automatic collection and analysis exchange compared with the corresponding embodiment of Fig. 2, in the present embodimentThe process 400 of the method for machine log, which is highlighted, carries out the step of structuring processing is to form structural data to log.As a result, originallyThe scheme of embodiment description can carry out log processing for the different switch devices of multiple manufacturers, carry out unified structureChange convenient for log is inquired and analyzed.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of automatic collection andOne embodiment of the device of interchanger log is analyzed, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, the dressSetting specifically can be applied in various electronic equipments.
As shown in figure 5, automatic collection described in the present embodiment and the device 500 of analysis interchanger log include: that acquisition is singleMember 501, filter element 502, structuring unit 503, transmission unit 504 and analytical unit 505.Wherein, acquisition unit 501 configuresFor acquiring the log that all interchangers generate in Internet data center;Filter element 502 be configured to by the log byAccording to scheduled rule-based filtering, retain the log for meeting scheduled rule;Structuring unit 503 is configured to the day to the reservationWill carries out structuring processing to form structural data, wherein the structural data includes: interchanger ID, timestamp, messageType and detail message;Transmission unit 504 is configured to the structured data transfer into storage equipment;Analytical unit505 are configured to analyze the structural data in the storage equipment.
In the present embodiment, collected log is sent to filter element 502 and filtered by acquisition unit 501.Structuring listThe filtered log of filter element 502 is carried out structuring processing and is transferred to analytical unit 505 by transmission unit 504 again by member 503.
In some optional implementations of the present embodiment, the structuring unit 503 is configured to: from the reservationLog in parse interchanger ID and timestamp;Remove interchanger ID and the timestamp in the log of the reservation;UsingLucene carries out participle duplicate removal to the log;Use clustering algorithm by the log with identical structure or meaning be divided into it is a kind of withExtract type of message and detail message.
In some optional implementations of the present embodiment, the acquisition unit 501 is further configured to: by twoPlatform Core server acquires the log that all interchangers generate in the Internet data center, wherein two cores clothesBusiness device is mutually redundant and supports breakpoint transmission.
In some optional implementations of the present embodiment, the transmission unit 504 is configured to: using there are twoThe flume framework of transmission node, described two transmission nodes share a virtual IP address.
In some optional implementations of the present embodiment, the storage equipment includes MySQL database and HadoopDistributed file system.
In some optional implementations of the present embodiment, the analytical unit 505 is further configured to: passing through instituteState the real-time architecture data of the interchanger in the MySQL database inquiry predetermined time;It is distributed by the HadoopFile system analyzes the log size of the interchanger, alerts if the log size of the interchanger is greater than threshold valueInterchanger is abnormal.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the server for being suitable for being used to realize the embodiment of the present applicationStructural schematic diagram.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored inProgram in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 andExecute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to alwaysLine 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathodeThe output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as becauseThe network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such asDisk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereonComputer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart descriptionSoftware program.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in machine readableComputer program on medium, the computer program include the program code for method shown in execution flow chart.At thisIn the embodiment of sample, which can be downloaded and installed from network by communications portion 609, and/or from removableMedium 611 is unloaded to be mounted.When the computer program is executed by central processing unit (CPU) 601, execute in the present processesThe above-mentioned function of limiting.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journeyThe architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generationA part of one module, program segment or code of table, a part of the module, program segment or code include one or moreExecutable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in boxThe function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practicalOn can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wantsIt is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke YiyongThe dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computerThe combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hardThe mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packetInclude acquisition unit, filter element, structuring unit, transmission unit and analytical unit.Wherein, the title of these units is in certain feelingsThe restriction to the unit itself is not constituted under condition, for example, acquisition unit is also described as " acquisition Internet data centerThe unit for the log that interior all interchangers generate ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculatingMachine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;It is also possible toIndividualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is depositedOne or more program is contained, when one or more of programs are executed by an equipment, so that the equipment: acquisitionThe log that all interchangers generate in Internet data center;By the log according to scheduled rule-based filtering, reservation meets pre-The log of fixed rule;It carries out structuring to the log of the reservation to handle to form structural data, wherein the structuringData include: interchanger ID, timestamp, type of message and detail message;By the structured data transfer into storage equipment;Analyze the structural data in the storage equipment.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the artMember is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristicScheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent featureAny combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed hereinCan technical characteristic replaced mutually and the technical solution that is formed.

Claims (10)

Translated fromChinese
1.一种自动采集和分析交换机日志的方法,其特征在于,所述方法包括:1. A method for automatically collecting and analyzing switch logs, wherein the method comprises:采集互联网数据中心内所有交换机产生的日志;Collect logs generated by all switches in the Internet data center;将所述日志按照预定的规则过滤,保留符合预定的规则的日志;Filter the logs according to predetermined rules, and keep logs that meet the predetermined rules;对所述保留的日志进行结构化处理以形成结构化数据,其中,所述结构化数据包括:交换机ID、时间戳、消息类型和详细消息;performing structured processing on the retained log to form structured data, wherein the structured data includes: switch ID, timestamp, message type and detailed message;将所述结构化数据传输到存储设备中;transferring the structured data to a storage device;分析所述存储设备中的所述结构化数据;analyzing the structured data in the storage device;其中,所述对所述保留的日志进行结构化处理以形成结构化数据,包括:Wherein, performing structured processing on the reserved logs to form structured data includes:从所述保留的日志中解析出交换机ID和时间戳;Parse out the switch ID and timestamp from the retained log;去除所述保留的日志中的交换机ID和时间戳;remove the switch ID and timestamp in the retained log;采用Lucene对所述日志进行分词去重;Use Lucene to perform word segmentation and deduplication on the log;采用聚类算法将具有相同结构或含义的日志分成一类以提取消息类型和详细消息。A clustering algorithm is used to classify logs with the same structure or meaning into one category to extract message types and detailed messages.2.根据权利要求1所述的自动采集和分析交换机日志的方法,其特征在于,所述采集互联网数据中心内所有交换机产生的日志,包括:2. the method for automatically collecting and analyzing switch log according to claim 1, is characterized in that, described collecting the log that all switches in the Internet data center generate, comprising:通过两台核心服务器采集所述互联网数据中心内所有交换机产生的日志,其中,所述两台核心服务器互为冗余并支持断点续传。Logs generated by all switches in the Internet data center are collected through two core servers, wherein the two core servers are redundant with each other and support resuming transmission from a breakpoint.3.根据权利要求1所述的自动采集和分析交换机日志的方法,其特征在于,所述将所述结构化数据传输到存储设备中,包括:3. The method for automatically collecting and analyzing switch logs according to claim 1, wherein the transmitting the structured data to a storage device comprises:采用存在两个传输节点的flume架构,所述两个传输节点共用一个虚拟IP。A flume architecture with two transit nodes is adopted, and the two transit nodes share a virtual IP.4.根据权利要求1所述的自动采集和分析交换机日志的方法,其特征在于,所述存储设备包括MySQL数据库和Hadoop分布式文件系统。4. The method for automatically collecting and analyzing switch logs according to claim 1, wherein the storage device comprises a MySQL database and a Hadoop distributed file system.5.根据权利要求4所述的自动采集和分析交换机日志的方法,其特征在于,所述分析所述存储设备中的所述结构化数据,包括:5. The method for automatically collecting and analyzing switch logs according to claim 4, wherein the analyzing the structured data in the storage device comprises:通过所述MySQL数据库查询预定时间内的所述交换机的实时结构化数据;Query the real-time structured data of the switch within a predetermined time through the MySQL database;通过所述Hadoop分布式文件系统对所述交换机的日志大小进行分析,如果所述交换机的日志大小大于阈值则告警交换机异常。The log size of the switch is analyzed through the Hadoop distributed file system, and if the log size of the switch is greater than a threshold, an alarm is given to the switch being abnormal.6.一种自动采集和分析交换机日志的装置,其特征在于,所述装置包括:6. A device for automatically collecting and analyzing switch logs, wherein the device comprises:采集单元,配置用于采集互联网数据中心内所有交换机产生的日志;The collection unit is configured to collect logs generated by all switches in the Internet data center;过滤单元,配置用于将所述日志按照预定的规则过滤,保留符合预定的规则的日志;a filtering unit, configured to filter the logs according to predetermined rules, and retain logs that meet the predetermined rules;结构化单元,配置用于对所述保留的日志进行结构化处理以形成结构化数据,其中,所述结构化数据包括:交换机ID、时间戳、消息类型和详细消息;a structuring unit, configured to perform structured processing on the reserved logs to form structured data, wherein the structured data includes: switch ID, timestamp, message type and detailed message;传输单元,配置用于将所述结构化数据传输到存储设备中;a transmission unit configured to transmit the structured data to a storage device;分析单元,配置用于分析所述存储设备中的所述结构化数据;an analysis unit, configured to analyze the structured data in the storage device;所述结构化单元进一步配置用于:The structural unit is further configured to:从所述保留的日志中解析出交换机ID和时间戳;Parse out the switch ID and timestamp from the retained log;去除所述保留的日志中的交换机ID和时间戳;remove the switch ID and timestamp in the retained log;采用Lucene对所述日志进行分词去重;Use Lucene to perform word segmentation and deduplication on the log;采用聚类算法将具有相同结构或含义的日志分成一类以提取消息类型和详细消息。A clustering algorithm is used to classify logs with the same structure or meaning into one category to extract message types and detailed messages.7.根据权利要求6所述的自动采集和分析交换机日志的装置,其特征在于,所述采集单元进一步配置用于:7. The device for automatically collecting and analyzing switch logs according to claim 6, wherein the collecting unit is further configured to:通过两台核心服务器采集所述互联网数据中心内所有交换机产生的日志,其中,所述两台核心服务器互为冗余并支持断点续传。Logs generated by all switches in the Internet data center are collected through two core servers, wherein the two core servers are redundant with each other and support resuming transmission from a breakpoint.8.根据权利要求6所述的自动采集和分析交换机日志的装置,其特征在于,所述传输单元配置用于:8. The device for automatically collecting and analyzing switch logs according to claim 6, wherein the transmission unit is configured to:采用存在两个传输节点的flume架构,所述两个传输节点共用一个虚拟IP。A flume architecture with two transit nodes is adopted, and the two transit nodes share a virtual IP.9.根据权利要求6所述的自动采集和分析交换机日志的装置,其特征在于,所述存储设备包括MySQL数据库和Hadoop分布式文件系统。9 . The device for automatically collecting and analyzing switch logs according to claim 6 , wherein the storage device comprises a MySQL database and a Hadoop distributed file system. 10 .10.根据权利要求9所述的自动采集和分析交换机日志的装置,其特征在于,所述分析单元进一步配置用于:10. The device for automatically collecting and analyzing switch logs according to claim 9, wherein the analyzing unit is further configured to:通过所述MySQL数据库查询预定时间内的所述交换机的实时结构化数据;Query the real-time structured data of the switch within a predetermined time through the MySQL database;通过所述Hadoop分布式文件系统对所述交换机的日志大小进行分析,如果所述交换机的日志大小大于阈值则告警交换机异常。The log size of the switch is analyzed through the Hadoop distributed file system, and if the log size of the switch is greater than a threshold, an alarm is given to the switch being abnormal.
CN201610355156.0A2016-05-252016-05-25The method and apparatus of automatic collection and analysis interchanger logActiveCN106055608B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610355156.0ACN106055608B (en)2016-05-252016-05-25The method and apparatus of automatic collection and analysis interchanger log

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610355156.0ACN106055608B (en)2016-05-252016-05-25The method and apparatus of automatic collection and analysis interchanger log

Publications (2)

Publication NumberPublication Date
CN106055608A CN106055608A (en)2016-10-26
CN106055608Btrue CN106055608B (en)2019-06-07

Family

ID=57174539

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610355156.0AActiveCN106055608B (en)2016-05-252016-05-25The method and apparatus of automatic collection and analysis interchanger log

Country Status (1)

CountryLink
CN (1)CN106055608B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108241658B (en)*2016-12-242021-09-07北京亿阳信通科技有限公司Log pattern discovery method and system
CN106649831B (en)*2016-12-292020-09-04北京奇艺世纪科技有限公司Data filtering method and device
CN109213736B (en)*2017-06-292022-06-14阿里巴巴集团控股有限公司Log compression method and device
CN107332720A (en)*2017-08-222017-11-07河钢股份有限公司承德分公司A kind of device for collecting interchanger daily record
CN110399347B (en)2018-04-232021-05-18华为技术有限公司Alarm log compression method, device and system and storage medium
CN108710694A (en)*2018-05-222018-10-26浪潮软件集团有限公司 A method and device for storing data as files based on Flume
CN108833490A (en)*2018-05-242018-11-16郑州云海信息技术有限公司 A distributed data acquisition system and method thereof
CN108717461B (en)*2018-05-252021-03-26平安科技(深圳)有限公司Mass data structuring method and device, computer equipment and storage medium
CN109586946B (en)*2018-09-292021-11-30创新先进技术有限公司Exception handling method and device and computer readable storage medium
CN110134615B (en)*2019-04-102022-03-01百度在线网络技术(北京)有限公司Method and device for acquiring log data by application program
CN110190992A (en)*2019-05-212019-08-30上海连尚网络科技有限公司A kind of monitoring method and routing device of failure
CN110780857B (en)*2019-10-232024-01-30杭州涂鸦信息技术有限公司Unified log component
CN111177360B (en)*2019-12-162022-04-22中国电子科技网络信息安全有限公司Self-adaptive filtering method and device based on user logs on cloud
CN111343018B (en)*2020-02-222022-12-20苏州浪潮智能科技有限公司 A method and device for collecting alarm logs of data center switches

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2002116928A (en)*2000-06-162002-04-19Fujitsu LtdRecording system for recording processing information of plural systems
CN101325520A (en)*2008-06-172008-12-17南京邮电大学 Log-based Intelligent Adaptive Network Fault Location and Analysis Method
CN101939742A (en)*2007-10-022011-01-05洛格逻辑公司Searching log data for associated events
CN102208991A (en)*2010-03-292011-10-05腾讯科技(深圳)有限公司Blog processing method, device and system
CN105138592A (en)*2015-07-312015-12-09武汉虹信技术服务有限责任公司Distributed framework-based log data storing and retrieving method
CN105579999A (en)*2013-07-312016-05-11慧与发展有限责任合伙企业 log analysis

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2002116928A (en)*2000-06-162002-04-19Fujitsu LtdRecording system for recording processing information of plural systems
CN101939742A (en)*2007-10-022011-01-05洛格逻辑公司Searching log data for associated events
CN101325520A (en)*2008-06-172008-12-17南京邮电大学 Log-based Intelligent Adaptive Network Fault Location and Analysis Method
CN102208991A (en)*2010-03-292011-10-05腾讯科技(深圳)有限公司Blog processing method, device and system
CN105579999A (en)*2013-07-312016-05-11慧与发展有限责任合伙企业 log analysis
CN105138592A (en)*2015-07-312015-12-09武汉虹信技术服务有限责任公司Distributed framework-based log data storing and retrieving method

Also Published As

Publication numberPublication date
CN106055608A (en)2016-10-26

Similar Documents

PublicationPublication DateTitle
CN106055608B (en)The method and apparatus of automatic collection and analysis interchanger log
US10452843B2 (en)Self-adaptive application programming interface level security monitoring
CN105049247B (en) Method and device for extracting network security log template
CN103684828B (en)A kind for the treatment of method and apparatus of telecommunication equipment fault
US8181069B2 (en)Method and system for problem determination using probe collections and problem classification for the technical support services
US20170109657A1 (en)Machine Learning-Based Model for Identifying Executions of a Business Process
CN106055452B (en) Method and apparatus for creating switch log template
US10567409B2 (en)Automatic and scalable log pattern learning in security log analysis
US9306806B1 (en)Intelligent resource repository based on network ontology and virtualization
US20170109676A1 (en)Generation of Candidate Sequences Using Links Between Nonconsecutively Performed Steps of a Business Process
US20200021511A1 (en)Performance analysis for transport networks using frequent log sequence discovery
US20170109668A1 (en)Model for Linking Between Nonconsecutively Performed Steps in a Business Process
US20170109667A1 (en)Automaton-Based Identification of Executions of a Business Process
CN109995582A (en)Asset equipment management system and method based on real-time status
CN107659453A (en)The method that a large amount of TCP serve ports are monitored by zabbix
US20170109636A1 (en)Crowd-Based Model for Identifying Executions of a Business Process
CN107508722A (en)A kind of business monitoring method and device
CN117422434A (en)Wisdom fortune dimension dispatch platform
US20170109639A1 (en)General Model for Linking Between Nonconsecutively Performed Steps in Business Processes
JP5933463B2 (en) Log occurrence abnormality detection device and method
CN113542074B (en)Method and system for visually managing east-west network flow of kubernets cluster
CN108228664B (en)Unstructured data processing method and device
Sanjappa et al.Analysis of logs by using logstash
CN109660389A (en)A kind of IT assets management method and device
US20170109640A1 (en)Generation of Candidate Sequences Using Crowd-Based Seeds of Commonly-Performed Steps of a Business Process

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp