CN104683149A - Seamless switching method between ssh (Secure Shell) and snmp (Simple Network Management Protocol) - Google Patents

Seamless switching method between ssh (Secure Shell) and snmp (Simple Network Management Protocol) Download PDF

Info

Publication number
CN104683149A
CN104683149A CN201510064965.1A CN201510064965A CN104683149A CN 104683149 A CN104683149 A CN 104683149A CN 201510064965 A CN201510064965 A CN 201510064965A CN 104683149 A CN104683149 A CN 104683149A
Authority
CN
China
Prior art keywords
snmp
ssh
information
data
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510064965.1A
Other languages
Chinese (zh)
Other versions
CN104683149B (en
Inventor
潘发光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yi Xun Network Technology Co Ltd
Original Assignee
Shandong Yi Xun Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yi Xun Network Technology Co Ltd filed Critical Shandong Yi Xun Network Technology Co Ltd
Priority to CN201510064965.1A priority Critical patent/CN104683149B/en
Publication of CN104683149A publication Critical patent/CN104683149A/en
Application granted granted Critical
Publication of CN104683149B publication Critical patent/CN104683149B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention relates to a method for remotely monitoring data collection of a Linux host computer, in particular to a seamless switching method between an ssh (Secure Shell) and an snmp (Simple Network Management Protocol). The seamless switching method comprises the steps of S101, command monitoring: monitoring a data collection command by a collection side, and receiving the data collection command; step S102, processing of the collection side: establishing corresponding connection according to the configuration information of the data collection command, and collecting data information through the corresponding connection; step S103, data information formatting: formatting the data information collected by the collection side; step S104, data information receiving: sending the formatted data information to a processing side, and receiving the corresponding data information by the processing side; step S105, information processing of a database: carrying out corresponding processing on the data information received by the processing side by the database. After the seamless switching method disclosed by the invention is adopted, the corresponding connection is established by judging the configuration information of the command, and the collected data information is formatted; existing data can be matched and updated when the switching between the ssh and the snmp is carried out, and historic data are reserved.

Description

A kind of ssh and snmp seamless handover method
Technical field
The present invention relates to method, particularly a kind of ssh and snmp seamless handover method that a kind of remote monitoring Linux host data gathers.
Background technology
SSH is the abbreviation of Secure Shell, formulated by the network work group of IETF; SSH is based upon the security protocol on application layer and transport layer basis.SSH is at present comparatively reliable, aims at the agreement that telnet session and other network services provide fail safe.Utilize the information leakage problem that SSH agreement can effectively prevent in remote management procedures.SSH is a program on unix system at first, expands to rapidly other operating platforms again afterwards.SSH can make up the leak in network when proper use of.Ssh client is applicable to kinds of platform, and nearly all unix platform one comprises HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix, and other platforms, all can run SSH.
Simple Network Management Protocol (SNMP), the standard managed by a group network forms, and comprises an application layer protocol (application layer protocol), database model (database schema) and one group of resource object.Whether this agreement can network enabled management system, have anyly cause the upper situation about paying close attention to of management in order to the monitoring equipment be connected on network.This agreement is a part for the internet protocol family that Internet Engineering Task group (IETF, Internet Engineering Task Force) defines.The target of SNMP is the hardware and software platform of numerous manufacturer production on managing internet Internet, and therefore SNMP is also very large by the impact of Internet standard network Governance framework.SNMP has gone out the agreement to the 3rd version, and its function has been strengthened widely than before and improved.
When needs remote monitoring Linux main frame, optional agreement has SNMP and SSH two kinds usually.These two kinds of collectable substances of agreement are similar, but the mode gathered, the unit etc. of data that collects are distinguished all to some extent.Generally need to monitor in the software of Linux main frame at O&M software or other, a kind of agreement can only be adopted to the monitoring of certain main frame.If need to change monitoring protocol, can only be the main frame before deletion, select another kind of monitoring protocol again to add this main frame.
Summary of the invention
A kind of method of carrying out ssh and snmp switching that can prevent historical data from losing of the technical issues that need to address of the present invention.
For solving above-mentioned technical problem, a kind of ssh and snmp seamless handover method of the present invention, comprises the following steps:
Step S101: snoop command, collection terminal monitored data acquisition, receives data acquisition command;
Step S102: collection terminal process, creates corresponding connection, by connecting image data information accordingly according to the configuration information of data acquisition command;
Step S103: data message formats, and the data message collected by collection terminal formats;
Step S104: data message receives, and the data message formatd is sent to end for process, end for process receives corresponding data information;
Step S105: database information process, the data message that end for process receives by database processes accordingly.
Further, described step S102 is further comprising the steps of,
Step S1021: command configuration information judges, judges, if the configuration information of snmp then enters step S1022, if the configuration information of ssh then enters step S1023 to the configuration information of data acquisition command in step S101;
Step S1022: create snmp and connect, creates snmp according to the configuration information of snmp and connects, enter step S1024;
Step S1023: create snmp and connect, creates ssh according to the configuration information of ssh and connects, enter step S1024;
Step S1024: connect according to the snmp created or ssh connection image data information.
Further, the process of described step S105 database information also comprises database information comparison operation and/or database information storage operation.
Further, described database information comparison operation comprises the following steps,
Step S1051: database information compares, data message end for process received and the information of database compare, if data message does not exist, then enter step S1052; If data message exists but configuration is not identical, enter step S1053;
Step S1052: data message adds, and adds in database by data message and corresponding configuration information;
Step S1053: configuration information update, upgrades the corresponding configuration information of data message;
Step S1054: acquisition sends, and sends corresponding data acquisition command and returns step S101.
After adopting said method, by judging that the configuration information of order creates corresponding connection, and the data message collected being formatd, then carrying out the process of database; Coupling can be carried out when carrying out ssh and snmp and switching to existing data like this to upgrade, retain historical data.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments to being originally described in further detail.
Fig. 1 is the flow chart of ssh and snmp seamless handover method of the present invention.
Fig. 2 is the schematic flow sheet of database information contrast operation in ssh and snmp seamless handover method of the present invention.
Fig. 3 is the flow chart that the specific embodiment of the invention carries out ssh and snmp seamless switching when monitoring disk partition.
Embodiment
As shown in Figure 1, a kind of ssh and snmp seamless handover method of the present invention, comprise the following steps, step S101: snoop command, collection terminal monitored data acquisition, receives data acquisition command.
Step S102: collection terminal process, creates corresponding connection, by connecting image data information accordingly according to the configuration information of data acquisition command.Step S102 can be divided into following several step to carry out:
Step S1021: command configuration information judges, judges, if the configuration information of snmp then enters step S1022, if the configuration information of ssh then enters step S1023 to the configuration information of data acquisition command in step S101.
Step S1022: create snmp and connect, creates snmp according to the configuration information of snmp and connects, enter step S1024.
Step S1023: create snmp and connect, creates ssh according to the configuration information of ssh and connects, enter step S1024.
Step S1024: connect according to the snmp created or ssh connection image data information.
Step S103: data message formats, and the data message collected by collection terminal formats.
Step S104: data message receives, and the data message formatd is sent to end for process, end for process receives corresponding data information.
Step S105: database information process, the data message that end for process receives by database processes accordingly.Step S105 of the present invention comprises database information comparison operation and/or database information compare operation, and wherein database information comparison operation comprises the following steps, as shown in Figure 2,
Step S1051: database information compares, data message end for process received and the information of database compare, if data message does not exist, then enter step S1052; If data message exists but configuration is not identical, enter step S1053.
Step S1052: data message adds, and data message and corresponding configuration information is added in database.
Step S1053: configuration information update, upgrades the corresponding configuration information of data message.
Step S1054: acquisition sends, and sends corresponding data acquisition command and returns step S101.
Below for the monitoring to disk partition, a kind of ssh and snmp seamless handover method of the present invention is further described.Comprise tolerance to the monitoring of disk partition gather and automatically find two parts, wherein discovery part is for determining disk partition title automatically, and tolerance gathers as disk partition tolerance gathers.
Enter step S201 after method starts, first need to determine disk partition title to the monitoring of disk partition, step S201 is used for monitoring disk partition name data acquisition.After listening to order, enter step S202 judge the configuration information in the current command, judgement is snmp configuration information or ssh configuration information.If snmp configuration information then enters step S203 create snmp connection, then connect acquisition disk partition title by step S204 by snmp; If ssh configuration information then enters step S205 create ssh connection, then connect acquisition disk partition title by step S206 by ssh.Then be no matter to be connected by snmp or ssh connects the disk partition title that obtains by the advanced formatting lines of step S207, then the disk partition title of format is sent to end for process, then step S208 end for process reception of magnetic disc partition name and configuration information.
Obtain the laggard row database information operation of disk partition title in end for process, wherein disk partition title first will carry out database information comparison operation, and the database information comparison operation of described disk partition title comprises step S209-S212.Wherein, disk partition title and database information compare by step S209, if disk partition does not exist, enter step S210 and add in database by disk partition information and configuration; If disk partition exists and configuration difference, enter step S211 Reconfigurations information.Then enter step S212 and send the order carrying out disk partition metric data collection.Now, the database information comparison of disk partition title has operated, and enters disk partition metric data collection when listening to the order of disk partition metric data collection.
Described disk partition metric data collection comprises step S213-S220, is introduced into step S213 and creates acquisition tasks, then enter the judgement that step S214 carries out configuration information in the order of a new round after listening to order.If snmp configuration information then enters step S215 create snmp connection, then connected and disk partition name acquiring disk partition capacity by snmp by step S216; If ssh configuration information then enters step S217 create ssh connection, then connected and disk partition name acquiring disk partition capacity by ssh by step S218.Then be no matter to be connected by snmp or ssh connects the disk partition capacity obtained and by step S219, the data message of the disk partition capacity collected is sent to process.Final step S220 after end for process receives data message stored in database.
The present invention is by first judging the configuration information of order, then different according to snmp with ssh different configuration informations set up respectively snmp be connected or ssh connect carry out data acquisition, and format then in stored data base to the data collected, carry out coupling to existing data like this to upgrade, retain historical data, the loss of historical data can not be caused like this, thus realize the seamless switching of snmp and ssh.
Although the foregoing describe the specific embodiment of the present invention; but those skilled in the art are to be understood that; these only illustrate; various changes or modifications can be made to present embodiment; and not deviating from principle and the essence of invention, protection scope of the present invention is only defined by the appended claims.

Claims (4)

1. a ssh and snmp seamless handover method, is characterized in that, comprises the following steps,
Step S101: snoop command, collection terminal monitored data acquisition, receives data acquisition command;
Step S102: collection terminal process, creates corresponding connection, by connecting image data information accordingly according to the configuration information of data acquisition command;
Step S103: data message formats, and the data message collected by collection terminal formats;
Step S104: data message receives, and the data message formatd is sent to end for process, end for process receives corresponding data information;
Step S105: database information process, the data message that end for process receives by database processes accordingly.
2., according to a kind of ssh and snmp seamless handover method according to claim 1, it is characterized in that, described step S102 is further comprising the steps of,
Step S1021: command configuration information judges, judges, if the configuration information of snmp then enters step S1022, if the configuration information of ssh then enters step S1023 to the configuration information of data acquisition command in step S101;
Step S1022: create snmp and connect, creates snmp according to the configuration information of snmp and connects, enter step S1024;
Step S1023: create snmp and connect, creates ssh according to the configuration information of ssh and connects, enter step S1024;
Step S1024: connect according to the snmp created or ssh connection image data information.
3. according to a kind of ssh and snmp seamless handover method according to claim 1, it is characterized in that: the process of described step S105 database information also comprises database information comparison operation and/or database information storage operation.
4. according to a kind of ssh and snmp seamless handover method according to claim 3, it is characterized in that, described database information comparison operation comprises the following steps,
Step S1051: database information compares, data message end for process received and the information of database compare, if data message does not exist, then enter step S1052; If data message exists but configuration is not identical, enter step S1053;
Step S1052: data message adds, and adds in database by data message and corresponding configuration information;
Step S1053: configuration information update, upgrades the corresponding configuration information of data message;
Step S1054: acquisition sends, and sends corresponding data acquisition command and returns step S101.
CN201510064965.1A 2015-02-09 2015-02-09 A kind of ssh and snmp seamless handover methods Active CN104683149B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510064965.1A CN104683149B (en) 2015-02-09 2015-02-09 A kind of ssh and snmp seamless handover methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510064965.1A CN104683149B (en) 2015-02-09 2015-02-09 A kind of ssh and snmp seamless handover methods

Publications (2)

Publication Number Publication Date
CN104683149A true CN104683149A (en) 2015-06-03
CN104683149B CN104683149B (en) 2018-09-14

Family

ID=53317776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510064965.1A Active CN104683149B (en) 2015-02-09 2015-02-09 A kind of ssh and snmp seamless handover methods

Country Status (1)

Country Link
CN (1) CN104683149B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453861A (en) * 2016-05-30 2017-12-08 中国科学院声学研究所 A kind of collecting method based on SSH2 agreements

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739423A (en) * 2011-04-08 2012-10-17 中兴通讯股份有限公司 Method, apparatus and network management system for performance data acquisition

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739423A (en) * 2011-04-08 2012-10-17 中兴通讯股份有限公司 Method, apparatus and network management system for performance data acquisition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453861A (en) * 2016-05-30 2017-12-08 中国科学院声学研究所 A kind of collecting method based on SSH2 agreements
CN107453861B (en) * 2016-05-30 2019-09-24 中国科学院声学研究所 A kind of collecting method based on SSH2 agreement

Also Published As

Publication number Publication date
CN104683149B (en) 2018-09-14

Similar Documents

Publication Publication Date Title
US20210176143A1 (en) Monitoring wireless access point events
WO2018028573A1 (en) Method and device for fault handling, and controller
US9280399B2 (en) Detecting, monitoring, and configuring services in a netwowk
CN105867837A (en) Method, equipment and system for updating configurations of clients in distributed high-speed cache systems
US10187272B2 (en) Interface management service entity, function service entity, and element management method
CN102820993A (en) Network resource monitoring system and network resource monitoring method
JP6433578B2 (en) Information self-registration method, apparatus, system, and computer storage medium
CN103973474A (en) Network terminal update configuration method
TW201703464A (en) Method and apparatus for acquiring network status data
CN116886497A (en) Service grid business centralized proxy switching method and processing system based on DPU
CN109039731B (en) Network management northbound interface alarm self-adapting method
CN104243198A (en) Network management method and system based on network configuration protocol
CN105530145A (en) Agentless equipment monitoring network based on ZABBIX framework, networking method and monitoring method
CN104683149A (en) Seamless switching method between ssh (Secure Shell) and snmp (Simple Network Management Protocol)
WO2023125034A1 (en) Failure cause determination method and apparatus
JP2014175841A (en) Network communication system, communication device, data backup method and program therefor
US20230164596A1 (en) Alarm log management system and method during failure in o-ran
WO2016101474A1 (en) Method and apparatus for monitoring configuration data and system therefor
JP6488600B2 (en) Information processing system, program, and information processing apparatus
CN112751706A (en) Target data transmission method and device
CN103248505A (en) View-based network monitoring method and device
WO2016065752A1 (en) Method and device for detecting link state, and storage medium
CN102684924A (en) Network management workstation and debugging method of network management software
KR101377461B1 (en) Remote Maintenance and Monitoring Service Framework for Heterogeneous Device and System
CN107306202B (en) Network management method, server, client and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 250101 room 1605-1, 16 floor, A3-1 building, Jingyu, Han Yu, Ji'nan hi tech Zone, Shandong

Patentee after: Shandong Yi Xun network technology Co., Ltd

Address before: 250101 West District, 27th Floor, Building 1, Osheng Building, 1166 Xinlu Street, Jinan High-tech Zone, Shandong Province

Patentee before: Shandong Yi Xun network technology Co., Ltd

CP02 Change in the address of a patent holder