CN107995012B - List maintenance method and device - Google Patents

List maintenance method and device Download PDF

Info

Publication number
CN107995012B
CN107995012B CN201610950004.5A CN201610950004A CN107995012B CN 107995012 B CN107995012 B CN 107995012B CN 201610950004 A CN201610950004 A CN 201610950004A CN 107995012 B CN107995012 B CN 107995012B
Authority
CN
China
Prior art keywords
slave
state
master
fails
machine
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
CN201610950004.5A
Other languages
Chinese (zh)
Other versions
CN107995012A (en
Inventor
高阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201610950004.5A priority Critical patent/CN107995012B/en
Publication of CN107995012A publication Critical patent/CN107995012A/en
Application granted granted Critical
Publication of CN107995012B publication Critical patent/CN107995012B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0253Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using browsers or web-pages for accessing management information
    • 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/02Standardisation; Integration
    • H04L41/024Standardisation; Integration using relational databases for representation of network management data, e.g. managing via structured query language [SQL]
    • 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/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a list maintenance method and device. Wherein, the method comprises the following steps: obtaining a slave machine which fails to be communicated with a host machine in an operation and maintenance list, wherein the operation and maintenance list comprises: an identification for characterizing the master controlled slave; acquiring the state of the slave which fails to be communicated with the master; and deleting the identifier of the slave machine which fails to be communicated with the master machine from the operation and maintenance list under the condition that the state of the slave machine which fails to be communicated with the master machine is an offline state. The invention solves the technical problem that the operation efficiency of the host is influenced due to the continuous accumulation of invalid slave machine identifications in the prior art.

Description

List maintenance method and device
Technical Field
The invention relates to the field of computers, in particular to a list maintenance method and device.
Background
In the process of using salt (automatic operation and maintenance tool) to perform batch server operation and maintenance management, the salt is divided into two roles of master and sub, a list of all sub is maintained on a single master, and machines in the sub list can be controlled on the master. Each server can start the minus ion process by default and send a request to the master server after being on-line for the first time, the master can communicate with the minus ion after finding the request, a newly found machine is added in the minus ion list, and the machine can be controlled later, but when the salt process is abnormal or the server is off-line, the master does not have a mechanism for actively finding the current abnormality of the minus ion. When the master issues the whole network command, the control command is still sent to the invalid mini.
In a common operation and maintenance scene, some virtual servers are often created or deleted according to business requirements, when a server is online, a master records a corresponding minus id (slave machine identifier), but after the server is powered off and offline, the id of the minus becomes an invalid id in a list maintained by the master, but the feedback on the master can only discover that the minus id cannot be communicated, and there is no way to distinguish whether the minus is powered off or the salt service on mnion is abnormal. Such invalid ids will accumulate on the master continuously, affecting the efficiency of the master-side batch operation.
Aiming at the problem that the operation efficiency of a host is influenced due to the fact that invalid slave machine identifications are accumulated continuously in the prior art, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a list maintenance method and a list maintenance device, which at least solve the technical problem that the operation efficiency of a host is influenced due to the fact that invalid slave machine identifications are continuously accumulated in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a list maintenance method, including: obtaining a slave machine which fails to be communicated with a host machine in an operation and maintenance list, wherein the operation and maintenance list comprises: an identification for characterizing a master controlled slave; acquiring the state of a slave machine which fails to be communicated with a master machine; and when the state of the slave machine which fails to be communicated with the master machine is the offline state, deleting the identification of the slave machine which fails to be communicated with the master machine from the operation and maintenance list.
Further, sending a test instruction to the slave machines in the operation and maintenance list; determining the slave which does not return the test result as the slave which fails to be communicated with the host; and summarizing the identifications of the slave machines which fail to be connected with the master machine into a state list.
Further, extracting the identification of the slave machine which fails to communicate with the master machine from the state list; the identification of the slave machine which fails to be communicated with the master machine is named as a preset character string, and a request carrying the preset character string is sent to a configuration management database asset center; obtaining a result returned by an asset center of a configuration management database; determining the state of the slave which fails to be communicated with the master according to the result, wherein the state of the slave which fails to be communicated with the master comprises the following steps: down status and service exception status.
Further, the asset center of the configuration management database returns a result corresponding to the preset character string according to the preset character string, wherein the step of returning the result corresponding to the preset character string according to the preset character string comprises the following steps: configuring a management database asset center to extract a preset character string carried in the request; extracting a data record corresponding to a preset character string from an asset database, wherein the data record is used for recording the upper and lower line states of a slave; and returning a result corresponding to the data record.
Further, under the condition that the returned result is that the slave computer is offline, determining that the slave computer belongs to an offline state; and determining that the slave belongs to the abnormal service state under the condition that the returned result is that the slave is not offline.
Further, when the state of the slave which fails to communicate with the master is a service abnormal state, an automatic repair process of the slave is started.
According to another aspect of the embodiments of the present invention, there is also provided a device for maintaining a list, including: the communication state monitoring module is used for acquiring a slave which fails to be communicated with the host in an operation and maintenance list, wherein the operation and maintenance list comprises an identifier of the slave which is in a communication relation with the host in advance; the asset state query module is used for acquiring the state of a slave which fails to be communicated with the host; and the deleting module is used for deleting the identifier of the slave which fails to be communicated with the master from the operation and maintenance list under the condition that the state of the slave which fails to be communicated with the master is an offline state, wherein the identifier is used for representing that the master controls the slave.
Further, the sending submodule is used for sending a test instruction to the slave machines in the operation and maintenance list; the system comprises a first determining submodule and a summarizing submodule, wherein the first determining submodule is used for determining that the slave which does not return the test result is the slave which fails to be communicated with the master, and the summarizing submodule is used for summarizing the identification of the slave which fails to be communicated with the master into a state list.
Further, the asset status query module comprises: and the extraction module is used for extracting the identification of the slave which fails to communicate with the master from the state list. The naming submodule is used for naming the identifier of the slave machine which fails to be communicated with the master machine as a preset character string and sending a request carrying the preset character string to an asset center of a configuration management database; the acquisition submodule is used for acquiring a result returned by the asset center of the configuration management database; the second determining submodule is used for determining the state of the slave which fails to be communicated with the master according to the result, wherein the state of the slave which fails to be communicated with the master comprises: down status and service exception status.
Further, the apparatus further comprises: and the return submodule is used for returning a result corresponding to the preset character string according to the preset character string by the asset center of the configuration management database, and comprises: the first extraction unit is used for configuring and managing the preset character string carried in the database asset center extraction request; the second extraction unit is used for extracting data records corresponding to the preset character strings from the asset database, wherein the data records are used for recording the upper and lower line states of the slave; and the return unit is used for returning the result corresponding to the data record.
Further, the first determining unit is used for determining that the slave belongs to the offline state under the condition that the returned result is that the slave is offline; and the second determination unit is used for determining that the slave belongs to the abnormal service state under the condition that the returned result is not that the slave is offline.
Further, the apparatus further comprises: and the starting module is used for starting the automatic repair process of the slave machine under the condition that the state of the slave machine which is failed to be communicated with the host machine is the abnormal service state.
In the embodiment of the invention, the slave which fails to be communicated with the master in the operation and maintenance list is obtained, the state of the slave which fails to be communicated with the master is obtained, and the identifier of the slave which fails to be communicated with the master is deleted from the operation and maintenance list under the condition that the state of the slave which fails to be communicated with the master is the offline state. According to the scheme, the state of the slave machine which is failed to be communicated with the host machine is judged, and the invalid identification is removed, so that the operation and maintenance list is updated, and the technical problem that the operation efficiency of the host machine is influenced due to the fact that the invalid slave machine identification is accumulated continuously in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart diagram of a method of list maintenance according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a list maintenance apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of an alternative list maintenance apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an alternative list maintenance apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic illustration of an alternative list maintenance apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic illustration of an alternative list maintenance apparatus according to an embodiment of the present invention; and
fig. 7 is a schematic diagram of an alternative list maintenance apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a list maintenance method, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that herein.
It should be noted that the present embodiment may be applied to batch server operation and maintenance management, and in performing server operation and management, the maintenance of the list may be implemented by the following functional modules: a Minion communication state monitoring module, a server asset state query module, a configuration management database and a Salt-key deleting module, wherein,
the Minion communication state monitoring module is deployed in a timing task processor at the host end and can detect the communication state of the slave in a round-robin manner according to a preset period;
the server asset state query module is also deployed at the host end, is communicated with the communication state monitoring module and can be used for monitoring the state of a slave which cannot be communicated with the host according to the communication state;
the management database is configured to be a relational database in the whole network, can be communicated with the host and the slave, and can provide a query api for querying the state of the slave for the host, and be used for querying the server asset state of the slave by the host, such as whether the slave is offline or not;
and the Salt-key deleting module is deployed in the host, is communicated with the server asset state inquiring module, receives the identifier of the offline slave machine transmitted by the server asset state inquiring module, and deletes the identifier of the offline slave machine from the operation and maintenance list.
Fig. 1 is a flowchart of a list maintenance method according to an embodiment of the present invention, which is shown in fig. 1 and includes the following steps:
step S102, a slave machine which fails to be communicated with the host machine in an operation and maintenance list is obtained, wherein the operation and maintenance list comprises: for characterizing the identity of the master controlled slave.
The identifier included in the operation and maintenance list is the identifier of the slave controlled by the master, and in some special cases, the slave may be out of service or offline, so that the connection with the master fails, thereby causing the operation and maintenance list to include an invalid identifier. And the slave machine which fails to be communicated with the master machine in the operation and maintenance list acquired in the step is the slave machine represented by the invalid identifier.
And step S104, acquiring the state of the slave which fails to be communicated with the master.
Specifically, the state of the slave that fails to communicate with the master may include: down status and service exception status.
And step S106, deleting the identification of the slave machine which fails to be communicated with the master machine from the operation and maintenance list when the state of the slave machine which fails to be communicated with the master machine is the offline state.
In an alternative embodiment, the Master (host) and the minus (slave) identified as a in the operation and maintenance list cannot be connected, the state of the minus a is judged, and the identification of the minus a is deleted from the operation and maintenance list under the condition that the minus a is determined to be in the offline state.
It should be noted that, if the slave needs to be restarted after the identifier of the offline slave is deleted from the operation and maintenance list, the server process may be started to send a request to the host by executing the step of initial startup, and the host may communicate with the slave after finding the request, so as to add the identifier of the slave again in the operation and maintenance list.
Through the embodiment, if one minus connection is not passed, the master can automatically distinguish whether the minus is off-line or the salt process of the minus end is abnormal, and if the minus is off-line, the master needs to delete the record of the minus id without human intervention.
As can be seen from the above, in the foregoing steps of the present application, the slave that fails to communicate with the master in the operation and maintenance list is obtained, the state of the slave that fails to communicate with the master is obtained, and when the state of the slave that fails to communicate with the master is the offline state, the identifier of the slave that fails to communicate with the master is deleted from the operation and maintenance list. According to the scheme, the state of the slave machine which is failed to be communicated with the host machine is judged, and the invalid identification is removed, so that the operation and maintenance list is updated, and the technical problem that the operation efficiency of the host machine is influenced due to the fact that the invalid slave machine identification is accumulated continuously in the prior art is solved.
Optionally, according to the above embodiment of the present application, obtaining a slave that fails to communicate with a master in a whole network includes:
step S1021, a test instruction is sent to the slave machines in the operation and maintenance list.
In step S1023, the slave that has not returned the test result is determined as the slave that has failed in communication with the master.
And step S1025, summarizing the identifications of the slave machines which fail to be connected with the master machine into a status list.
In an alternative embodiment, the above steps may be performed by a Minion connected state monitoring module, where the Minion connected state monitoring module is configured in a crontab (timing task) at the master end, executes a monitoring task according to a preset period (for example, executed once per minute), sends a test command to minions of the whole network, and reads return results of all minions, and a Minion with a return result is considered to be normally alive, and all minions with no return result after timeout are determined to be slaves with failed connection with the master.
As can be seen from the above, the foregoing steps in the present application send a test instruction to the slave machines in the operation and maintenance list, and determine that the slave machine that does not return the test result is the slave machine that fails to communicate with the master machine. According to the scheme, whether the slave machine is communicated with the host machine or not is determined by sending the test instruction to the slave machine in the operation and maintenance list, so that the purpose of determining the slave machine which is failed to be communicated with the host machine is achieved.
Optionally, according to the above embodiment of the present application, acquiring a state of a slave that fails to communicate with a master includes:
step S1041, extracting the identifier of the slave that fails to communicate with the master from the state list.
And S1043, naming the identifier of the slave machine which fails to communicate with the master machine as a preset character string, and sending a request carrying the preset character string to the asset center of the configuration management database.
Specifically, the predetermined string may be an minus _ id, and is stored in a predetermined field, and the request may be a post request. The above steps constitute a post dictionary which can be transmitted by request by naming the identification of the slave which fails to communicate with the master and is recorded in the state list as a preset character string.
And step S1045, obtaining a result returned by the asset center of the configuration management database.
Step S1047, determining a state of the slave failed in communication with the master according to the result, where the state of the slave failed in communication with the master includes: down status and service exception status.
In an optional embodiment, the step of obtaining the state of the slave which fails to communicate with the host may be performed by a server asset state query module, where the server asset state query module is deployed on the master, traverses a state list transmitted by a Minion communication state monitoring module, calls a query api of a cmdb, extracts each value in the list, names the value as a Minion _ id string, transmits the value as a post request to a cmdb (configuration management database) asset center, and determines the state of the slave according to a return result, if the value is true, determines that the slave is in an offline state, and transmits the currently queried Minion _ id to a Salt-key deletion module, where the Salt-key deletion module is configured to delete the slave identifier from the operation and maintenance list.
Optionally, according to the foregoing embodiment of the present application, before obtaining the result returned by the asset center of the configuration management database, the method further includes: the method comprises the following steps that a configuration management database asset center returns a result corresponding to a preset character string according to the preset character string, wherein the step that the configuration management database asset center returns the result corresponding to the preset character string according to the preset character string comprises the following steps:
step S1049, configuring the preset character string carried in the management database asset center extraction request.
Step S1051, extracting a data record corresponding to a preset character string from the asset database, where the data record is used for recording the up-down line state of the slave.
Specifically, the data records in the asset database are used for representing the upper and lower line states of the slave, and the upper and lower line states of the slave represented by the data records can be the upper line state or the lower line state.
Step S1053 returns a result corresponding to the data record.
In an optional embodiment, the server asset state query module may determine the state of the slave by calling a Cmdb query api (interface), where the Cmdb query api is a server asset state query module that is individually opened for a salt master by an asset management center of a Cmdb system and is issued on a port of a Cmdb center server by way of http api, the Cmdb query api receives a post request sent by the master, extracts a field that holds a mini _ id string and is carried in the request, extracts a corresponding data record from an asset database, determines a value of an asset state field of its server, and returns false if the value of the asset state field in the data record is equal to "down", and returns true through the api if the value of the asset state field in the data record is not equal to "down".
As can be seen from the above, the asset center in the configuration management database in the above steps extracts the preset character string carried by the request, extracts the data record corresponding to the preset character string from the asset database, and returns the result corresponding to the data record. According to the scheme, the disconnection type of the disconnection minus is effectively distinguished through the cmdb by reading the value of the data record corresponding to the preset character string of the slave in the asset database, so that manual intervention is avoided, and safety and high efficiency are realized.
Optionally, according to the foregoing embodiment of the present application, determining the state of the slave that fails to communicate with the master according to the result includes:
step S10471, determining that the slave is in the offline state if the returned result is that the slave is offline.
And step S10473, determining that the slave belongs to the abnormal service state when the returned result is that the slave is not offline.
As can be seen from the above, the above steps determine the charging status according to the value of whether the slave is in the offline status recorded in the data record, that is, in the slave with failed master connectivity, if it is determined that the slave is not offline, the slave is considered to be out of service.
Optionally, according to the above embodiment of the present application, the method further includes: and starting an automatic repair process of the slave machine when the state of the slave machine which fails to be communicated with the master machine is a service abnormal state.
Example 2
According to an embodiment of the present invention, an embodiment of a list maintenance apparatus is provided, and fig. 2 is a schematic diagram of a list maintenance apparatus according to an embodiment of the present invention, which is shown in conjunction with fig. 2, and includes:
and the communication state monitoring module 20 is configured to acquire a slave that fails to communicate with the master in the operation and maintenance list, where the operation and maintenance list includes an identifier of the slave that has established a communication relationship with the master in advance.
The identifier included in the operation and maintenance list is the identifier of the slave controlled by the master, and in some special cases, the slave may be out of service or offline, so that the connection with the master fails, thereby causing the operation and maintenance list to include an invalid identifier. And the slave machine represented by the invalid identifier is the slave machine which is failed to be communicated with the master machine in the operation and maintenance list acquired by the device.
And the asset state query module 22 is used for acquiring the state of the slave machine which fails to be communicated with the master machine.
Specifically, the state of the slave with failed connection to know may include: down status and service exception status.
And the deleting module 24 is configured to delete the identifier of the slave which fails to be connected with the master from the operation and maintenance list when the state of the slave which fails to be connected with the master is the offline state, where the identifier is used to represent that the master controls the slave.
It should be noted that, if the slave needs to be restarted after the identifier of the offline slave is deleted from the operation and maintenance list, the server process may be started to send a request to the host by executing the step of initial startup, and the host may communicate with the slave after finding the request, so as to add the identifier of the slave again in the operation and maintenance list.
Through the embodiment, if one minus connection is not passed, the master can automatically distinguish whether the minus is off-line or the salt process of the minus end is abnormal, and if the minus is off-line, the master needs to delete the record of the minus id without human intervention.
As can be seen from the above, in the foregoing steps of the present application, the slave that fails to communicate with the master in the operation and maintenance list is obtained, the state of the slave that fails to communicate with the master is obtained, and when the state of the slave that fails to communicate with the master is the offline state, the identifier of the slave that fails to communicate with the master is deleted from the operation and maintenance list. According to the scheme, the state of the slave machine which is failed to be communicated with the host machine is judged, and the invalid identification is removed, so that the operation and maintenance list is updated, and the technical problem that the operation efficiency of the host machine is influenced due to the fact that the invalid slave machine identification is accumulated continuously in the prior art is solved.
Optionally, according to the above-mentioned embodiment of the present application, as shown in fig. 3, the communication status monitoring module 20 includes:
and the sending submodule 30 is used for sending a test instruction to the slave machines in the operation and maintenance list.
And the first determination submodule 32 is used for determining that the slave which does not return the test result is the slave which fails to be communicated with the master.
And the summarizing submodule 34 is used for summarizing the identifications of the slave machines with the failed communication with the master machine into a status list.
As can be seen from the above, the apparatus of the present application sends a test command to the slave machines in the operation and maintenance list, and determines that the slave machine that does not return the test result is the slave machine that fails to communicate with the master machine. According to the scheme, whether the slave machine is communicated with the master machine or not is determined according to the slave machine method in the operation and maintenance list through the test instruction, so that the purpose of determining the slave machine which is failed to be communicated with the master machine is achieved.
Optionally, according to the above-mentioned embodiment of the present application, as shown in fig. 4, the asset status query module 22 includes:
and the extracting module 40 is used for extracting the identification of the slave machine which fails to communicate with the master machine from the state list. And the naming submodule 42 is used for naming the identifier of the slave machine which fails to communicate with the master machine as a preset character string and sending a request carrying the preset character string to the asset center of the configuration management database.
And the obtaining submodule 44 is used for obtaining a result returned by the asset center of the configuration management database.
The second determining submodule 46 is configured to determine, according to the result, a state of a slave that fails to communicate with the master, where the state of the slave that fails to communicate with the master includes: down status and service exception status.
Optionally, according to the above embodiment of the present application, as shown in fig. 5, the apparatus further includes: the return submodule 50 is configured to return a result corresponding to the preset character string according to the preset character string by the asset center of the configuration management database, where the return submodule 50 includes:
the first extraction unit 52 is configured to configure the management database asset center to extract the preset character string carried in the request.
And a second extracting unit 54, configured to extract a data record corresponding to the preset character string from the asset database, where the data record is used to record the upper and lower line states of the slave.
A return unit 56 for returning a result corresponding to the data record.
As can be seen from the above, the device of the present application configures the management database asset center to extract the preset character string carried in the request, extracts the data record corresponding to the preset character string from the asset database, and returns the result corresponding to the data record. According to the scheme, the disconnection type of the disconnection minus is effectively distinguished through the cmdb by reading the value of the data record corresponding to the preset character string of the slave in the asset database, so that manual intervention is avoided, and safety and high efficiency are realized.
Optionally, according to the above embodiment of the present application, as shown in fig. 6, the second determining submodule 46 includes:
and a first determining unit 60, configured to determine that the slave belongs to the offline state if the returned result is that the slave is offline.
And a second determining unit 62, configured to determine that the slave belongs to the service abnormal state if the returned result is that the slave is not offline.
As can be seen from the above, the above apparatus determines the charging status according to the value of whether the slave is in the offline status recorded in the data record, that is, in the slave with failed master connectivity, if it is determined that the slave is not offline, the slave is considered to be in abnormal service.
Optionally, according to the above embodiment of the present application, as shown in fig. 7, the apparatus further includes:
the starting module 70 is configured to start an automatic repair process of the slave when the state of the slave failed in communication with the master is a service abnormal state.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (4)

1. A method for maintaining a list, comprising:
obtaining a slave machine which fails to be communicated with a host machine in an operation and maintenance list, wherein the operation and maintenance list comprises: an identification for characterizing the master controlled slave;
acquiring the state of the slave which fails to be communicated with the master;
deleting the identifier of the slave machine which fails to be communicated with the master machine from the operation and maintenance list under the condition that the state of the slave machine which fails to be communicated with the master machine is an offline state;
the slave machine which fails to be communicated with the host machine in the operation and maintenance list is obtained, and the method comprises the following steps:
sending a test instruction to the slave machines in the operation and maintenance list;
determining that the slave which does not return the test result is the slave which fails to be communicated with the host;
summarizing the identifications of the slave machines which fail to be communicated with the master machine into a state list;
wherein, obtaining the state of the slave which fails to communicate with the master comprises:
extracting the identification of the slave machine which fails to communicate with the master machine from the state list;
the identification of the slave machine which fails to be communicated with the master machine is named as a preset character string, and a request carrying the preset character string is sent to a configuration management database asset center;
obtaining a result returned by the asset center of the configuration management database;
determining the state of the slave which fails to be communicated with the master according to the result, wherein the state of the slave which fails to be communicated with the master comprises the following steps: an offline state and a service abnormal state;
before obtaining the result returned by the asset center of the configuration management database, the method further comprises: the asset center of the configuration management database returns a result corresponding to the preset character string according to the preset character string, wherein the step of returning the result corresponding to the preset character string by the asset center of the configuration management database according to the preset character string comprises the following steps:
the asset center of the configuration management database extracts a preset character string carried in the request;
extracting a data record corresponding to the preset character string from an asset database, wherein the data record is used for recording the upper and lower line states of the slave;
returning a result corresponding to the data record;
and the asset center of the configuration management database determines the state of the slave machine in a mode of inquiring an interface.
2. The method of claim 1, wherein determining the status of the slave device with failed connectivity to the master device according to the result comprises:
determining that the slave belongs to an offline state under the condition that the returned result is that the slave is offline;
and determining that the slave belongs to a service abnormal state under the condition that the returned result is that the slave is not offline.
3. The method of claim 2, further comprising: and starting an automatic repair process of the slave machine when the state of the slave machine which fails to communicate with the master machine is the abnormal service state.
4. An apparatus for maintaining lists, comprising:
the communication state monitoring module is used for acquiring a slave which fails to be communicated with the host in an operation and maintenance list, wherein the operation and maintenance list comprises an identifier of the slave which is in a communication relation with the host in advance;
the asset state query module is used for acquiring the state of the slave which fails to be communicated with the host;
the deleting module is used for deleting the identifier of the slave which fails to be communicated with the master from the operation and maintenance list under the condition that the state of the slave which fails to be communicated with the master is an offline state, wherein the identifier is used for representing that the master controls the slave;
wherein, the connected state monitoring module includes:
the sending submodule is used for sending a test instruction to the slave machines in the operation and maintenance list;
the first determining submodule is used for determining that the slave which does not return the test result is the slave which fails to be communicated with the master;
the summarizing submodule is used for summarizing the identification of the slave computer which fails to be communicated with the master computer into a state list;
wherein, the asset state inquiry module comprises:
the extraction module is used for extracting the identification of the slave machine which fails to communicate with the master machine from the state list;
the naming submodule is used for naming the identifier of the slave machine which fails to be communicated with the master machine as a preset character string and sending a request carrying the preset character string to an asset center of a configuration management database;
the acquisition submodule is used for acquiring a result returned by the asset center of the configuration management database;
the second determining submodule is used for determining the state of the slave which fails to be communicated with the master according to the result, wherein the state of the slave which fails to be communicated with the master comprises: an offline state and a service abnormal state;
wherein the apparatus further comprises: a return submodule, configured to return, by the configuration management database asset center, a result corresponding to the preset character string according to the preset character string, where the return submodule includes:
the first extraction unit is used for extracting the preset character string carried in the request by the asset center of the configuration management database;
the second extraction unit is used for extracting a data record corresponding to the preset character string from an asset database, wherein the data record is used for recording the upper and lower line states of the slave;
a return unit for returning a result corresponding to the data record;
and the asset center of the configuration management database determines the state of the slave machine in a mode of inquiring an interface.
CN201610950004.5A 2016-10-26 2016-10-26 List maintenance method and device Active CN107995012B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610950004.5A CN107995012B (en) 2016-10-26 2016-10-26 List maintenance method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610950004.5A CN107995012B (en) 2016-10-26 2016-10-26 List maintenance method and device

Publications (2)

Publication Number Publication Date
CN107995012A CN107995012A (en) 2018-05-04
CN107995012B true CN107995012B (en) 2021-02-26

Family

ID=62028251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610950004.5A Active CN107995012B (en) 2016-10-26 2016-10-26 List maintenance method and device

Country Status (1)

Country Link
CN (1) CN107995012B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144737A (en) * 2018-10-09 2019-01-04 郑州云海信息技术有限公司 Controller management method, apparatus and storage medium in a kind of distributed cluster system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399883A (en) * 2008-10-10 2009-04-01 中兴通讯股份有限公司 Exception monitoring management method and device
CN107124299A (en) * 2017-03-31 2017-09-01 北京奇艺世纪科技有限公司 Resource method for early warning and system based on resource topology

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100479575C (en) * 2005-06-30 2009-04-15 华为技术有限公司 Method and apparatus for realizing scheduled operation in equipment management
KR20130027897A (en) * 2011-09-08 2013-03-18 삼성전자주식회사 Method and system for managing a suspicious device on the network
CN102521099A (en) * 2011-11-24 2012-06-27 深圳市同洲视讯传媒有限公司 Process monitoring method and process monitoring system
CN104468283B (en) * 2014-12-26 2018-01-02 北京奇虎科技有限公司 Monitoring method, the device and system of more hosting systems
CN105227397B (en) * 2015-09-02 2018-06-15 广东欧珀移动通信有限公司 Method for discovering equipment, main equipment, slave device and corresponding system
CN105953371B (en) * 2016-05-18 2019-01-04 珠海格力电器股份有限公司 multi-connected air conditioning unit and communication control method and device thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399883A (en) * 2008-10-10 2009-04-01 中兴通讯股份有限公司 Exception monitoring management method and device
CN107124299A (en) * 2017-03-31 2017-09-01 北京奇艺世纪科技有限公司 Resource method for early warning and system based on resource topology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"终端统一管理接口的设计与实现";高星;《中国优秀硕士学位论文全文数据库信息科技辑》;20111115;I139-9 *

Also Published As

Publication number Publication date
CN107995012A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
CN106713487B (en) Data synchronization method and device
CN105407117B (en) The methods, devices and systems of distributed backup data
CN105871584A (en) Method, device and system for updating client configuration in key value pair database
CN104252500B (en) The fault repairing method and device of a kind of database management platform
CN101196840B (en) System and method for configuring a data mirror
CN112199197B (en) Server management method and system
CN105740418A (en) File monitoring and message pushing based real-time synchronization system
CN111190962B (en) File synchronization method and device and local terminal
CN113905005B (en) Method and device for updating client state of instant messaging
CN105867837A (en) Method, equipment and system for updating configurations of clients in distributed high-speed cache systems
CN110399171B (en) Hard disk management method, system and related components
CN107729205B (en) Fault processing method and device for business system
WO2014004381A2 (en) Non-disruptive controller replacement in network storage systems
CN104468283A (en) Multi-host management system monitoring method, device and system
CN108429656A (en) A method of monitoring physical machine network interface card connection status
CN105224441A (en) Virtual machine information harvester, method and virtual machine information maintaining method and system
CN107995012B (en) List maintenance method and device
CN110083504B (en) Running state monitoring method and device for distributed tasks
CN110275793B (en) Detection method and equipment for MongoDB data fragment cluster
CN113330426B (en) Method, device and system for backing up data
CN108429644B (en) Network equipment management method and device and server
KR20120105281A (en) Method for generating electronic appliance identifier and managing information by using the electronic appliance identifier
CN112087517B (en) Storage cluster processing method and processing device and electronic equipment
JP2014175841A (en) Network communication system, communication device, data backup method and program therefor
CN107168768B (en) Mapping method and device of equipment and virtual machine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant