Summary of the invention
Embodiment of the present invention technical problem to be solved is, a kind of warning analysis method based on Simple Network Management Protocol is provided, and this method may further comprise the steps:
Receive the warning information of OAMAgent;
In the regular configuration file that prestores, search the corresponding service rule according to said warning information, and generate the warning information that meets service logic according to said business rule.
Wherein, in the step of the warning information that receives OAMAgent, receive the simple network management protocol trap packet of OAMAgent.
In the regular configuration file that is prestoring according to said warning information, search the corresponding service rule, and generate in the step of the warning information that meets service logic further comprising the steps of according to said business rule:
Obtain object identifier according to the simple network management protocol trap packet;
Judge whether said object identifier is included in the Simple Network Management Protocol configuration file that prestores, and said Simple Network Management Protocol configuration file comprises the pairing field information of management information bank nodename;
When said object identifier is included in the Simple Network Management Protocol configuration file that prestores; Binding parameter to the simple network management protocol trap packet is resolved; And produce an event object model, said event object model is the data structure of said object identifier corresponding warning information.
Binding parameter to the simple network management protocol trap packet is resolved, and produces after the step of an event object model further comprising the steps of:
Judge that whether said object identifier is included in the regular configuration file that prestores, and comprises the business rule of at least one corresponding said object identifier in the said regular configuration file that prestores;
When said object identifier is included in the regular configuration file that prestores, the binding parameter that said simple network management protocol trap data comprise is carried out the corresponding business rule;
Generate the execution result of carrying out said business rule;
Said execution result is converted into the warning information that is applicable to the different language user;
Said warning information is stored in the database;
Show said warning information.
Carry out between the step of corresponding business rule and the execution result step that said business rule is carried out in said generation further comprising the steps of in binding parameter that said simple network management protocol trap data are comprised:
When in the corresponding said regular configuration file of said object identifier during a plurality of business rule, then only carry out first qualified business rule.
Accordingly, embodiment of the present invention also provides a kind of warning analysis network management workstation based on Simple Network Management Protocol, and it comprises:
Receiver module is used to receive the warning information of OAMAgent;
Said alarm generation module is used for searching the corresponding service rule according to said warning information at the regular configuration file that prestores, and generates the warning information that meets service logic according to said business rule.
Wherein, said receiver module is used to receive the simple network management protocol trap packet of said OAMAgent, and said alarm generation module comprises:
Identifier obtains submodule, is used for obtaining object identifier according to the simple network management protocol trap packet;
The identifier match submodule is used for judging whether said object identifier is included in the Simple Network Management Protocol configuration file that prestores, and said Simple Network Management Protocol configuration file comprises the pairing field information of management information bank nodename;
Analyzing sub-module is used for the binding parameter of simple network management protocol trap packet is resolved, and produces an event object model, and said event object model is the data structure of object identifier corresponding warning information.
Said alarm generation module also comprises:
The rule match submodule is used for judging whether said object identifier is included in the regular configuration file that prestores;
Implementation sub-module, the binding parameter that is used for that said simple network management protocol trap data are comprised is carried out the corresponding business rule;
The module that bears fruit is used to generate the execution result of carrying out said business rule;
The internationalization submodule is used for said execution result is converted into the warning information that is applicable to the different language user;
Sub module stored is used for storing said warning information into database;
Display sub-module shows said warning information.
Said alarm generation module also comprises:
The chooser module is used for when a plurality of business rule of the corresponding said regular configuration file of said object identifier, only carrying out first qualified business rule.
Embodiment of the present invention also provides a kind of system of the warning analysis based on Simple Network Management Protocol; This system comprises that above-mentioned network management workstation and operates in the OAMAgent on the managed device, and said OAMAgent sends alarm to said network management workstation.
Warning analysis method based on Simple Network Management Protocol provided by the invention has been owing to adopted the regular configuration file that comprises business rule, thereby can resolve for the alarm report that service logic is arranged.
In addition, the operation of configuration file is the parallel work-flow of a plurality of judgment rules.Therefore, performance is more stable, and fault-tolerance is better, and operating efficiency is higher in the development process.And when revising, the different parameters that only needs to revise regular configuration file just can adapt to condition of different, and development cost is low, reduces maintenance workload.
Simultaneously, said rule judgment process can be used as an individual working module, is increased in the existing system, also can from system, delete by different needs.Do not influence the running of existing system.
Embodiment
To combine the accompanying drawing in the embodiment of the present invention below, the technical scheme in the embodiment of the present invention is carried out clear, intactly description, obviously, described execution mode only is the present invention's part execution mode, rather than whole execution modes.Based on the execution mode among the present invention, those of ordinary skills are not making the every other execution mode that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
In embodiment of the present invention, through having adopted the regular configuration file that comprises business rule, thereby can resolve for the alarm report that service logic is arranged.
See also Fig. 1, the analytic method that provides for first execution mode provided by the invention based on Simple Network Management Protocol.This method comprises step:
Step 101, the warning information of reception OAMAgent.In this execution mode; OAMAgent 20 from managed devices obtains simple network management protocol trap packet (hereinafter to be referred as SNMP Trap packet); SNMP Trap packet is decoded; Extract the OID in the decoded SNMP Trap packet, and judge whether to be included in the Simple Network Management Protocol configuration file, if the OID value of the data structure of a warning information of preserving in the entrained OID value of SNMP Trap packet and the Simple Network Management Protocol configuration file is identical; Then the binding parameter of SNMP Trap packet is resolved, and produce an event object model.Said Simple Network Management Protocol configuration file is existing configuration file; Said Simple Network Management Protocol configuration file is by the xml file of third party's definition; Comprising MIB (Management Information Base, management information bank) the pairing field information of nodename.Said event object model is the data structure of OID corresponding warning information.In this execution mode, said data structure is a kind of key-value pair form.
Step 103 is searched the corresponding service rule according to said warning information in the regular configuration file that prestores, and generates the warning information that meets service logic according to said business rule.
In this execution mode, comprise the business rule of at least one corresponding OID in the said regular configuration file that prestores.Particularly, said each business rule comprises at least one conditional operation, said conditional operation can be " greater than ", " and less than ", " equaling " etc. be operation relatively; Or " with " and " or " etc. conditional operation; Or redirected alarm name, alarm level, Alarm Classification, alarm details information is at assign operations such as alarm details; Or through java internationalization API, numeral or English name that SNMP Trap is reported replace with compilation operations of the relevant alarm description of service logic or the like.
In this step, go to search the corresponding business rule,, abandon said event object model so if there is not the corresponding service rule according to said event object model.If there is the corresponding service rule, so according to the information of binding parameter in the said SNMP Trap packet, carries out the corresponding service rule, and generate the warning information that meets service logic.
See also Fig. 2, the structured flowchart that provides for first embodiment of the invention based on the resolution system 100 of Simple Network Management Protocol.
The resolution system 100 of said Simple Network Management Protocol comprises that network management workstation 10 and operates in the OAMAgent 20 on the managed device.
Said OAMAgent 20 is used for sending a warning message to said network management workstation 10.In this execution mode, said OAMAgent 20 sends the SNMP Trap packet that comprises warning information to said network management workstation 10.
Said network management workstation 10 comprises receiver module 11 and alarm generation module 12.
Said receiver module 11 is used to receive the alarm of OAMAgent 20.In this execution mode, said receiver module 11 is produced the event object model according to the step 101 of first execution mode.
Said alarm generation module 12 is used for searching the corresponding service rule according to said warning information at the regular configuration file that prestores, and generates the warning information that meets service logic according to said business rule.In this execution mode; Said alarm generation module 12 obtains the regular configuration file that prestores; Comprise at least one business rule in the said regular configuration file; In said regular configuration file, search corresponding said business rule according to said warning information, carry out said business rule, generate the warning information that meets service logic.In this execution mode, said receiver module 11 generates the warning information that meets service logic according to the step 103 of first execution mode.
See also Fig. 3, the analytic method that provides for second execution mode provided by the invention based on Simple Network Management Protocol.This method comprises step:
Step 201, the SNMP Trap packet of reception OAMAgent.
Step 203 is obtained OID according to SNMP Trap packet.In this execution mode, the SNMP Trap packet that obtains is decoded, extract the OID in the decoded SNMP Trap packet again.
Step 205 judges whether said OID is included in the Simple Network Management Protocol configuration file that prestores.In this execution mode, said Simple Network Management Protocol configuration file is existing configuration file, and said Simple Network Management Protocol configuration file is by the xml file of third party's definition, comprising the pairing field information of MIB nodename.
Step 207; When said OID is included in the Simple Network Management Protocol configuration file that prestores; Binding parameter to SNMP Trap packet is resolved, and produces an event object model, and said event object model is the data structure of OID corresponding warning information.In this execution mode, said data structure is a kind of key-value pair form.
Step 209 judges whether said OID is included in the regular configuration file that prestores.The business rule that comprises at least one corresponding OID in the said regular configuration file that prestores.Particularly, said each business rule comprises at least one conditional operation, said conditional operation can be " greater than ", " and less than ", " equaling " etc. be operation relatively; Or " with " and " or " etc. conditional operation; Or redirected alarm name, alarm level, Alarm Classification, alarm details information is at assign operations such as alarm details; Or through java internationalization API, numeral or English name that SNMP Trap is reported replace with compilation operations that is applicable to the different language user or the like.Particularly, in this execution mode, in the said step 209, first load events rule configuration file goes to search the corresponding business rule according to OID then in regular configuration file.
Step 211 when said OID is included in the regular configuration file that prestores, is carried out the corresponding business rule to the binding parameter that SNMP Trap data comprise.Particularly, when said OID is included in the regular configuration file that prestores, resolve the binding field information in the said event object model.Obtain all conditions of said OID corresponding service rule then, bring the binding field information in the said event object model into each condition, and return each condition result calculated.In this execution mode, return the results list of Boolean type.Because the binding parameter of said OID possibly satisfy a plurality of conditions, and causes the user to perplex in order to prevent, makes the user obtain a clear and definite information.In this execution mode, also comprise in the said business rule " with " and " or " operation.When the binding parameter of said OID satisfies a plurality of condition, each condition is carried out AND-operation, and obtain the result of AND-operation.Also comprise the object information corresponding in the said regular configuration file with AND-operation.When the binding parameter of said OID satisfies a plurality of condition, will from said regular configuration file, return corresponding result.When the binding parameter of said OID satisfies a plurality of condition, can also each condition be carried out OR operation, and obtain the result of OR operation.In this execution mode, when the binding parameter of said OID satisfies a plurality of condition, return the result that first satisfies condition.
Certainly, in this execution mode, revise the represented implication of binding field information in the said event object model for ease, and revise the represented implication of binding field information in the said event object model according to different needs.Can also be redirected alarm name, alarm level, Alarm Classification and alarm details information.The binding field information that is about in the said event object model defines different alarm name, alarm level, Alarm Classification and alarm details information according to different needs.For example, corresponding same alarm name can be defined as environment and report to the police, and also can be defined as temperature alarming.Alarm level can be defined as high severity alarm or fatal warning to same alarm level according to the adaptability of system.
Certainly; In execution mode; Can also directly the binding field information in the said event object model or above-mentioned redirected alarm name, alarm level, Alarm Classification and alarm details information be passed through java internationalization API, be revised as the information that is applicable to the different language crowd.This step is carried out after step 205 and is helped improving treatment effeciency.Need not the binding parameter that all SNMP Trap data comprise is resolved.
Step 213 when in the corresponding said regular configuration file of said OID during a plurality of business rule, is then only carried out first qualified business rule.In this execution mode, when the binding parameter of said OID satisfies a plurality of condition, also can each condition be carried out AND-operation, and obtain the result of AND-operation.Also comprise the object information corresponding in the said regular configuration file with AND-operation.When the binding parameter of said OID satisfies a plurality of condition, will from said regular configuration file, return corresponding result.
Step 215 generates the execution result of carrying out said business rule.In this execution mode, obtain the execution result of carrying out said business rule, and convert the execution result of said business rule into incident.
Step 217 is converted into said execution result the warning information that is applicable to the different language user.In this execution mode,, the numeral in the said execution result, character code, date etc. are converted into the information that is applicable to the different language user through java internationalization API.Particularly, load the internationalized resources file, resolve the resource that need internationalize in the said execution result and handle, binding field information in the said execution result and resource information are bound, generate and professional relevant customization incident.The process of the conversion of language is carried out in this step, rather than in step 209, carried out, can only transform, and need not all information is all transformed, can raise the efficiency satisfactory information.
Step 219 stores said warning information in the database into.In this execution mode, convert said customization incident the alarm object of the system of being applicable to into, then the warning information in the said alarm object is stored in the database.
Step 221 shows said warning information.In this execution mode, said warning information is shown on the interface.
In said step 209, when said OID is not included in the regular configuration file that prestores, carries out other operations, and no longer carry out follow-up step 211-221.
In said step 205, when said OID is not included in the Simple Network Management Protocol configuration file that prestores, carries out other operations, and no longer carry out follow-up step 207-221.
In other embodiments, said step 219 and step 221 can be chosen one wantonly.
See also Fig. 4, the resolution system 100 based on Simple Network Management Protocol based on the resolution system 300 of Simple Network Management Protocol and first execution mode that second embodiment of the invention provides is basic identical.
Said resolution system 300 based on Simple Network Management Protocol comprises receiver module 310 and alarm generation module 320.
Said receiver module 310 is used to receive the SNMP Trap packet of OAMAgent.
Said alarm generation module 320 comprises that identifier obtains submodule 321, identifier match submodule 322, alarm generation module 323, analyzing sub-module 324, rule match submodule 325, implementation sub-module 326, chooser module 327, the module that bears fruit 328, internationalization submodule 329, sub module stored 330 and display sub-module 331.
Said identifier obtains submodule 321 and is used for obtaining OID according to SNMP Trap packet.In this execution mode, said identifier obtains the method for the said step 203 of submodule 322 employings and extracts the OID in the SNMP Trap packet.
Said identifier match submodule 323 is used for judging whether said OID is included in the Simple Network Management Protocol configuration file that prestores.In this execution mode, said identifier match submodule 323 adopts the method for said step 205 to judge.
Said analyzing sub-module 324 is used for the binding parameter of SNMP Trap packet is resolved, and produces an event object model, and said event object model is the data structure of OID corresponding warning information.In this execution mode, said data structure is a kind of key-value pair form.
Said rule match submodule 325 is used for judging whether said OID is included in the regular configuration file that prestores.In this execution mode, said rule match submodule 325 adopts the method for step 209 to judge whether said OID is included in the regular configuration file that prestores.
The binding parameter that said implementation sub-module 326 is used for that said SNMP Trap data are comprised is carried out the corresponding business rule.In this execution mode, the binding parameter that said implementation sub-module 326 adopts the method for step 211 that said SNMP Trap data are comprised is carried out the corresponding business rule.
Said chooser module 327 is used for when a plurality of business rule of the corresponding said regular configuration file of said OID, only carrying out first qualified business rule.
The said module 328 that bears fruit is used to generate the execution result of carrying out said business rule.In this execution mode, obtain the execution result of carrying out said business rule, and convert the execution result of said business rule into incident.
Said internationalization submodule 329 is used for said execution result is converted into the warning information that is applicable to the different language user.In this execution mode, said internationalization submodule 329 adopts the method for step 217 to carry out language conversion.
Said sub module stored 330 is used for storing said warning information into database.In this execution mode, said sub module stored 330 converts said customization incident the alarm object of the system of being applicable to into, then the warning information in the said alarm object is stored in the database.
Said display sub-module 332 shows said warning information.In this execution mode, said warning information is shown on the interface.
Because outside the Simple Network Management Protocol configuration file, increase many hard codeds of judging statement; Each judges the hierarchical relationship about existing between the statement, revises one of them and judges statement, will do modify to other statements afterwards; Easy error, not easy care.Debug process time while is long, and the construction cycle is long.And analytic method and system based on Simple Network Management Protocol provided by the invention is owing to adopted regular configuration file; The operation of configuration file is the parallel work-flow of a plurality of judgment rules, and therefore, performance is more stable; Fault-tolerance is better, and operating efficiency is higher in the development process.And when revising, the different parameters that only needs to revise regular configuration file just can adapt to condition of different, and development cost is low, reduces maintenance workload.In addition, said rule judgment process can be used as an individual working module, is increased in the existing system, also can from system, delete by different needs.Do not influence the running of existing system.
The above disclosed a kind of preferred embodiments of the present invention that is merely can not limit the present invention's interest field certainly with this, so according to the equivalent variations that claim of the present invention is done, still belong to the scope that the present invention is contained.