WO2009006808A1 - Procédé et système pour envoyer les notifications d'événements sur la base du protocole netconf - Google Patents

Procédé et système pour envoyer les notifications d'événements sur la base du protocole netconf Download PDF

Info

Publication number
WO2009006808A1
WO2009006808A1 PCT/CN2008/071217 CN2008071217W WO2009006808A1 WO 2009006808 A1 WO2009006808 A1 WO 2009006808A1 CN 2008071217 W CN2008071217 W CN 2008071217W WO 2009006808 A1 WO2009006808 A1 WO 2009006808A1
Authority
WO
WIPO (PCT)
Prior art keywords
netconf
event notification
event
notification
client
Prior art date
Application number
PCT/CN2008/071217
Other languages
English (en)
French (fr)
Inventor
Xiaofeng Ji
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Priority to EP08757628.6A priority Critical patent/EP2166699B1/en
Priority to ES08757628T priority patent/ES2432793T3/es
Publication of WO2009006808A1 publication Critical patent/WO2009006808A1/zh
Priority to US12/614,179 priority patent/US8103731B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0681Configuration of triggering conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements

Definitions

  • the present invention relates to mobile communication technologies, in particular: transmitting, to a method and system for notification with (background art network configuration protocols based matter.
  • NETCO F basically solves the shortcomings of SNM.P, and is suitable for large and complex device management.
  • NETCONF is a layered management protocol for providing configuration, installation, maintenance, and deletion of network devices. It can be configured in a remote process call that is hosted in a single package using the XML markup language (XML) package configuration.
  • XML XML markup language
  • FIG. 1 shows the hierarchical structure of the existing ETCONF.
  • the existing NETCONF is conceptually divided into four layers, where the first layer is the Transport Protocol layer, and the commonly used protocol has a block exhibition. Exchange Protocol (BEEP), Secure Shell (SSH), Secure Sockets Layer (SSL), and console (console); the second layer is RPC, including RPC and FC response; the third layer is the operation layer, commonly used The operations include obtaining configuration (Gei-con g), editing configuration ( Edit ⁇ contig ), and event notification (Notiilcaiion ); the fourth layer is the content layer, or configuration management layer, for implementing configuration data (Configuration Data) Managementongoperability for a configurable Configuration Protocol (Configuration Data) Management
  • the events mentioned here refer to the things that happen to some devices, such as: configuration changes, I, state changes, threshold crossings, and exceptions. Intrusion and other systems need to provide event notifications.
  • the NE'iCO F client needs to subscribe to the NETCONF server for event notification. If the subscription is successful, the NETCONF server will record the subscription message of the NETCONF client in the subscription list, so that there are events inside the system. When generated, the ETCONF server will respond to the recorded subscription message. The ETCONF client sends an event notification to inform the NETCONF client of the current occurrence of the piece.
  • the NETCONF server will no longer N
  • the 'rcONF client sends an event notification. It needs to be explained that the session for the notification of the NETCONF server does not have to process the RK request.
  • the embodiment of the invention provides a method for sending an event notification based on a network configuration protocol, which can be compatible with various event notification methods to implement event notification in the network configuration protocol.
  • the embodiment of the present invention provides an event notification sending system based on a network configuration protocol, which can be compatible with various notification methods of events to implement event notification in the network configuration protocol.
  • the embodiment of the invention further provides an event notification sending device based on the i3 ⁇ 4 network configuration protocol, which is compatible with various event notification modes to implement event notification in the network configuration protocol.
  • the embodiment of the invention further provides an event notification receiving device based on a network configuration protocol, which is compatible with various event notification modes to implement event notification in a network configuration protocol.
  • An event notification sending method based on a network configuration protocol including:
  • the NETCON server accepts the NETCONF client pinning event notification
  • the NETCON server When an event occurs in the system, the NETCON server generates an event notification, and is very ambiguous about the event that the NETCONF client subscribes to. The information about the event is converted into a format recognizable by the NETCONF client. ;
  • the NETCOKF server sends the converted event notification to the NETCONF client.
  • An event notification sending system based on a network protocol, the system comprising: an NBTCONF client and a NETCONF server;
  • the NBTCO F client is used to subscribe to the event in the NETCONF server.
  • - Connect Receive the event notification sent by the NETCONF server;
  • the ETCONF server is configured to generate an event notification when an event occurs in the system, and convert the event notification into a format recognizable by the NETCONF client according to the information about the event notification subscribed by the NETCONF client> To the NEl'CO F client.
  • An event notification sending device based on a network configuration protocol the device is a NETCONF server, and the NETCONF server includes: a session processing module, a notification management module, and an event processing center;
  • the event processing center is configured to generate an event notification when an event occurs in the system, and send the event notification to the notification management module;
  • the notification management module is configured to receive a notification notification of the NETCONF client subscription event, and according to the event notification of the subscription: forwarding the event notification sent by the event processing center to the session processing module;
  • the session processing module is configured to convert the event notification sent by the notification management module into a format recognizable by the NETCONF client, and send the identifier to the NETCONF client.
  • An event notification receiving device based on a network configuration protocol the device is a NETCONF client, and the ETCONF client includes: a subscription module and a receiving module;
  • the subscription module is configured to subscribe to an event notification in the NETCONF server
  • the receiving module is configured to receive an event notification sent by the NETCONF server, where the event notification is an event generated by the ETCONF server according to related information of an event notification read by the subscription module when an event occurs in the system. Notifications are converted to NETCONF, and the client can recognize the format of the event escaping cauliflower
  • the server when an event occurs in the system, the server can generate an event notification of the corresponding mode according to the requirement, and convert the generated event notification into a format required by the client, and then send the format to the client.
  • the event notification format can be converted, 'so, there is no strict limit on the format of the event notification generated by the server. From 3 ⁇ 4, the event notification based on the network configuration protocol can be compatible with various event notification methods.
  • m 1 is a hierarchical structure diagram of the existing NETCONF
  • JI 2 is a general flow chart of an embodiment of the method of the present invention.
  • S 3 is the process S of the first preferred embodiment of the method of the present invention.
  • m 4 is an existing NETCONF protocol event notification model indicating S
  • the m 5 is a schematic diagram of a model in which the SnmpTmp is encapsulated into an XML format according to an embodiment of the present invention
  • the figure is a schematic diagram of a rule for implementing conversion between XML-Snrapv2trap and XML-Snmpv trap by using XSLT;
  • FIG. 8 is a schematic diagram of a model of a sysiog package; 3 ⁇ 4 XML format according to an embodiment of the present invention
  • m 9 is a schematic structure of the embodiment of the system of the present invention.
  • the widely used event notification method mainly consists of simple network management protocol alarms.
  • SnmpTrap and system log (sysiog X) SnmpTrap is divided into three versions, Ssnpv I Trap, Snsnpv2 Trap, and Siimpv3 Trap.
  • the Network File (RFC) 1157 specifically describes how to send an alarm message to the upper application through SnmpvlTp, and defines the format of the SnmpvlTrap Protocol Protocol Unit (PDU), as shown in Table 1:
  • Community 5 uses the top-level application to authenticate the sender of the alert message
  • Agent-addr an interconnection protocol (IP) address used to identify the sender of the alarm message
  • Gimerioi p used to identify the six general conditions that require an alert, including: eoidStart ( warm start:), connection failure ( inkDown ), connection establishment ( f idJp ): authentication miso (ihcnticaliOii aifure) and The adjacent external router fails or shuts down ⁇ egpNeighborLoss ).
  • eoidStart warm start:
  • connection failure inkDown
  • connection establishment f idJp
  • authentication miso ihcnticaliOii aifure
  • the adjacent external router fails or shuts down ⁇ egpNeighborLoss ).
  • the above six cases can be represented by integers 0-5;
  • Time-s mp used to identify the alarm time.
  • An alarm message can include multiple variable-bindings;
  • Ame is used to identify alarm objects such as interfaces or central processing units (CPUs);
  • RFC !905 describes how to send an alarm message to an upper application through Srtmpv2Trap
  • Snmpv3Trappdu The format of Snmpv3Trappdu is similar to that of nmpv2Trappdy. The difference is to add a context name (Cont xtname ) and a context based on the Snmpv2 Trappdu format. Identification ( ContextlD ),
  • SnmpTrap can be used to implement the alarm
  • the existing SnnipTmp is carried by the User Datagram Protocol (UDP).
  • UDP User Datagram Protocol
  • the IJDP itself is not a reliable protocol. Therefore, the use of the SnmpTrap alarm may cause the packet to be reliably reachable.
  • SnmpTra uses a binary PDU packet for encapsulation, a special function ⁇ is needed for parsing, so its general surname is affected; in addition, SnmpT3 ⁇ 4tp cannot be compatible with other event notification methods.
  • FC3I64 describes how to send the system E to the county application through the sys!og, and specify the syslog specific format, as shown in Table 3:
  • the complete syslog message consists of three parts, namely PRI, HEADER and SG.
  • Faci ty used to identify the source of the ambition, - in practical applications, use different code (umerical Code.) to represent different logs: source, as shown in Table 4:
  • Severity used to identify the severity of the message.
  • different codes are used to represent the severity of the non-level, as shown in Table 5:
  • HEADER specifically includes TIMES TAMP and TIMES to help STNA mess.
  • TAMP is used to identify the log generation time.
  • HOSTNAME is used to identify the system that generates the log. The content of the MSG needs to be determined according to the actual situation, so it is not specifically limited in the systeg message format.
  • the implementation method of the present invention is based on the NETCONF protocol, wherein the NETCONF client (hereinafter referred to as the client) subscribes to the event notification in the NETCONF server (hereinafter referred to as the server); when an event occurs in the system, the server generates an event notification and generates The event notification is converted to a format that the client can recognize and sent to the guest terminal.
  • the NETCONF client hereinafter referred to as the client
  • the server subscribes to the event notification in the NETCONF server
  • the server when an event occurs in the system, the server generates an event notification and generates
  • the event notification is converted to a format that the client can recognize and sent to the guest terminal.
  • Figure 2 is the overall flow of the method embodiment of the present invention. As shown in Figure 2, it includes:
  • the method for the client to subscribe to the event notification in the server is:
  • the client sends a subscription request carrying the event notification type of the subscription to the server; after the subscription is successful, the server will subscribe Request information to be added to the pre-set subscription list.
  • the subscription list is used to store information about the customer's subscription to the event notification, such as the event notification type information of the above subscription. Of course, if there is other information, it will be stored accordingly.
  • the server generates a response message of whether the subscription is successful or not, and converts the read response message into an XML format and sends it to the client.
  • this step further includes: Establishing a transmission control protocol between the client and the server
  • TCP Transmission Control Protocol
  • session such as a session
  • the server When an event occurs in the system, the server generates an event notification and converts the generated event notification into a format recognizable by the client, and sends it to the client.
  • the server When an event occurs in the system, the server generates an event notification of the corresponding type according to the event type > and finds the client that subscribes to the event notification according to the event notification type information stored in the subscription list > sends an event notification to the event notification
  • the server will encapsulate the foresight event into XML format by default; send it to the client,
  • the format request information will be further carried in the subscription request in 20!, correspondingly, in this step, the service II will further convert the event notification encapsulated into XML format into a client.
  • the fans each event notification may be an event notification Chong conventional manner, such as under or sg SnmpTrap this case 3 ⁇ 4, 201 according to the subscription request may further carry a filter type, and filter the results of the requested information u obtained wherein the filter type Sub-tree (SUBTREE) filtering and XML path language (XPath) filtering indicate which filtering method the server will use to obtain the filtering result required by the client; the required filtering result information is based on the type of event notification subscribed by the client.
  • filter type Sub-tree SUBTRAE
  • XPath XML path language
  • the required filtering result is used to specify the specific SnmpTra type of the subscription: SnmpvITrap, Snmpv2Tra or Snmpv3Trap; if the subscription event is of the type sysh ⁇ The resulting filter is used to indicate the priority or priority of the subscribed event.
  • the server in 20 will filter the event notification of the actual subscription of the client according to the filtering type stored in the subscription list and the required filtering information.
  • FIG. 3 is a flow chart of a first preferred embodiment of the method of the present invention. This embodiment is based on NETCONF It is assumed that the event notification generated by the server side is SnmpTrap.
  • the server in this example includes a session handler module, a notification management module ⁇ Notification Manager.), and an event processing center (Event Center).
  • A, B, C, F, and G respectively represent different processing threads, where A represents the client processing thread; B represents the message receiving processing thread of the server session; C represents the message of the server session.
  • the embodiment includes:
  • an SSH session is established between the client and the session processing module.
  • An SSH session can be established based on the relevant protocol, which is not mentioned here.
  • the client sends a subscription request to the session processing module
  • the subscription request carries the event notification type of the subscription, the filtering type, and the required filtering result information. It is assumed that the event notification type subscribed by the guest terminal is all events of the stream "Snmptrap !i over netconr" in this embodiment.
  • the filter type is the event that is filtered by the subtree filter and is in the format "Snmpv Urap".
  • the session processing module writes the received subscription request to the to-be-processed data queue of the notification management module.
  • the notification management module processes the subscription request, and after the subscription is successful, adds the subscription request to a preset list.
  • the notification management module sends a response message to the session processing module.
  • the management module is notified to generate a response message indicating whether the subscription is successful or not, and is written into the pending data queue of the session processing module.
  • the session processing module converts the response message into an XML format:
  • the response message generated in the middle may be the language format of the device, such as c, this step needs to convert the format of the response message.
  • the session processing module sends a response message to the client.
  • the session processing module sends a response message of the success or failure of the generated XML format to the client.
  • the event processing center sends the Smnptrap alarm information to the notification management module.
  • the event processing center When an event occurs in the system, the event processing center generates an event notification of the corresponding type according to the event type. For example, if the event is authentication failure, the Snmpv ltrap alarm information is generated. s Assume that the event processing center sends the Srimptmp alarm information to the notification management module in this step. Also includes Snmpv S trap Snnipv'2trap radical
  • the notification management module filters according to the subscription list.
  • the notification management module finds the client that subscribes to the Snmpi p type event notification according to the subscription event notification type information of the client stored in the subscription list, and filters the sub-tree according to the stored filtering type and the required filtering result information to obtain "Snmpvkrap".
  • the event notification of the format can also use the path filtering method; the event notification in the format of *' Snmpv 1 trap" is not described in detail in the prior art. However, it should be noted that no matter which one is used in this implementation.
  • the filtering method is to filter the complete unit of the event notification as a basic unit, that is, the information is not internally filtered to ensure the integrity of the information.
  • the notification management module sends the filtered event notification to the session processing module.
  • the notification management module notifies the event notification to the pending data queue of the session processing module in response to the message.
  • the session processing module encapsulates the event notification into an XML format.
  • the method for encapsulating the event notification in the SnmpTrap format into an XML format is:
  • the information carried in the SnmpTrap is encapsulated into the tag content of the fast event notification model, and the encapsulated content also conforms to the hierarchical structure of the existing NETCONF protocol event notification model.
  • FIG. 4 is a schematic diagram of an existing NETCONF protocol event notification model, as shown in FIG. 4, in which "event notification (!ioti icadon)" and “data (date)” respectively represent labels and sub-labels of the model; Content; "any” in the tag content of the dMa subtag indicates that the content can be arbitrarily added as needed; the symbol between the notifkaiion and data tags (including the symbol after the data tag) indicates that the two parts are sequences Sequence structure:
  • SnmpTrap in the prior art includes SnmpvTp, Snmpv2Tra and
  • Snmpv3Tra is of three types, and the respective configurations of Snmpv 1 Trap, Snmpv2Trap and Snmpv3.Trap are known - so, in this embodiment, SNMFi'rap is set as a label (referred to as a label relative to an SNMPTrap, actually belonging to the data) Label), set nmpvlTrap.
  • the information carried in each of Snmpv2Tra and Snmpv3Trap is correspondingly set to the first-level sub-label or the second, third-level sub-label of SiimpvlTra Snmpv2Tra and Sn..mpv3Tm according to the relationship shown in Table 1 or Table 2.
  • FIG. 5 is a schematic diagram of a model in which the SiimpTrap is encapsulated into an XK L format according to an embodiment of the present invention.
  • PdtiDa includes +t1 ⁇ 2estamp, gentaddr, eid, sid, and vbs, and each part is in a parallel relationship. Therefore, in the Smrtpv iTYap encapsulation method shown in FIG. 5, the timestamp, agentaddr.dd, sid, and vbs shown in Table 1 are respectively set to the same sub-label of SnmpvlTrap; and the community shown in Table I, this implementation It will be set to an attribute in the example.
  • Snmpv2T p is encapsulated in the same way as Snmpv lTrap.
  • the content of PduDaia shown in Table 2, such as vb, is set to the subscript of Snmpv2Trap.
  • the content further included in vb, such as d and value, is set to vb subtag.
  • the next sub-label and the Snmpv3T p encapsulation method only adds the contextname and ontextid. to the Stimpv2Tra encapsulation method.
  • SnmpvZTrap sub-label shown in B5 further includes a Snmpv2trapGroup sub-label.
  • the sub-label is set only for the convenience of describing the subsequent Smmpv Yap encapsulation mode.
  • the SnmpTrap encapsulation method in the embodiment of the present invention encapsulates all the contents shown in FIG. 4 in “ay” shown in FIG. 4, and is encapsulated in "arty”.
  • SUMMARY also meet model shown in Figure 4 a housing substructure
  • This example is used to notify the client that the i interface of the device in the system is down.
  • the corresponding event notification is a Snrapvltra alarm.
  • the com.mun.it is "public” and the timestam is “3:40”.
  • Ageniaddr is 10.1 1 1.64.12 ⁇
  • gid is " L3.6.1.4.1.201 ⁇ ⁇ sid is " 2
  • sid is " 0"
  • the alarm has a vb
  • the vb of the old is " 1 , 3 ,6 ⁇ 4 ⁇ 2011,2, ", value is "2 ⁇ ”» .
  • XSD XML model definition
  • the session processing module sends the event notification encapsulated in the XML format to the client.
  • the subscription request sent by the client may further carry the format request information, which is used to indicate that the client wants to receive the request.
  • the event notification format generated by the server is XML-Snmpvl U'ap format, but the client wants to receive the event notification in XML-Snmpv2trap format: H0 will further include: Session processing module XML-Snmpv Event notification in hrap format is converted to XML-Snmpv.2trap format.
  • the change can be an extensible type table language conversion (XSLT modecca).
  • XSLJ is a language for describing how XML documents are converted. It is closely integrated with the XPath standard. Both work on the development of network data management. XPath is used to specify the content that needs to be converted, and XSLT provides a description. How to implement the corresponding mutual complement of the conversion, XSLT t specifies a series of rules for converting the source XML document into an XML document.
  • the resulting XML document can be ML-Snmpvltrap.XML- Snmpv'2trap. XK'IL-Snmpv3ira and XML-s.vs g can complete the conversion process based on these rules through the XSUT processor.
  • XSLT It can also be used to convert XML documents to other formats, such as Hypertext Link Markup Language (HTML).
  • HTML Hypertext Link Markup Language
  • FIG. 6 is a schematic diagram of a rule for converting XML-Snmpv2lrap and XML-Snmpv ltrap by XSLT according to an embodiment of the present invention.
  • timestamp > community and vbs are converted in two formats;
  • XML-Snmpvltrap Eid is a fixed value, which is a parameter input before the conversion script escapes; and the trapoid. in XML-Snmpv2trap and g'td and sid in XML ⁇ Smnpv!tra will follow the rules shown in the block in Figure 6.
  • Line conversion, ie: impokT l, 3.6 l A3.1. l .5J 5 ⁇ , corresponding to the converted gki and ski are 0, when the trapoid takes other values, the corresponding gki and sid conversion rules please refer to the following Inverted.
  • sid is 0
  • FIG. 7 is a flowchart of a second preferred embodiment of the method of the present invention. Compared with the embodiment shown in FIG. 3, the event notification generated by the server is sys g.
  • this embodiment includes:
  • an SSH session is established between the client and the session processing module, and the process of establishing an SSH session is prior art.
  • the guest terminal sends a subscription request to the session processing module.
  • the event notification type, the filtering type, and the required filtering result information carried in the subscription request are assumed.
  • the event notification type subscribed by the client is all events with the stream "sys!ogover netconl", and the filtering type.
  • the filtering result is the priority 15 event.
  • the event notification can be specified in the subscription request to be stored in the syslog-subscripti n.profik file, and the specified subscription is the same as 2001-12-24Tl2. :23:45.
  • a existing 4 has clearly defined the format of the event notification request of NETCONF.
  • the subscription request sent in this step is only for the application of the prior art and has been exemplified as follows:
  • Event Processing Center sends sys!og information to the notification management module
  • the event processing center When an event occurs in the system, the event processing center generates an event notification of the corresponding type according to the event type. Assume that the syslog information sent by the event processing center to the notification management module in this step includes both priority events.
  • the notification management module filters according to the subscription list.
  • the notification management module finds the client that subscribes to the syslog type event notification by using the subscription event notification type information of the client stored in the subscription list, and filters through the XPath according to the stored filtering type and the required filtering result information. Get event notifications that only include events with a priority of 8 - 15
  • the notification management module sends the filtered event notification to the session processing module.
  • the session processing module encapsulates the event notification into an XML format
  • the method for encapsulating the sys g-type event notification into the XML format in the embodiment of the present invention is: encapsulating the information carried in the syslog into the label content of the event-passing model according to the event notification model of the existing NETCONF protocol, and The encapsulated content also conforms to the hierarchy of the existing NETCONF protocol event notification model.
  • the syslog consists of three parts: P1, HEADE, and MSG, where: PRI further includes MsgSource and Severity; HEADER. Further includes timestam and agentaddr; the information included in the MSG is set according to actual needs. Therefore, in this embodiment, Encapsulate event notifications in syslog format into XML format > Just set sysiog as a label, and set the information carried in systog to the first or second level of syslog according to the above hierarchical relationship.
  • FIG. 8 is a schematic diagram of a model in which syslog is encapsulated into an XML format according to an embodiment of the present invention.
  • the S P I> HEADER and MSG three components of Figure 8 is arranged to sys! Og three sub-label, PRJ.
  • HEADER and MSG information included in each set were further PRI 3 ⁇ 4 HEADE cup and check sub-MSG .
  • the sysiog tag shown in 3 ⁇ 4 8 further includes a sys!ogs tag. The purpose of this tag is to show that multiple sys g can be packaged in the same sys!ogs for sending c.
  • the syslog encapsulation method described in the embodiment of the present invention encapsulates all the contents shown in FIG. 8 in "any” shown in FIG. 4, and the content encapsulated in "any” is also To conform to the hierarchy of the model shown in Figure 4,
  • This example is used to notify the client that one interface down event of the device in the system, and the generated event notification is sysl g.
  • PR1 is 8
  • timestamp is "2001- ⁇ '2-24 ⁇ 2: 23: 45 ⁇ agentaddr is " 10.1 U .641 T
  • the interface index of the alarm is ⁇
  • the alarm information is "iinkdown" -
  • the text of the XSD file encapsulated in XML format is:
  • the session processing module sends the event notification encapsulated in an XML format to the client.
  • the subsequent processing process is similar to the embodiment shown in FIG. 3, and is no longer obscured.
  • FIG. 9 is a schematic structural diagram of a system embodiment of the present invention. As shown in Figure 9, the system includes a client 903 and a server 902;
  • the client 901 is configured to subscribe to the event notification in the server 902, and receive an event notification sent by the server 902.
  • the server 902 is configured to generate an event notification when an event occurs in the system, and convert the event notification into a format recognizable by the client 90i, and send the event to the client 90L.
  • the server specifically includes: a session processing module 902!, a notification management module 9022, and an event processing center 9023;
  • the session processing module is configured to send the subscription request received by the client 91 to the subscription event type to the notification management module 9022, and convert the response message received from the notification management module 9022 into an XMI_ format, and then send the response message to the client. End 901; receiving from the notification management module 9022 The event notification converts the event notification to an XML format and sends it to the client 9 ( ⁇ ;
  • the notification management module 9022 is configured to add a subscription request received from the session processing module 902] to the pre-saved subscription list and send back a response message to the session processing module 9021 for success or failure; receive an event notification from the event processing center 9023, Filtering to the client that subscribes to the event notification according to the subscription list, and sending the event notification to the session processing module 9021;
  • the event processing center 9023 is configured to generate an event notification of a type corresponding to the event when an event occurs in the system, and send the event notification to the notification management module 9022.
  • the above-mentioned subscription request may further be configured with the filtering type and the required filtering result information.
  • the notification management module 9022 is further configured to: filter the client 901 according to the filtering class i and the required filtering result information.
  • the event of the subscription is well known.
  • the above-mentioned subscription request may further carry format request information; correspondingly, the session processing module 9021 is further configured to convert the event notification in the XM.L format into the format requested in the format request information of the client 901.
  • the technical solution of the embodiment of the present invention is effective to be compatible with various forms of event notification; and, because the SSH connection bearer protocol is used between the client and the server, and SSH uses a TCP connection, the content is encrypted. Therefore, the reliable arrival of the event notification and the security of the information content are ensured; in addition, since the event notification is sent by using the XML text stream, the XSUT can be easily converted at any level, thereby facilitating the subsequent processing of the client; In addition, in the embodiment of the present invention, multiple event notification batches are allowed to be placed in the same XML file for transmission, which reduces transmission consumption, and the embodiment of the present invention is convenient to implement filtering and subscription, and the filtering method is flexible, and can be implemented for Personalization of each II standard ('Harget)
  • the client specifically includes: a subscription module and a receiving module;
  • the subscription module is configured to subscribe to an event notification in the NETCONF server, and the receiving module is configured to receive an event notification sent by the NETCONF server, where the event notification is that the NETCONF server has an event in the system, according to the
  • the information related to the event notification subscribed by the subscription module converts the generated event notification into an event notification in a format recognizable by the NETCONF client
  • the program may be stored in a computer-readable storage medium, and when executed, the program includes the steps of the method embodiment.
  • the storage medium of the foregoing includes: Various media that can store program code, such as ROM, RAM, disk or optical disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Description

基于网絡配置协议的事件通知发送方法及系统 本申请要求于 2007卑 7月 ό日提交中国专利局的名称为: 《基于 络配 置协议的事件通知发送方法、 系统及设备》, 申请号为: 20071.0126058.0的专 利申请的优先权, 其全部内容通过引用结合在本申请中 技术领域
本发明涉及移动通信技术, 特别:涉及一种基于网络配置协议的事伴通知 发送方法及系统(. 背景技术
针对 SNMP的诸多缺陷、现有技术中提出了网絡配置协议< NETCONF )., NETCO F 基本上解决了 SNM.P 的缺点, 适合大型且复杂的设备管理。
NETCONF 是一种分层管埋的配置协议 用于提供网络设备的配置安装、 维 护以及删除等机制, 使用可 T展标识语言 (XML )封装配置教据 其协议操 作承载在筒单的远程过程调用 ( RPC )层上 e
图 1 为现有 ETCONF的分层结构示意 ¾ 如图 I所示,现有 NETCONF 从概念上共分为四层, 其中第―层为传输协议层 (Transport Protocol ), 常用 的协议有区块 展交换协议 ( BEEP )、安全外壳( SSH )、安全套接层协议( SSL ) 以及控制台程序 ( console )等; 第二层为 RPC屡, 包括 RPC以及 FC响应; 第三层为操作层, 常用的搡作包括获取配置 ( Gei- con g ) , 編辑配置 ( Edit^contig ) 以及事件通知 ( Notiilcaiion )等; 第四层为内容层, 或称配置 管理层, 用于实现对配置数据 (Configuration Data ) 的管理„
NETCONF 协议中, 为反时获知系统中发生的事件, 这里所提到的事件 是指一些设备发生的, 症该引起注意 '的事情, 比如: 配置改变、 故 I , 状态 改变、 门限越界以及异常侵入等 系统需要提供事件通知 为此 NE'iCO F 客户端需要向 NETCONF服务器订阅事件通知,如果订阅成功 则 NETCONF 服务器将在订阋列表中记录下该 NETCONF客户端的订阅消息 这样, 当系 统内部有事件产生时 ETCONF 服务器会根据记录的订阅消息, 向 ETCONF客户端发送事件通知, 以便告知 NETCONF客户端当前事'件的发 生情况 如果发生以下情况, 如 NETCONF会话终止、 事件不在订阋范围之 内;或者事件订阅变更, 則 NETCQNF服务器将不再向 N 'rcONF客户端发送 事件通知 需要说明的是, NETCONF 服务器中用于亊件通知的会话, 始终 不用处理 RK 请求
但是, 上述事件通知仅仅是针对 NETCONF的底部三层进行的定义, 现 有技术中还没有一种针对 NETCONF的完整的四层结构进行定义的事件通知 方式 所以 希望借助于现有的其它应用环境中的类似的事件通知方式, 来 实现 NETCON 中的事件通知 , 发明内容
本发明实施例提供一种基于网络配置协议的事件通知发送方法, 能够兼 容各种事件通知方式, 以实现网络配置协议中的事件通知„
本发明实施例同吋提供一种基于网络配置协议的事件通知发送系统, 能 够兼容各种事伴通知方式, 以实现网络配置协议中的事件通知
本发明实施例还提供一种基于 i¾络配置协议的事件通知发送设备, 能够 兼容各种事件通知方式 以实现 络配置协议中的事件通知,
本发明实施例还提供一种基于网絡配置协议的事件通知接收设备, 能够 兼容各种事件通知方式 以实现 絡配置协议中的事件通知
本发明实施例的技术方案是这样实现的:
一种基于网;絡配置协议的事件通知发送方法, 包括:
NETCON 服务器接受 NETCONF客户端钉阅事件通知;
当系统中有事件发生时, 所述 NETCON 服务器生成事件通知, 并很椐 所述 NETCONF客卢端订阅的事件.逸知的相关信息将所述事件通知转换为所 迷 NETCONF客户端能够识别的格式;
所述 NETCOKF服务器向所述 NETCONF客户端发送所述经过转换的事 件通知„
―种基于网络 ^置协议的事件通知发送系统, 该系统包括: NBTCONF 客户端和 NETCONF服务器; 所迷 NBTCO F客户端 用于在所述 NETCONF服务器中订阅事件通如 -. 并接:收所迷 NETCONF服务器发送的事件通知;
所述 ETCONF服务器 用于在系统中有事件发生时, 生成事件通知, 并根据所迷 NETCONF客户端订阅的事件通知的相关信息将所迷事件通知转 换为 NETCONF客户端能够识別的格式后 > 发送至所迷 NEl'CO F客户端。
—种基于网络配置协议的事件通知发送设备 该设备为 NETCONF服务 器, 所述 NETCONF服务器包括: 会话处理模块、 通知管理模块以及事件处 理中心;
所述事件处理中心, 用于当系统中有事件发生时 生成事件通知÷ 并向 所述通知管理模块发送所迷事件通知;
所述通知管理模块, 用于接受 NETCONF客户端订阅事件通知、 并根据 所述订阅的事件通知: 向所迷会话处理模块转发所述事件处理中心发送的事 件通知;
所述会话处理模块, 用于将所述通知管理模块发送的事件通知转换为所 迷 NETCONF客户端能够识别的格式 发送給所述 NETCONF客户端
―种基于网络配置协议的事件通知接收设备, 该设备为 NETCONF客户 端, 所述 ETCONF客户端包括: 订阅模块以及接收模块;
所述订阅模块, 用于在 NETCONF服务器中订阅:事件通知;
所述接收模块 用于接收所迷 NETCONF服务器发送的事件通知, 所述 事件通知为所述 ETCONF服务器在系统中有事件发生时 根据所述订阅模 块了阅的事件通知的相关信息将所生成的事件通知转换为 NETCONF ,客户端 能够识别的格式的事件逃知„
可见, 采用本发明实施例的技术方案, 当系统中有事件发生时, 服务器 可以根据需要生成对应方式的事件通知, 并将生成的事件通知转换为客户端 要求的格式 进而发送给客户端。 这,样, 对于整个系统来说, 因为事件通知 格式可以转換, '所以, 对服务器端生成的事件通知格式没有严格限定, 从¾ 使得基于网络配置协议的事件通知能够兼容各种事件通知方式
下面通过附图和实施例, 对本发明的技术方案做进一步的详細描述 附图说明
m 1为现有 NETCONF的分层结构示意图;
JI 2为本发明方法实施例的总体流程图;
S 3为本发明方法第一个较佳实施例的流程 S;
m 4为现有 NETCONF协议事件通知模型示意 S;
m 5为本发明实施例 SnmpTmp封装为 XML格式的模型示意图; 图 为本发明通过 XSLT实现 XML-Snrapv2trap和 XML-Snmpv trap之 间的转换的规则示意图;
图 7为本发明方法第二个较佳实施倒的流程图;
图 8为本发明实施例 sysiog封装; ¾ XML格式的模型示意图;
m 9为本发明系统实施例的組成结构示意 ® 具 -体实旅方式
为使本发明的 的、 技术方案及忧点更加清楚明白, 以下参照附 a并举 实施例, 对本发明作进一步地详细说明. :.
¾前、 应用比较广泛的事件通知方式主要有简单网络管理协议告警
( Sn.mpTrap )以及系统日志( sysiog X 其中 SnmpTrap又具体分为三个版本, Ssnpv I Trap、 Snsnpv2 Trap以及 Siimpv3 Trap,
网络莩案(RFC) 1157中具体描述了如何通过 SnmpvlT p发送告警消 息给上居应用, 并定义了 SnmpvlTrap协议教据单元( PDU )的格式、 如表 1 所示:
i版 号 协议教据单元数据 ί PduData )
('CO 5 企 - ■ 变量绑 ¾对
n-vei- 3 1 Mntt ) 标 -i 标识 ( v riabii -bindirt fa] }
( '.nterp Ci a (Timer
rise} ί' e-it' latiip} 变量 f"变
标识 (;Va3ue)
1 ( ane) t
Smnpv l'l rappdii组成格式 其中 , Version > 用于标识该 Snmpvi Trappdu消息的版本:
Community 5 用千上层应用对告警消息发送方进行身份验证;
Enieiprise, 即企业 码, 比如 ^ ) 3;
Agent-addr, 用于标识告警消息发送方的互联^协议( IP ) 地址;
Gimerioi p, 用于标识需要告警的六种通常情况, 包括: 冷^动 ( eoidStart ) 热启动( warmStart:),连接故障( inkDown )、连接建立 ( f idJp ): 认证失欧 ( nihcnticaliOii aifure ) 以及相邻的外部路由器失效或关机 ί egpNeighborLoss ), 在实际应用中, 可以用整数 0-5分別代表上述六种情 况;
Specific-trap, 用于标识需要告警的特殊情况, 比如, 用户自定义的某种 情况;
Time- s mp, 用于标识告警时间;
Variablc-binding[il, 用于标识具体告警内容 一条告警消息中可以包括 多个 variable-binding;
ame 用于标识告警对象 如接口或中央处理单元(CPU) 等;
Value, 用于标识事件内容, 如接《 down或者过栽等 β
RFC !905 中描迷了如何通过 Srtmpv2Trap发送告警消息给上层应用, 并
Figure imgf000007_0001
表 2 Snrapv2 Trappdu组成格式
表 2中各部分的含义与表!中类似, 不再赘述
Snmpv3Trappdu的格式与 nmpv2Trappdy类似, 区别仪在于在 Snmpv2 Trappdu格式的基础上增加一个上下文名称 ( Cont xtname ) 以及一个上下文 标识 ( ContextlD ),
it过上迷 SnmpTrap虽然可以实现告警, 但是 现有 SnnipTmp使用用户 数据报协议(UDP)进行承载, 而 IJDP本身并不是可靠协议, 所以, 采用 SnmpTrap 进行告警可能会造成报文无法可靠到达的问题; 而且, 由于 SnmpTra 使用二进^的 PDU报文进行封装,解析时需要使用专门的函数戽, 所以影响其通用姓; 再有, SnmpT¾tp无法兼容其它的事件通知方式
FC3I64 中描述了如何通过 sys!og 发送系统 E 志给上县应用, 并规定 syslog 具体格式, 如表 3所' 示:
优先级 ( PRS ) 消息头 (HEADER) ¾息内容 ί MSG )
1,
{ ¾c5Shy*8 +' Severity - P \ )
2 ::
13志.来¾ 严玄程度 时问戮 : ·-■_ 系統
ΐ i Fa i!ttv } ( S v rilv I ( TfMEST
AMP)
表 3 sys g组成格式
如表 3所示 完整的 syslog消息由三部分组成, 即 PRI, HEADER以及 SG„
其中, Faci ty, 用于标识 Θ志的来源, -在实际应用中, 用不同的代码 ( umerical Code .) 来代表不同的日志:来源, 如表 4所示:
!jmi;rt ¾l Code F¾ iliiy
0 ½心摸块信息《 kernel me$sa¾es )
ΐ it i ser-tc t m ssage^ )
2
■、
; 统. ' ΐτ" ( $y5-?!iJti daem ns {
SYSiXXi系统产生的消息 < messages generated hternall by ¾slogd ? I 行打 '印子系统 ( line rinter >u st m )
网络新; · :子系 ί { iie!wok n ws s'ubsys
拷贝千^ ( JUCP ibsy t i )
ίί ( clock da nion {Yioi 2) )
Figure imgf000009_0001
表 4 不同代码与不同 Facilit 的对应关系
Severity, 用于标识消息的严重程度, 在实际应用中, 用不同的代码来代 表不 等级的严重程度, 如表 5所示:
Figure imgf000009_0002
.表 5 不同代码与不同 Severity的对应关系 在确定了 Fadlity以及 Seve y之后, 即可计算该 sysiog消息的优先级 计算方式为 "Faci ity^S + Severity - PRl'% 其中的 8为取值固定的系数
HEADER具体包括 TIMES TAMP 以及助 STNA亂 其中的 TIMES TAMP用于标识日志发生时间;. HOSTNAME用于标识产生该日志的系统, MSG的内容需要艮据实际情况具体确定、所以在 systeg消息格式中不作 具体限定
举例说明:
<34>OCE 1! 22: 14:15 my賺 chine u: ,su root' failed for lonvick on /dev/pis/8
Facilit '~4 ( security/authoriz.ation messages (note I ) }, Sev rit "2 ( Cntica!: critical conditions )
上面这个例子所表示的含义是: 设备通知日志主机, 某用户进行超级用 卢的权限认证, 但是认证失酞; 因为属于安全认证的事件, 所以 Faci ily ; 此事件很重要, 但是还没有影响设备的正常运行, 所以 Severky=2。
与 SnrnpTrap类似, sys og虽然可以实现系统 志报告,但由于使用 UDP 进行承载,而 UDP本身并不是可靠协议,所以存在报丈无法可靠到达的问题, 而且, syslog也无法兼容其它事件通知方式; 此外, sys g虽然使用文本方式 封装, 但由于该丈本方式是简单字符串格式, 不容易解析, 所以影响了其通 用性
前面已经提到, 由于现有技术中还没有一种针对 NETCONF的宄塾的四 层结构进行定义的事件通知方式, 所以, 希望借助于现有的其它应用环境中 的类似的事件通知方式, 来实现 NETCONF 中的事件通知 但是, 由于 Snmp'i'rap和 sysk>g都有其各自的缺陷 加上采用的协议以及报文格式等与 HETCONF 的区别, 现有 SnmpT p 以及 sysiog 并不能被简单地应用到 NETCONF中
本发明的实旄方式基于 NETCONF协议, 其中, NETCONF客户端 (以 下简称客户端)在 NETCONF服务器(以下简称服务器) 中订阅事件通知; 当系统中有事件发生时, 服务器生成事件通知, 并将生成的事件通知转换为 客户端能够识别的格式, 发送至客卢端 ,
图; 2为本发明方法实施例的总体流程 如图 2所示, 包括:
201 : 客户端在服务器中订阅事件通知
本步骤中, 客户端在服务器中訂阅事件通知的方法为: 客户端向服务器 发送携带有订阅的事件通知类型的订闳请求; 订阅成功后, 服务器将订阅请 求信息加入到预先设置的订阅列表中 该订阅列表用于存储订阅了事件通知 的客卢端的相关信息, 如上述订阅的事件通知类型信息, 当然. 如果有其它 的信息, 也将相应地进行存储; 并且, 服务器生成订阅成功与否的响应消息, 并将读响应消息转换为 XML格式后发送给客户端
本步職之前, 进一步包括: 客户端与服务器之间建立基于传输控制协议
( TCP ) 的会话, 如 会话
202: 当系统中有事件发生时 服务器生成事件通知 并将生成的事件通 知转换为客户端能够识別的格式, 发送至客户端
当系统中有事件发生时, 服务器根据事件类型, 生成对应类型的事件通 知 > 并根据订阅列表中存储的订阅的事件通知类型信息査找到订阋该类型事 件通知的客户端 > 向其发送事件通知
通常情况下 如杲客户端没有特殊要求, 服务器会按照默认方式将谅事 件適知封装为 XML格式后; 发送至客户端,,
如果客户端希望接收其它格式的事件通知 那么在 20! 中的订 ^请求中 将进一步携带格式请求信息, 相应地, 本步骤中, 服务 II将进一步将封装为 XML格式的事件通知转化为客户端所请求的格式
上迷事件通知可以是各祌现有事件通知方式, 如 SnmpTrap或 s g 这 种情¾下, 201 所述的订阅请求中可以进一步携带有过滤类型以及所要求得 到的过滤结果信息 u 其中, 过滤类型包括子树(SUBTREE )过滤以及 XML 路径语言( Xpath )过滤 表示服务器将采用何种过滤方式以获取.客户端所要 求的过滤结果; 所要求得到的过滤结果信息根据客户端订阅的事件通知类型 的不同而不同: 如莱订阅的事件通知类型为 SmmpTrap, 则所要求得到的过滤 结果用于说明订 1¾1的具体 SnmpTra 类型: SnmpvITrap, Snmpv2Tra 或 Snmpv3Trap; 若订阅的事件通如类型为 sysh^ 则所要求得到的过滤结莱用 于说明订阅的事件的优先级或优先鈒范國,
相应地, 20 中 服务器将根据订阅列表中存储的过滤类型以及所要求 得到的过滤结杲信息过滤得到客户端实际订阅的事件通知 -,
下面通过较佳实施例对本发明方法作进一步地详细说明:
图 3为本发明方法第一个较佳实施例的流程图 本实施例基于 NETCONF 协 假设 J 务器端生成的事件通知为 SnmpTrap, 本实^例中的服务器包括 会话处理模块 ( Session handler ), 通知管理模块 { Notification Manager.)以及 事件处理中心 ( Event Center ),
如图 3所示 A、 B, C , 、 F、 G分别表示不同的处理线程, 其中 A 表示客卢端 ( Client ) 处理线程; B表示服务器会话的消息接收处理线程; C 表示服务器会话的消息反馈处理线程; E表示服务器订阅处理线程; F表示服 务器会话 Τπφ接收线程; 3表示设备内部事件发生源。
如图 3所示, 该实施例包括:
首先, 客户端与会话处理模块之间建立 SSH会话 ÷ 以用于客户端与会话 U) 处理模决之间后续的信息交互 可根椐相关协议建立 SSH会话、 此处不再赞 述
301 : 客户端向会话处理模块发送订阅请求
订阅请求中携带有订阅的事件通知类型、 过滤类型以及所要求得到的过 滤結果信息,,假设本实施例中,客卢端订阅的事件通知类型是流为 "Snmptrap !i over netconr 的所有事件, 过滤类型为子树过滤 所要求得到的过滤结杲为 "Snmpv Urap"格式的事件
现有技术中已经对 NETCONF的事件通知订阅请求的格式进行了明确定 义, 本步骤中发送的订阅请求只是对现有技术的应用而已. 举例如下:
<? mi version^" 1 ,0" encod S ng= UTF - 8 " ?>
0 rpc xm In s - " um: i etf : params: x m I ; ns : n eic nf : base: 1 '0" m!ns:notiiy";1rui :!etf:pararas:xmI:ns:n Hc nf^
xmlnsinetconf- ^n^i tfi arams!xmims!netcon^base: ! .0''
Figure imgf000012_0001
, org/2001 / ML Scii e ifi a- ί n stance"
Figure imgf000012_0002
1.(3
2ί D :\projt t X 4i..Aiie{con xsd\NC-Notificati.on.xsd message-id- ' 101 H>
<create-s u bscri pti on
xin I n s= " u \i\:. i et ;par am s :xm!: ns:netcon f.noti fication: 1.0">
<streams>
<sl,ream>sniT3 Tra >Pdu over netcon f</stream> </st eams> .〃订阅流为" snmpirap over neic mf,的所有事件
<fdter t pe^'subti-ee^ //过滤类型为子树过滤
<top ΧΠ11 ns="h t :/7hu awei om comm/f ra "
<snmpTrapFdu>
<snnip ltrap >
</snmpTrapPdu 〃过滤结菜为 "smnpvltrap"格式的事件
< top>
< f1iter>
<named-proli I e> notifi cation ,ρΐοΐι! e</named- profi 1 e>
<startTime>200l -! 2-24T 12:23:45</startTime>
< create"Siibscription>
</rpc>
302: 会话处理模块将接收到的订^请求写入到通知管理模块的待处理数 据队列中。
303: 通知管理模块处理订阅请求, 并在订阅成功后, 将所述订阅请求加 入到预先设置的订 列表中
304: 通知管理模块向会话处理模块发送响应消息„
本步骤中 通知管理模块生成订阅成功与否的响应消息, 并写入会话处 理模块的待处理数据队列中
305 : 会话处理模块将该响应消息转换为 XML格式..
由于在 中生成的响应消息可能为设备内部的语言格式, 比如 c, 此, 本步骤中需要对响应消息的格式进行转换
306: 会话处理模块向客户端发送响应消息。
会话处理模块将生成的 XML格式的订阅成功与否的响应消息发送给客 户端
307: 事件处理中心向通知管理模块发送 Smnptrap告警信息
当系统中有事件发生时, 事件处理中心根据该事件类型, 生成相应类型 的事件通知。 比如, 该事件为认证失改 * 则生成 Snmpv ltrap告警信息„ 假设本步骤中事件处理中心向通知管理模块发送的 Srimptmp告警信息中 同时包括 Snmpv S trap Snnipv'2trap„
3 OS: 通知管理模块根据订阅列表进行过滤。
通知管理模块根据订阅列表中存储的客户端的订阅事件通知类型信息找 到订阅 Snmpi p类型事件通知的客户端, 并根据存储的过滤类型以及所要求 得到的过滤结果信息, 通过子树过滤, 得到 "Snmpvkrap"格式的事件通知 也可以使用 path过滤方式; 得到 *' Snmpv 1 trap" 格式的事件通知 两 种过滤方式均为现有技术 不再详细介绍。 但是需要说明的是, 本实施 中 无论采用哪种过滤方式,都是以事件通知的一个完整 PDU为基本单元进行过 滤的, 即不对信息内部进行过滤, 以保证信息的完整性
309: 通知管理模块向会话处理模块发送过滤后的事件通知
通知管理模块以响应消息的方式将该事件通知^入到会话处理模块的待 处理数据队列中
310; 会话处理模块将事件通知封装为 XML格式。
本发明实施例中将 SnmpTrap格式的事件通知封装为 XML格式的方式 为:
依据现有 NETCONF协议的事件通知模型, 将 SnmpTrap中携带的信息 封装到所速事件通知模型的标签内容中, 并且封装后的内容也要符合现有 NETCONF协议事件通知模型的层次結构.
图 4为现有 NETCONF协议事件通知模型示意图 如图 4所示, 其中的 "事件通知( !ioti icadon )" 和 "数据(date )" 分別表示兹模型的标签和子标 签; 虛线方框表示标签内容; dMa 子标签所属标签内容中的 "任意 (any )" 表示该部分内容可按照需要任意添加信息; notifkaiion和 data两标签之间的 符号 (包括 data标签后边的符号)表示前后两部分为序列化(sequence )结 构:,
由于现有技术中的 SnmpTrap 包括 Snmpv〗T p , Snmpv2Tra 以及
Snmpv3Tra 三种类型、 而且已知 Snmpv 1 Trap, Snmpv2Trap和 Snmpv3.Trap 的各自构成- 所以, 本实施例中将 SNMFi'rap 设置为标签(相对于 个 SNMPTrap 而言称为标签, 实际属于 data 的子标签), 将 nmpvlTrap. Snmpv2Trap以及 Snmpv3TVa|设置为 SNMP p的子标签; 将 Snmpv 1 Trap, Snmpv2Tra 以及 Snmpv3Trap中各自携带的信息按照表 1或表 2所示关系分 对应地设置为 SiimpvlTra Snmpv2Tra 以及 Sn..mpv3Tm 的第一级子标签 或第二, 第三级子标签
图 5 为本发明实施例 SiimpTrap封装为 XK L格式的模型示意图 以 Snmpv !Trap为例进行说明,如表 1所示, PdtiDa 包括 +t½estamp、 gentaddr, eid、 sid以及 vbs, 各部分为平行关系, 所以, 图 5所示的 Smrtpv iTYap的封 裝方式中, 将表 1所示的 timestamp、 agentaddr. dd、 sid以及 vbs分別设置 为 SnmpvlTrap的同一级子标签; 而表 I 中所示的 community, 本实施例中会 将其设置为一个属性。 Snmpv2T p的封装方式与 Snmpv lTrap类似, 即将表 2所示的 PduDaia中的内容如 vb, 分別设置为 Snmpv2Trap的子标甚, 将 vb 中进一步包括的内容, 如 d和 value分別设置为 vb子标签的下一鈒子标签 而 Snmpv3T p的封装方式则只是在 Stimpv2Tra 封装方式的基础上增加了 contextname以及 ontextid.,
需要说明的是, B 5 所示 SnmpvZTrap 子标签后进一步包括一个 Snmpv2trapGroup 子标签, 该子标签的设置只是为了便于描述后续 Smmpv Yap的封装方式, 并无实际意义
结合图 4和图 5 , 相 ί括而言, 本发明实施例所述的 SnmpTrap封装方式就 是将 ¾ 5所示内容全部封装在图 4所示 "a y" 中, 并且封装在 "arty" 中的 内容也要符合图 4所示模型的屋次结构 a
举例说明:
本示例用于通知客户端, 系统中设备的 i个接口故障(down ) 事件, 对 应生成的事件通知为 Snrapvltra 告警, 其中的 com.mun.it 为 "public" , timestam 为 "3:40"、 ageniaddr为 10.1 1 1.64.12^ , gid为 " L3.6.1.4.1.201 Γ\ sid为" 2,,、sid为" 0" ;该告警有一个 vb,且该 vb的 old为" 1 ,3,6丄4丄2011 ,2, ", value为 "2·"» .、
将该示例所示 Snmpvltrap 告警封装为 XML 格式的 XML 模型定义 ( XSD )丈件文本为:
<?xm! version-" 1 ,0" e ricod i ng=" UTF-S " ?>
<notificati m xrnliis="um: .tf:params:jinil:ns:riet£orif:iiotitkatk>n'J .0" ni Ins: hwtrap=' ' x p :/ liuawe i , com/conmion/trap^
Mmlnsnoiify^^urrdetf^param^xni riS^etc' mfnoitifi cation: ί.Ο'*.
xmlns: xs ί - htt : /7vvww,w3. org/2001 /X L, Schema- ί n stan ce "
x sirschemaLocati on= ! hitp : /huaw 'LC om/coramon/trap
D:\proj ectVX L rietconl\x sd snmptrap.xsd">
<data>
<snmpTrapPdu xml ns-- < htt : ima we i .com/ci)iii ]i o n/te-ap" > <snnipvltrap com m un ity™ " n bl i c "
<ti mcstamp>3 :40 </t! mestamp>
<agentaddr>10.111.64.12< agentaddr>
<etd> ] 6.〗 .4.〗 .201 ! </eid>
<gid>2 /gid>
<sld>0</sid>
<v s>
<yb>
<oid> 1 ,3.6.1 A. \ 2011.2.1 </old
<val ue 2(Iink down)</value>
</vb>
</vbs>
</snmpv I trap>
</smii.p'rrapPdu >
</data>
</noiification>
311 : 会话处理模块将封装为 XML格式的事件通知发送给客户端 需要说明的 , 本实施例中, 客户端发送的订阅请求中还可以进一步携 带有格式请求信息, 用于说明客卢端希望接收到的事件通知格式 比如, 服 务器生成的事件通知为 XML-Snmpvl U'ap 格式, 但是客户端希望接收到 XML-Snmpv2trap格式的事件通知, 则 : H0将进一步包括: 会话处理模决将 XML-Snmpv hrap格式的事件通知转换为 XML-Snmpv.2trap格式,所朱用的转 换方式可以为可扩展类型表语言转换(XSLT 方式„
XSLJ是一种用于描述 XML文档之间如何转换的语言, 它同 XPath标准 紧密结合 二者共冏致力于网络数据管理的开发工作 XPath 用于指定需要 进行转换的内容, 而 XSLT 则提供了描述如何实现转换的相应的互,补语言.、 XSLT t规定了一系列将源 XML文档转换为绪果 XML文档的规则, 对于本 发明实施例来说,結果 XML文档可以为 ML-Snmpvltrap.XML-Snmpv'2trap . XK'IL-Snmpv3ira 以及 XML-s.vs g等 通过 XSUT处理器即可完成基于这些 规则的转换过程., 当然, 除了用于源 XML文档向结杲 XML文档的转换外, XSLT还可以用于实现 XML文档向其它格式文梏的转换,比如超文本链接标 识语言 (HTML )等
图 6 为本发明 实施例通过 XSLT 实现 XML-Snmpv2lrap 和 XML-Snmpv ltrap 之间转换的规则示意 L 如图 6 所示, 两种格式中的 timestamp > community以及 vbs进行对应转换; XML-Snmpvltrap中的 eid为 固定值, 为转换脚本逸行之前输入的一个参数; 而 XML-Snmpv2trap 中的 trapoid.和 XML^Smnpv!tra 中的 g'td以及 sid将按照图 6中的程序段所示的规 则迸行转换, 即: impokT l,3.6 l A3.1. l .5J 5†, 对应转换后的 gki和 ski 均为 0, 当 trapoid取其它值时, 对应的 gki和 sid的转换规则请参照下面的倒 子。
依图 6所示, 实现 XML-Sn.mpv2tra 与 XML-Siimpv ltrap之间的转换 举例说明, ML-Sii!r)pv2lrap向 ML^Snmpv I tra 转换的 XSLT脚本如下:
Figure imgf000017_0001
< sl;st} esheet verston=" \ .0" xmlns:xsi=r'http:/y vwwA\e.org/I 99/XSL/Transfbi"m'r>
<xsl: output method=" ;n3)" version™" 1 X encod ing-" UTF- 8 ' ' indent- "ye s"/> ^
<xsl;tempiaie mate f /" >
<xsl: variable name- 'eid" > i 3*6.1 .4.1.201 l</xsl:variable>
<xs!:foi'each se i ect- " sn mpTrapPdu ' '>
<x¾I -.element n細 , sm"np'TmpPdu"> <xs or-each select="snmpv2irap">
<xsi: el ment name="snmpv 1 tmp'>
<xs attnbute rmme="co醒誦 ity ">
<xs):vaiue ii\seleci™, ¾conimunity,,/'>
</xsl;aitribut.e>
<timestaiiip>
< 5l: value -of sekci-^timestamp"-- </tiitiestamp>
agentaddr>0,0,0.0<agentaddr>
<xsl:choose>
xsl;vvhen
test^'trapoid^ & .quot; 13,6,1,6.3.1.1,5.1 &quot;">
<eid>
<xsl:value-of seleci""'r$eid">
</eid>
<gid>0</gid
<sid>0<skl
</xsl:wten> //当 trapoid为 L3.6丄 6 1丄 5. 时, 对应转换后的 gid和 sid为 0
<xsi:when
tes ="t p d=&qu(>i;! ,3.6.1.6.3.1.1.5.2&ί|ΐκ¾;">
<eid>
<xsl:value-of select- '$eid'V>
</eid>
Figure imgf000018_0001
</xsl;when> //当 trapoid 为 1 6丄 63丄 1,5.2 时,
对应转换后的 gkl为 1 , sid为 0 xslwhesi
Figure imgf000019_0001
1 ,3,6, 1 Α3Λ丄; 5.3&quot;'f>
<eid>
<xs!val ue-of sele t=" $eid"
<e\d>
<gid>2</gid>
<sid>0</sid>
</xsl:when> 〃当 trapoid 为 13.6..1 «6.3.1.1.5.3 时>
对应特换后的 gid为 2, sid为 0
<xsl:when
Figure imgf000019_0002
1 ,3.6.1.6.3.1 , 1.5,4&quot;tF
<eid>
xsl:va! ue-of s iect-" $eid " />
</eid>
<gid 3<7gid>
<sid>0</sid>
<xsi: hen> /7当 tmpoid为 1.3 >6、 1 ,6.3 · U .5 A 时,
对应转换后的 gid为 3, sid为 0
< stwh
test=,itrapoid-&quot; 1.3.6.〖 .6.3.1.】 .5(5<&quot-"
<eid>
<xsl:value'- of
Figure imgf000019_0003
</ id>
<gid>4</gid>
<sid>0</sid>
</xsl;w.hen> 〃当 trapoid为 1.3,6.1.6.3, 1.1.5.5 时, 对应转换后的 gid为 4, sid为 0 xsl:when
lestWtrapoid &quot; 1 ,3.6.1 <6,3.1.1 ·5.6&(ϋ<)ί;">
<esd>
<xsi: value-of $ciect™u$eid'7>
<eid>
<gid>5</gi(i
<sic>0</ssd>
</xsl: when> //当 traposd为 1.3.6.1.6.3 ,1.1.5.6 对应转换后的 gid为 5* sid
<xsl:other ise>
esd>
<xsi;vaiue-of select^"Seid"/
</eicl>
<gid>6<gid
<sid>
<xshvalue-of
s l eci"" substring(trapo id ,stii ng- 1 ength(trapoid)-2 ss triiig»]eigth(trapo i d ) 7>
<sid>
</xsl:otherwise> 〃当 tmpo 取其它值时,对应 转换后的 gk为 6
sid按照 "sdect=.,,.,," 所迷方式取值
<xsl: choose>
<xsl:cop -of seject^^vbs'':'- </xsl;elemeni>
<xsl:for-each>
</xsl;ejement> </xsl:f r-eadi>
</xsi:tempIate>
<xsi:stylesheet>
图 7为本发明方法第二个较佳实施例的流程图 本实施例与图 3所示实 施例相比, 服务器端生成的事件通知为 sys g
如围 7所示, 该实施例包括:
首先,客户端与会话处理模块之间建立 SSH会话, 建立 SSH会话的过程 为现有技术
701: 客卢端向会话处理模块发送订阅请求。
订降请求中携带有订阅的事件通知类型、 过滤类型以及所要求得到的过 滤結果信息 假设本实施例中,客户端订阅的事件通知类型是流为 "sys!ogover netconl"的所有事件,过滤类型为 Xpath过滤 所要求的过滤结果为优先级 15 的事件 进一步地, 还可以在订阅请求中指定将事件通知存储到 syslog-subscripti n.profik文件中 ,指定订阋开始时同为 2001-12-24Tl2:23:45.a 现有 4 术中已经对 NETCONF的事件通知 ΐΤ阅请求的格式进行了明确定 义, 本步骤中发送的订阅请求只是对现有技术的应用而已 举例如下:
<?xml version-" 1.0" encod i n = " UTF- 8 '1 ?>
<rpc x m 1 ns ~ |:f u m : i etf :param s :xml: rsstnetconf: base:! , xmlns: noti '麵: ί et fiparam s;翻 ms:ne icon f:noli il cati on; 1,0"
xm I n s:. tietcoii f- "« rn: ietf:para ois:xinl:ns: netcon f: bas : ί · 0 "
mhis;xsi-, tt ; wwwAv3Arg2001
Figure imgf000021_0001
xsi:sdien L ca on=;"iirn:ietf:params:xml:ns:'ne:t 3i f:iic 'iik'atiori:L0
D:proj ectlXML' ietcon xsclXNC -Noti ficatii n.xsd" message- id=" 10 i 1'>
<create-subscription
mlns-" urn: ietf:params:xm.l:ns:netconf:notj fi cati on; 1.0">
<streams>
<stream syslog over netc on f</stream>
</streams> 〃订阅流为" sys g over ntcoiif '的所有事件 <filter ty e="xpathi1 select^Vs slogs/s slog/V IIMsgSource- j"^ //采用 Xpath过滤方式, 得到优先级为 g ~〗5的事件 <name d~pro i !e>s ys I og~sub scri tt on . protl ie < named - ro fi 1 e> /存储 到指定文件
<startTime>2001 2-24Ti2:23:45</start.Time> 〃订阅开始时间 </create-su bsc rlpts. ors>
</rpc>
?02 - 706与 3{》2 ~ 306类似, 不再赘述
707: 事件处理中心向通知管理模块发送 sys!og信息
当系统中有事件发生时, 事件处理中心根据该事件类型, 生成相应类型 的事件通知。 假设本步骤中事件处理中心向通知管理模块发送的 syslog信息 中同时包括各个优先级的事件
708; 通知管理模块根据订阅列表进行过滤。
本步骤中, 通知管理模块根椐订阅列表中存储的客户端的订阅事件通知 类型信息找到订阅 syslog类型事件通知的客户端, 并根据存储的过滤类型以 及所要求得到的过滤结果信息,通过 Xpath过滤,得到只包括优先级为 8 - 15 的事件的事件通知,
也可以通过子树过滤方式, 得到 "优先級为 8 5的事件的事件通知, ' 两种过滤方式均为现有技术, 不再详细介绍, 但是需要说明的是、 本实施例 中无论采用哪种过滤方式,都是以一条完整的 syslog为基本单元进行过滤的 即不对信息内部进行过滤, 以保证信息的完整性
709: 通知管理模块向会话处理模块发送过滤后的事件通知.,
710: 会话处理模块将事件通知封裝为 XML格式
本发明实施例中将 sys g袼式的事件通知封装为 XML格式的方式为: 依据现有 NETCONF协议的事件通知模型, 将 syslog中携带的信息封装 到所述事件通 模型的标签内容中, 并且封装后的内容也要符合现有 NETCONF协议事件通知模型的层次结构
如表 3所示' syslog由 P 1、 HEADE 以及 MSG三部分组成,其中: PRI 进一步包括 MsgSource以及 Severity; HEADER.进一步包括 timestam 以及 agentaddr; MSG中包括的信息根据实际需要进行设置。 所以, 本实施例中要 实现将 syslog格式的事件通知封装为 XML格式 > 只需将 sysiog设置为标签, 将 systog中携带的信息按照上述层次关系分別设置为 syslog的第一级或第二 级子标签
图 8为本发明实施例 syslog封装为 XML格式的模型示意图。 如 S 8所 示 P I> HEADER以及 MSG三个组成部分被设置为 sys!og的三个子标签, 而 PRJ. HEADER 以及 MSG 各自所包括的信息则被进一步设置为 PRI ¾ HEADE 以及 MSG的子杯签。 ¾ 8所示的 sysiog标签之前进一步包括一个 sys!ogs 标签, 该标签的作用是.为了说明可以将多个 sys g 封装在同一个 sys!ogs中进行发送 c
结合图 4和图 8, 概括而言, 本发明实施例所述的 syslog封装方式就是 将图 8所示内容全部封装在图 4所示 "any" 中, 并且封装在 "any" 中的内 容也要符合图 4所示模型的层次结构,
举例 i 明:
本示例用于通知客户端, 系统中设备的 1 个接口 down事件, 生成的事 件通知为 sysl g。 其中; PR1为 8、 timestamp为 "2001- Ι'2-24Ή2: 23: 45\ agentaddr为" 10.1 U .641 T 、告警的接口索引为 Ί 告警信息为 "iinkdown" -、 将该示例所述 sy& og封装为 XML格式的 XSD文件文本为:
<?xml version-" 1.0" en codi ng=" UTF- 8 ' '?>
<not{fication xmlns~"urn: i etf : pararas ; xm I : ns : netcon f : noti flcafion: ί ,0" xm J ; h wsy slog= "htip : /ltua ei .com common/sys] og"
xmins:nolify ':um: tf,pai.ams:xmi:ns:i teonf:!iotificai:ion:】 .(Γ
Figure imgf000023_0001
xs i: schemaLocfit on=" http :/ h u awei . c om c mmon/syslog s s log.xsd ">
<data>
<sysIogs xm I n s-" http :// hua we i .com/co iimon/sy s! og ''>
<sysIog>
<PR1>
<MsgSout'ce i < sgSource>
<Severily>0 /Severity> <:/PRI>
<HEADER>
<iimestamp>2001»l 2-24 T 12:23 ;45<7timestamp>
<agentadiress> Ϊ 0. i 11.64.12</a entaddress>
</!iEADER>
< SG>
<top xiri!ns=f1ttp:/yhuawei omsyslogmsg''>
<code>2011 </cod >
<iflndex>i<ifindex>
<¾larmiofo>Jinkdown<a!arninfo
</top>
Figure imgf000024_0001
<s slog>
</s slogs>
< ata>
</notification>
711: 会话处理模块将封装为 XML格式的事件通知发送给客户端 后续处理过程与图 3所示实施例类似, 不再赘迷
依据上述方法 图 9为本发明系统实施例的組成结构示意图。 如围 9所 示, 该系统包括客户端 903和服务器 902;
客户端 901, 用于在服务器 902中订阅事件通知, 并接收服务器 902发 送的事件通知;
服务器 902, 用于在系统中有事件发生时, 生成事件通知, 并将事件通 知转换为客户端 90i能够识别的格式后发送给客户端 90L
其中 服务器具体包括: 会话处理模块 902!、 通知管理模块 9022 以及 事件处理中心 9023;
会话处理模块 用于将接收自客户端 9 1的携带有订阅事件通如类 型的订阅请求发送至通知管理模块 9022, 并将接收自通知管理模块 9022 的 响应消息转化为 XMI_格式后发送至客户端 901;接收来自通知管理模块 9022 的事件通知 将事件通知转换为 XML格式后发送至客户端 9(Π ;
通知管理模块 9022 , 用于将接收自会话处理模块 902] 的订阅请求加入 预先保存的订阅列表 并且向会话处理模块 9021回送订 ¾成功与否的响应消 息; 接收来自事件处理中心 9023的事件通知, 根据订阅列表过滤到订阅该类 型事件通知的客户端、 并将事件通知发送到会话处理模块 9021 ;
事件处理中心 9023, 用于在系统中有事件发生时, 根据需要生成与事件 对应的类型的事件通知, 并将事件通知发送至通知管理模块 9022
上述订闳请求中可进一步構带有过滤类型以及所要求得到的过滤结果信 息; 相应地, 通知管理模块 9022进一步用于, 根据过滤类 i以及所要求得到 的过滤结果信息过滤得到客户端 901实际订阅的事件適知。
如果需要, 上述订阋请求中还可进一步携带有格式请求信息; 相应地, 会话处理模块 9021进一步用于 将 XM.L格式的事件通知转换为客户端 901 的格式请求信息中所请求的格式
可见, 采用本发明实施例的技术方案 实现了有效地兼容各种形式的事 件通知方式;而且,由于客户端和服务器之间采用 SSH连接承载协议 而 SSH 采用 TCP连接, 对内容进行了加密处理, 所以保证了事件通知的可靠到达以 及信息内容的安全性; 此外 由于使用 XML 文本流的方式发送事件通知, 在任何层面都能够较为容易的使用 XSUT对其进行转换, 从而方便了客户端 的后续处理; 再有, 本发明实施例中允许将多个事件通知批量放在同一 XML 文件中进行传送, 减少了传送消耗, 而且 本发明实施例要实现过滤订阅非 常方便, 不但过滤方式灵活, 而且可以实现针对每个 II标('Harget )的个性化 过
其中, 客户端具体包括: 订阅模块以及接收模块;
所述订阅模块, 用于在 NETCONF服务器中订阅事件通知; 所述接收模 块, 用于接收所述 NETCONF服务器发送的事件通知, 所述事件通知为所述 NETCONF 服务器在系统中有事件发生时, 根据所述订阅模块订阅的事件通 知的相关信息将所生成的事件通知转换为 NETCONF客户端能够识别的格式 的事件通知
本领域普通技术人员可以理解: 实现上述方法实施倒的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前迷的程序可以存储于一计算机可读 驭存储介质中, 该程序在执行时, 执行包括上迷方法实施例的步骤; 前述. 的存储介盾包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的介 质
最后应说明的是: 以上实施例仅用以说明本发明的技术方案 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前迷各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围„

Claims

权利 要求
1、 一种基于网络配置协议的事件通知发送方法, 其特征在于, 包括: NETCONF服务器接受 NETCONF客户端订阅事件通知;
当系统中有事件发生时, 所述 NETCONF服务器生成事件通知, 并根据 所述 NETCONF客户端订阅的事件通知的相关信息将所述事件通知转换为所 述 NETCONF客户端能够识别的格式;
所述 NETCONF服务器向所述 NETCONF客户端发送所述经过转换的事 件通知。
2、 根据权利要求 1所述的方法, 其特征在于, 所述 NETCONF服务器接 受 NETCONF客户端订阅事件通知之前还包括:
所述 NETCONF客户端与所述 NETCONF服务器之间建立基于传输控制 协议 TCP的会话。
3、根据权利要求 1或 2所述的方法, 其特征在于, 所述 NETCONF服务 器接受 NETCONF客户端订阅事件通知具体包括:
所述 NETCONF服务器接收所述 NETCONF客户端发送的订阅请求, 所 述订阅请求中携带有订阅的事件通知类型信息;
所述 NETCONF服务器在订阅成功后将所述订阅请求加入预先设置的订 阅列表中。
4、 根据权利要求 3所述的方法, 其特征在于, 所述方法还包括: 所述 NETCONF服务器生成订阅的响应消息, 并将所述响应消息转换为 可扩展标识语言 XML格式后发送至所述 NETCONF客户端。
5、 根据权利要求 3所述的方法, 其特征在于, 所述 NETCONF服务器生 成事件通知具体包括:
所述 NETCONF服务器根据所发生的事件类型, 生成与所述事件类型对 应类型的事件通知。
6、 根据权利要求 5所述的方法, 其特征在于, 所述 NETCONF服务器将 所述事件通知转换为所述 NETCONF客户端能够识别的格式之前还包括: 所述 NETCONF服务器根据所述订阅列表中存储的订阅的事件通知类型 信息, 查找到订阅所述类型事件通知的 NETCONF客户端。
7、 根据权利要求 6所述的方法, 其特征在于, 所述 NETCONF服务器将 所述事件通知转换为所述 NETCONF客户端能够识别的格式具体包括:
如果所述订阅请求中没有携带格式请求信息, 则所述 NETCONF服务器 将所述类型事件通知封装为 XML格式;
如果所述订阅请求中进一步携带有格式请求信息, 则所述 NETCONF服 务器首先将所述类型事件通知封装为 XML格式, 然后, 将所述封装为 XML 格式的事件通知转换为所述 NETCONF客户端的格式请求信息中所请求的格 式。
8、 根据权利要求 7所述的方法, 其特征在于, 所述事件通知类型为筒单 网络管理协议告警 SnmpTrap或系统日志 syslog。
9、 根据权利要求 8所述的方法, 其特征在于, 所述订阅请求中进一步携 带有过滤类型以及所要求得到的过滤结果信息。
10、 根据权利要求 9 所述的方法, 其特征在于, 所述过滤类型为子树 SUBTREE过滤或 XML路径语言 Xpath过滤。
11、 根据权利要求 9或 10所述的方法, 其特征在于, 所述 NETCONF服 务器将所述事件通知转换为所述 NETCONF客户端能够识别的格式之前还包 括: 得到的过滤结果信息过滤得到所述 NETCONF客户端实际订阅的事件通知。
12、 根据权利要求 8所述的方法, 其特征在于, 若所述事件通知的类型 为筒单网络管理协议告警 SnmpTrap,则所述 NETCONF服务器将事件通知封 装为 XML格式具体为:
所述 NETCONF服务器依据 NETCONF协议的事件通知模型, 将所述 SnmpTrap 中携带的信息封装到所述标签内容中, 封装后的内容符合所述 NETCONF协议事件通知模型的层次结构, 所述事件通知模型为标签、 子标 签以及标签内容的层次结构, 所述子标签为数据 data标签, 其对应的标签内 容中可任意添加信息。
13、 根据权利要求 8所述的方法, 其特征在于, 若所述事件通知的类型 为系统日志 syslog,则所述 NETCONF服务器将事件通知封装为 XML格式具 体为:
所述 NETCONF服务器依据 NETCONF协议的事件通知模型, 将所述 syslog 中携带的信息封装到所述标签内容中, 封装后的内容符合所述 NETCONF协议事件通知模型的层次结构, 所述事件通知模型为标签、 子标 签以及标签内容的层次结构, 所述子标签为 data标签, 其对应的标签内容中 可任意添加信息。
14、 根据权利要求 13所述的方法, 其特征在于, 所述 syslog 由优先级 PRL 消息头 HEADER以及消息内容 MSG三部分组成; 其中, 所述 PRI中 进一步包括日志来源 MsgSource以及严重程度 Severity信息; 所述 HEADER 中进一步包括 timestamp以及 agentaddr信息; 所述 MSG中包括的信息根据 实际需要进行设置;
所述 NETCONF服务器将 syslog中携带的信息封装到所述标签内容中的 方法具体为:
所述 NETCONF服务器将 syslog设置为标签, 并将所述 syslog中携带的 信息按照所述层次关系分别设置为所述 syslog标签的不同级别子标签。
15、 根据权利要求 14所述的方法, 其特征在于, 所述方法还包括: 所述 NETCONF服务器设置一个标签 syslogs, 将一个或一个以上的所述 syslog标签设置为所述 syslogs的子标签。
16、 根据权利要求 14所述的方法, 其特征在于, 所述 NETCONF服务器 将封装为 XML格式的事件通知转换为所述 NETCONF客户端的格式请求信 息中所请求的格式的方法为:
所述 NETCONF服务器通过可扩展类型表语言转换 XSLT方式, 将所述 XML格式的事件通知转换为 NETCONF客户端所请求的格式。
17、 一种基于网络配置协议的事件通知发送系统, 其特征在于, 该系统 包括 NETCONF客户端和 NETCONF服务器;
所述 NETCONF客户端,用于在所述 NETCONF服务器中订阅事件通知, 并接收所述 NETCONF服务器发送的事件通知;
所述 NETCONF服务器, 用于在系统中有事件发生时, 生成事件通知, 并根据所述 NETCONF客户端订阅的事件通知的相关信息将所述事件通知转 换为 NETCONF客户端能够识别的格式后, 发送至所述 NETCONF客户端。
18、 一种基于网络配置协议的事件通知发送设备, 该设备为 NETCONF 服务器, 其特征在于, 包括: 会话处理模块、 通知管理模块以及事件处理中 所述事件处理中心, 用于当系统中有事件发生时, 生成事件通知, 并向 所述通知管理模块发送所述事件通知;
所述通知管理模块, 用于接受 NETCONF客户端订阅事件通知, 并根据 所述订阅的事件通知, 向所述会话处理模块转发所述事件处理中心发送的事 件通知;
所述会话处理模块, 用于将所述通知管理模块发送的事件通知转换为所 述 NETCONF客户端能够识别的格式, 发送给所述 NETCONF客户端。
19、 根据权利要求 18所述的设备, 其特征在于,
所述会话处理模块具体用于将接收自 NETCONF客户端的携带有订阅事 件通知类型的订阅请求发送至所述通知管理模块, 并将接收自所述通知管理 模块的响应消息转化为 XML格式后发送至所述 NETCONF客户端; 接收来 自所述通知管理模块的事件通知, 将所述事件通知转换为 XML格式后发送 至所述 NETCONF客户端;
所述通知管理模块具体用于将接收自所述会话处理模块的订阅请求加入 预先保存的订阅列表, 并且向所述会话处理模块回送订阅成功与否的响应消 息; 接收来自所述事件处理中心的事件通知, 根据所述订阅列表过滤到订阅 所述类型事件通知的 NETCONF客户端, 并将所述事件通知发送到所述会话 处理模块;
所述事件处理中心具体用于在系统中有事件发生时, 根据需要生成与所 述事件对应的类型的事件通知,并将所述事件通知发送至所述通知管理模块。
20、 根据权利要求 19所述的设备, 其特征在于, 所述订阅请求中进一步 携带有过滤类型以及所要求得到的过滤结果信息;
所述通知管理模块进一步用于, 根据所述过滤类型以及所要求得到的过 滤结果信息过滤得到所述 NETCONF客户端实际订阅的事件通知。
21、 根据权利要求 19所述的设备, 其特征在于, 所述订阅请求中进一步 携带有格式请求信息;
所述会话处理模块进一步用于, 将所述 XML格式的事件通知转换为所 述 NETCONF客户端的格式请求信息中所请求的格式。
22、 一种基于网络配置协议的事件通知接收设备, 该设备为 NETCONF 客户端, 其特征在于, 包括: 订阅模块以及接收模块;
所述订阅模块, 用于在 NETCONF服务器中订阅事件通知;
所述接收模块, 用于接收所述 NETCONF服务器发送的事件通知, 所述 事件通知为所述 NETCONF服务器在系统中有事件发生时, 根据所述订阅模 块订阅的事件通知的相关信息将所生成的事件通知转换为 NETCONF客户端 能够识别的格式的事件通知。
PCT/CN2008/071217 2007-07-06 2008-06-06 Procédé et système pour envoyer les notifications d'événements sur la base du protocole netconf WO2009006808A1 (fr)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP08757628.6A EP2166699B1 (en) 2007-07-06 2008-06-06 A method and system for sending the event notices based on netconf
ES08757628T ES2432793T3 (es) 2007-07-06 2008-06-06 Un método y un sistema para enviar las notificaciones de eventos basadas en NETCONF
US12/614,179 US8103731B2 (en) 2007-07-06 2009-11-06 Method and system for sending a NETCONF-based notification

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2007101260580A CN101110822B (zh) 2007-07-06 2007-07-06 基于网络配置协议的事件通知发送方法、系统及设备
CN200710126058.0 2007-07-06

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/614,179 Continuation US8103731B2 (en) 2007-07-06 2009-11-06 Method and system for sending a NETCONF-based notification

Publications (1)

Publication Number Publication Date
WO2009006808A1 true WO2009006808A1 (fr) 2009-01-15

Family

ID=39042714

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/071217 WO2009006808A1 (fr) 2007-07-06 2008-06-06 Procédé et système pour envoyer les notifications d'événements sur la base du protocole netconf

Country Status (5)

Country Link
US (1) US8103731B2 (zh)
EP (1) EP2166699B1 (zh)
CN (1) CN101110822B (zh)
ES (1) ES2432793T3 (zh)
WO (1) WO2009006808A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006812A (zh) * 2021-10-30 2022-02-01 杭州迪普信息技术有限公司 网络设备的配置方法及装置
CN114221884A (zh) * 2021-11-18 2022-03-22 新华三技术有限公司合肥分公司 心跳报文的订阅方法及装置

Families Citing this family (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237443B (zh) * 2007-02-01 2012-08-22 华为技术有限公司 管理协议中对用户进行认证的方法和系统
CN101110822B (zh) 2007-07-06 2011-11-02 华为技术有限公司 基于网络配置协议的事件通知发送方法、系统及设备
CN101562578B (zh) * 2008-04-16 2012-02-01 华为技术有限公司 一种用户数据订阅通知方法及装置
CN101909043A (zh) * 2009-06-03 2010-12-08 中兴通讯股份有限公司 一种基于简单网络管理协议的数据传输的方法及系统
CN101764707B (zh) * 2009-12-30 2012-08-08 成都市华为赛门铁克科技有限公司 网络配置事件通知消息的处理方法、转换装置和处理系统
US20130091197A1 (en) 2011-10-11 2013-04-11 Microsoft Corporation Mobile device as a local server
AU2012322684B2 (en) * 2011-10-11 2017-05-25 Microsoft Technology Licensing, Llc Event service for local client applications through local server
CN102355374A (zh) * 2011-10-28 2012-02-15 杭州华三通信技术有限公司 一种数据获取方法和设备
TWI462526B (zh) * 2012-11-22 2014-11-21 Accton Technology Corp The processing method of network device and its power failure signal
CN104883266B (zh) * 2014-02-28 2018-10-12 新华三技术有限公司 网络配置访问方法及装置
CN104883267B (zh) 2014-02-28 2018-07-20 新华三技术有限公司 网络配置访问方法及装置
CN105471604A (zh) * 2014-08-19 2016-04-06 中兴通讯股份有限公司 一种定制事件通知的方法、服务器和系统
CN105656643B (zh) * 2014-11-10 2020-08-14 中兴通讯股份有限公司 一种基于网络配置协议进行兼容管理的方法及设备
CN105827424A (zh) * 2015-01-07 2016-08-03 中兴通讯股份有限公司 数据获取方法及装置
CN105991579B (zh) * 2015-02-12 2019-05-28 华为技术有限公司 信息发送方法、相关网络设备以及系统
US9715380B2 (en) * 2015-05-26 2017-07-25 Cisco Technology, Inc. Techniques for enabling dynamic update of device data models
CN104967696A (zh) * 2015-07-29 2015-10-07 网神信息技术(北京)股份有限公司 日志发送方法和装置
KR101655966B1 (ko) * 2015-09-11 2016-09-08 동아대학교 산학협력단 Netconf 프로토콜의 rpc 계층 개선을 위한 장치 및 방법
US10135940B2 (en) * 2015-12-04 2018-11-20 Oracle International Corporation Subscribing to event notifications using object instances
CN107222321B (zh) * 2016-03-21 2020-08-14 华为技术有限公司 一种配置报文发送方法及装置
CN114222314A (zh) 2016-07-06 2022-03-22 华为技术有限公司 一种网络连接配置方法及装置
WO2018049677A1 (en) 2016-09-19 2018-03-22 Telefonaktiebolaget Lm Ericsson (Publ) Method for network management based on netconf protocol, and associated network device
CN107872337A (zh) * 2016-09-26 2018-04-03 中国电信股份有限公司 信息转换方法、装置和系统
US11848871B2 (en) 2017-10-23 2023-12-19 Nokia Solutions And Networks Oy Network slice management
US20200389458A1 (en) * 2017-12-04 2020-12-10 Telefonaktiebolaget Lm Ericsson (Publ) Network Management Device and Centralized Authorization Server for NETCONF
US10721124B2 (en) * 2018-04-06 2020-07-21 Cisco Technology, Inc. Cloud management connectivity assurance
CN109829085A (zh) * 2018-12-17 2019-05-31 深圳壹账通智能科技有限公司 报表订阅方法、装置、计算机设备和存储介质
CN111355601B (zh) * 2018-12-21 2022-05-10 华为技术有限公司 信息传输方法和装置
CN111866044A (zh) * 2019-04-29 2020-10-30 华为技术有限公司 数据采集方法、装置、设备及计算机可读存储介质
US11368298B2 (en) * 2019-05-16 2022-06-21 Cisco Technology, Inc. Decentralized internet protocol security key negotiation
CN112054916B (zh) * 2019-06-06 2023-04-18 烽火通信科技股份有限公司 事件自动化转换的方法及系统
CN112583621B (zh) * 2019-09-30 2022-03-25 华为技术有限公司 一种自动退出试运行的方法、设备和系统
CN112671818A (zh) * 2019-10-16 2021-04-16 华为技术有限公司 数据订阅方法、装置及系统
US10958539B1 (en) * 2019-12-02 2021-03-23 Cisco Technology, Inc. Network function virtualization compute element image upgrade
CN113132127A (zh) * 2019-12-30 2021-07-16 中兴通讯股份有限公司 网络设备管理方法、系统及网络设备
CN111654555B (zh) * 2020-08-10 2021-12-03 南京云联数科科技有限公司 用于消息分发的方法、电子设备和存储介质
CN114205225A (zh) 2020-08-26 2022-03-18 华为技术有限公司 一种配置错误信息传输方法及设备
CN112199256A (zh) * 2020-10-16 2021-01-08 济南浪潮数据技术有限公司 一种部署事件监控方法、装置及设备
CN114039892B (zh) * 2021-11-26 2022-11-29 中电信数智科技有限公司 一种网络抖动分析及可视化方法及系统
CN114172786A (zh) * 2021-12-03 2022-03-11 中国电信集团系统集成有限责任公司 基于tr069协议和netconf协议的网络监控阈值动态调整方法及装置
CN114363222A (zh) * 2021-12-17 2022-04-15 中电信数智科技有限公司 一种基于Netconf协议的网络设备巡检方法和系统
CN114301817A (zh) * 2021-12-17 2022-04-08 中电信数智科技有限公司 基于Netconf协议的设备监测阈值设置方法和系统
CN115174352A (zh) * 2022-07-08 2022-10-11 中国电信股份有限公司 基于网络配置协议的事件通知发送方法及装置、介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509000A (zh) * 2002-12-15 2004-06-30 华为技术有限公司 一种网元内部实时数据的同步方法
WO2006127178A2 (en) * 2005-05-25 2006-11-30 Microsoft Corporation Methods, systems, and computer-readable media for synchronizing modifiable documents with multiple clients
CN1909466A (zh) * 2006-08-02 2007-02-07 中山大学 一种个人事务提醒系统
CN1921492A (zh) * 2006-09-27 2007-02-28 华为技术有限公司 配置管理方法和装置
CN101110822A (zh) * 2007-07-06 2008-01-23 华为技术有限公司 基于网络配置协议的事件通知发送方法、系统及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509000A (zh) * 2002-12-15 2004-06-30 华为技术有限公司 一种网元内部实时数据的同步方法
WO2006127178A2 (en) * 2005-05-25 2006-11-30 Microsoft Corporation Methods, systems, and computer-readable media for synchronizing modifiable documents with multiple clients
CN1909466A (zh) * 2006-08-02 2007-02-07 中山大学 一种个人事务提醒系统
CN1921492A (zh) * 2006-09-27 2007-02-28 华为技术有限公司 配置管理方法和装置
CN101110822A (zh) * 2007-07-06 2008-01-23 华为技术有限公司 基于网络配置协议的事件通知发送方法、系统及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2166699A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006812A (zh) * 2021-10-30 2022-02-01 杭州迪普信息技术有限公司 网络设备的配置方法及装置
CN114221884A (zh) * 2021-11-18 2022-03-22 新华三技术有限公司合肥分公司 心跳报文的订阅方法及装置
CN114221884B (zh) * 2021-11-18 2023-12-26 新华三技术有限公司合肥分公司 心跳报文的订阅方法及装置

Also Published As

Publication number Publication date
US8103731B2 (en) 2012-01-24
EP2166699A4 (en) 2010-09-22
EP2166699B1 (en) 2013-08-14
CN101110822B (zh) 2011-11-02
EP2166699A1 (en) 2010-03-24
ES2432793T3 (es) 2013-12-05
US20100057849A1 (en) 2010-03-04
CN101110822A (zh) 2008-01-23

Similar Documents

Publication Publication Date Title
WO2009006808A1 (fr) Procédé et système pour envoyer les notifications d&#39;événements sur la base du protocole netconf
US10609015B2 (en) Method and apparatus of providing messaging service and callback feature to mobile stations
US10785278B2 (en) Network management interface
EP3111619B1 (en) Network configuration access
US9438493B2 (en) Monitoring network entities via a central monitoring system
WO2010043142A1 (zh) 一种增强基于脚本业务的应用可靠性的方法、装置和系统
US11489724B1 (en) Processing instructions to configure a network device
WO2012122730A1 (zh) 基于Tr069协议获取设备状态的方法、ACS及系统
WO2016180089A1 (zh) 一种交换机的配置方法、装置、移动终端及交换机
AT&T
CN116938702A (zh) 用于网络管理系统的预测流水线分析
WO2016202025A1 (zh) 陷阱Trap报文处理方法及装置
US11729075B1 (en) Time series data collection for a network management system
CN118282863A (zh) 用于网络管理系统的查询机制
JP5246812B2 (ja) 通信システム、クライアント装置、サーバ装置及び通信設定方法
Reddy et al. Managing Heterogeneous Networks Using NETCONF

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08757628

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008757628

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE