CN104683149B - A kind of ssh and snmp seamless handover methods - Google Patents

A kind of ssh and snmp seamless handover methods Download PDF

Info

Publication number
CN104683149B
CN104683149B CN201510064965.1A CN201510064965A CN104683149B CN 104683149 B CN104683149 B CN 104683149B CN 201510064965 A CN201510064965 A CN 201510064965A CN 104683149 B CN104683149 B CN 104683149B
Authority
CN
China
Prior art keywords
information
data
ssh
snmp
data 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.)
Active
Application number
CN201510064965.1A
Other languages
Chinese (zh)
Other versions
CN104683149A (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 present invention relates to a kind of method of remote monitoring Linux host datas acquisition, especially a kind of ssh and snmp seamless handover methods, including step S101:Snoop command, collection terminal monitored data acquisition, receives data acquisition command;Step S102:Collection terminal processing creates corresponding connection, by connecting gathered data information accordingly according to the configuration information of data acquisition command;Step S103:Data information formats, and the collected data information of collection terminal is formatted;Step S104:Data information receives, and the data information formatted is sent to processing end, processing end receives corresponding data information;Step S105:Database information processing, database are handled the data information that processing end receives accordingly.After the above method, by judging that the configuration information of order creates corresponding connection, and collected data information is formatted;Matching update can be carried out to existing data when carrying out ssh and snmp and switching in this way, retain historical data.

Description

A kind of ssh and snmp seamless handover methods
Technical field
The present invention relates to a kind of methods of remote monitoring Linux host datas acquisition, and especially a kind of ssh and snmp is seamless Switching method.
Background technology
SSH is the abbreviation of Secure Shell, is formulated by the network work group of IETF;SSH is to establish in application layer With the security protocol on the basis of transport layer.SSH is relatively reliable at present, aims at telnet session and other network services provide peace The agreement of full property.The information leakage problem that can be effectively prevent using SSH agreements in remote management procedures.SSH is initially UNIX A program in system was rapidly spread to other operating platforms again later.SSH can make up the leakage in network when proper use of Hole.Ssh client be suitable for kinds of platform, nearly all unix platform one include HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix and other platforms, can all run SSH.
Simple Network Management Protocol (SNMP), is made of the standard of one group of network management, including an application layer protocol (application layer protocol), database model (database schema) and one group of resource object.The agreement Network Management System can be supported, to monitor whether the equipment being connected on network there are any feelings for causing to manage upper concern Condition.The agreement is that Internet Engineering Task group (IETF, Internet Engineering Task Force) defines A part for internet protocol families.The target of SNMP is that the software and hardware of numerous producer's productions on managing internet Internet is flat Platform, therefore SNMP is influenced also very greatly by Internet standard network Governance frameworks.SNMP has gone out the association to third version View, function have greatly been reinforced and have been improved than before.
When needing remote monitoring Linux hosts, usually optional agreement has two kinds of SNMP and SSH.Both agreements can The substance of acquisition is similar, but all different froms such as mode, unit of collected data acquired.Generally in O&M software Or other need monitor Linux hosts software in, a kind of agreement can only be used to the monitoring of certain host.If necessary to replace Monitoring protocol can only be the host before deleting, and another monitoring protocol is selected to add the host again.
Invention content
A kind of progress ssh that can prevent historical data from losing and snmp of the technical problem to be solved in the invention switches Method.
In order to solve the above technical problems, a kind of ssh and snmp seamless handover methods of the invention, include the following steps:
Step S101:Snoop command, collection terminal monitored data acquisition, receives data acquisition command;
Step S102:Collection terminal processing creates corresponding connection, by corresponding according to the configuration information of data acquisition command Connection gathered data information;
Step S103:Data information formats, and the collected data information of collection terminal is formatted;
Step S104:Data information receives, and the data information formatted is sent to processing end, processing end receives corresponding Data information;
Step S105:Database information processing, database are handled the data information that processing end receives accordingly;
The step S102 is further comprising the steps of,
Step S1021:Order configuration information judges, sentences to the configuration information of data acquisition command in step S101 It is disconnected, S1022 is then entered step if it is the configuration information of snmp, S1023 is then entered step if it is the configuration information of ssh;
Step S1022:Snmp connections are created, snmp connections are created according to the configuration information of snmp, enter step S1024;
Step S1023:Ssh connections are created, ssh connections are created according to the configuration information of ssh, enter step S1024;
Step S1024:According to the snmp of establishment connections or ssh connection gathered data information;
The step S105 database informations processing further includes that database information compares operation and/or database information storage Operation;
The database information compares operation and includes the following steps,
Step S1051:Database information compares, and the information of data information and database that processing end is received compares Compared with if data information is not present, entering step S1052;Enter step if data information exists but configuration differs Rapid S1053;
Step S1052:Data information adds, and data information and corresponding configuration information are added in database;
Step S1053:Configuration information update updates the data the corresponding configuration information of information;
Step S1054:Acquisition is sent, and sends corresponding data acquisition command and return to step S101.
After the above method, corresponding connection is created by judging the configuration information of order, and by collected number It is believed that breath is formatted, the processing of database is then carried out;It in this way can be when carrying out ssh and snmp and switching to existing number According to matching update is carried out, retain historical data.
Description of the drawings
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 methods of the present invention.
Fig. 2 is the flow diagram of database information contrast operation in ssh and snmp seamless handover methods of the present invention.
Fig. 3 is the flow chart that ssh and snmp seamless switchings are carried out when the specific embodiment of the invention monitors disk partition.
Specific implementation mode
As shown in Figure 1, a kind of ssh and snmp seamless handover methods of the present invention, include the following steps, step S101:It monitors Order, collection terminal monitored data acquisition receive data acquisition command.
Step S102:Collection terminal processing creates corresponding connection, by corresponding according to the configuration information of data acquisition command Connection gathered data information.Step S102 can be divided into following several steps to carry out:
Step S1021:Order configuration information judges, sentences to the configuration information of data acquisition command in step S101 It is disconnected, S1022 is then entered step if it is the configuration information of snmp, S1023 is then entered step if it is the configuration information of ssh.
Step S1022:Snmp connections are created, snmp connections are created according to the configuration information of snmp, enter step S1024.
Step S1023:Ssh connections are created, ssh connections are created according to the configuration information of ssh, enter step S1024.
Step S1024:According to the snmp of establishment connections or ssh connection gathered data information.
Step S103:Data information formats, and the collected data information of collection terminal is formatted.
Step S104:Data information receives, and the data information formatted is sent to processing end, processing end receives corresponding Data information.
Step S105:Database information processing, database are handled the data information that processing end receives accordingly. The step S105 of the present invention includes that database information comparison operation and/or database information compare operation, wherein database information Operation is compared to include the following steps, as shown in Fig. 2,
Step S1051:Database information compares, and the information of data information and database that processing end is received compares Compared with if data information is not present, entering step S1052;Enter step if data information exists but configuration differs Rapid S1053.
Step S1052:Data information adds, and data information and corresponding configuration information are added in database.
Step S1053:Configuration information update updates the data the corresponding configuration information of information.
Step S1054:Acquisition is sent, and sends corresponding data acquisition command and return to step S101.
Below by taking the monitoring to disk partition as an example, a kind of ssh and snmp seamless handover methods of the present invention are made further Explanation.Monitoring to disk partition includes measurement acquisition and finds two parts automatically, wherein automatic find that part is to determine magnetic Disk partition name, measurement acquisition are disk partition measurement acquisition.
Method enters step S201 after starting, to the monitoring of disk partition firstly the need of determining disk partition title, step S201 is used for monitoring disk partition name data acquisition.S202 is entered step after listening to order in the current command Configuration information is judged that judgement is snmp configuration informations or ssh configuration informations.Then enter step if it is snmp configuration informations Rapid S203 creates snmp connections, then obtains disk partition title by snmp connections by step S204;It is configured if it is ssh Information then enters step S205 and creates ssh connections, then obtains disk partition title by ssh connections by step S206.So The disk partition title obtained afterwards whether through snmp connections or ssh connections is all first formatted by step S207, Then the disk partition title of formatting is sent to processing end, then the processing ends step S208 reception of magnetic disc partition name and matched Confidence ceases.
Database information operation is carried out after processing end obtains disk partition title, wherein disk partition title will first carry out Database information compares operation, and it includes step S209-S212 that the database information of the disk partition title, which compares operation,.Its In, disk partition title is compared by step S209 with database information, is entered step if disk partition is not present Disk partition information and configuration are added in database by S210;It is entered step if disk partition exists and configures difference S211 updates configuration information.The order for carrying out disk partition metric data collection is sent subsequently into step S212.At this point, disk The database information of partition name compares operation and completes, and enters disk when listening to the order of disk partition metric data collection Subregion metric data collection.
The disk partition metric data collection includes step S213-S220, and step is introduced into after listening to order S213 creates acquisition tasks, and the judgement of configuration information in the order of a new round is carried out subsequently into step S214.If it is snmp Configuration information then enters step S215 and creates snmp connections, then passes through snmp connections and disk partition title by step S216 Obtain disk partition capacity;S217 is then entered step if it is ssh configuration informations and creates ssh connections, then passes through step S218 Pass through ssh connections and disk partition name acquiring disk partition capacity.Then it is obtained whether through snmp connections or ssh connections The data information of collected disk partition capacity is all sent to processing by the disk partition capacity taken by step S219.Finally Step S220 is stored in database after processing end receives data information.
The present invention is by first judging the configuration information of order, then different configuration informations different with ssh according to snmp point Snmp connections are not established or ssh connections carry out data acquisition, and collected data are formatted and then store database In, matching update is carried out to existing data in this way, retains historical data, the loss of historical data will not be caused in this way, to Realize the seamless switching of snmp and ssh.
Although specific embodiments of the present invention have been described above, those skilled in the art should be appreciated that this It is merely illustrative of, various changes or modifications can be made to present embodiment, without departing from the principle and essence of invention, originally The protection domain of invention is only limited by the claims that follow.

Claims (1)

1. a kind of ssh and snmp seamless handover methods, which is characterized in that include the following steps,
Step S101:Snoop command, collection terminal monitored data acquisition, receives data acquisition command;
Step S102:Collection terminal processing creates corresponding connection, by connecting accordingly according to the configuration information of data acquisition command Connect gathered data information;
Step S103:Data information formats, and the collected data information of collection terminal is formatted;
Step S104:Data information receives, and the data information formatted is sent to processing end, processing end receives corresponding data Information;
Step S105:Database information processing, database are handled the data information that processing end receives accordingly;
The step S102 is further comprising the steps of,
Step S1021:Order configuration information judges, judges the configuration information of data acquisition command in step S101, such as Fruit is that the configuration information of snmp then enters step S1022, and S1023 is then entered step if it is the configuration information of ssh;
Step S1022:Snmp connections are created, snmp connections are created according to the configuration information of snmp, enter step S1024;
Step S1023:Ssh connections are created, ssh connections are created according to the configuration information of ssh, enter step S1024;
Step S1024:According to the snmp of establishment connections or ssh connection gathered data information;
The step S105 database informations processing further includes that database information compares operation and/or database information storage behaviour Make;
The database information compares operation and includes the following steps,
Step S1051:Database information compares, and the information of data information and database that processing end receives is compared, If data information is not present, S1052 is entered step;It is entered step if data information exists but configuration differs S1053;
Step S1052:Data information adds, and data information and corresponding configuration information are added in database;
Step S1053:Configuration information update updates the data the corresponding configuration information of information;
Step S1054:Acquisition is sent, and sends corresponding data acquisition command and return to 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 CN104683149A (en) 2015-06-03
CN104683149B true 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)

Families Citing this family (1)

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

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

Also Published As

Publication number Publication date
CN104683149A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
US8909758B2 (en) Physical server discovery and correlation
CN105867837A (en) Method, equipment and system for updating configurations of clients in distributed high-speed cache systems
KR101736425B1 (en) Cloud computing enhanced gateway for communication networks
US9280399B2 (en) Detecting, monitoring, and configuring services in a netwowk
US20060085683A1 (en) System and method for managing computer networks
CN108696581B (en) Distributed information caching method and device, computer equipment and storage medium
CN104219316A (en) Method and device for processing call request in distributed system
US20110225296A1 (en) Autonomous management method for processing unexpecting events using interaction between nodes in sensor networks
CN108200218B (en) Method and device for realizing load balance and electronic equipment
WO2017096838A1 (en) Load balance configuration method, device and system
US20130346513A1 (en) Migrating a chat message service provided by a chat server to a new chat server
CN104954153A (en) Method and device for node fault detection
CN103973474A (en) Network terminal update configuration method
CN105429799A (en) Server backup method and device
CN106953926A (en) A kind of method for routing and device
CN104683149B (en) A kind of ssh and snmp seamless handover methods
CN112052227A (en) Data change log processing method and device and electronic equipment
CN114553672A (en) Method, device, equipment and medium for determining performance bottleneck of application system
CN108900603A (en) A kind of server discovery methods, devices and systems
CN105393503B (en) Message treatment method and device
CN109510717B (en) Method, device, equipment and storage medium for acquiring information of node equipment
US9100292B2 (en) Methods for managing upgrading a telecommunication network and devices thereof
CN113922988B (en) Network-based host security policy detection method and system
US10257093B2 (en) Information processing device, method, and medium
CN104735097A (en) Information collecting method 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
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