CN113285855B - Server monitoring method and system - Google Patents
Server monitoring method and system Download PDFInfo
- Publication number
- CN113285855B CN113285855B CN202110792361.4A CN202110792361A CN113285855B CN 113285855 B CN113285855 B CN 113285855B CN 202110792361 A CN202110792361 A CN 202110792361A CN 113285855 B CN113285855 B CN 113285855B
- Authority
- CN
- China
- Prior art keywords
- server
- master control
- control server
- controlled
- virtual robot
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3006—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The application discloses a server monitoring method and system, and belongs to the technical field of computers. The method is used in a server monitoring system, the server monitoring system comprises a master control server and a plurality of controlled servers, and a virtual robot is installed in the master control server, and the method comprises the following steps: the master control server acquires monitoring content of the controlled server, wherein the monitoring content comprises at least one of state information, project release information, files and slow logs; and the master control server sends the monitoring content in a service group through the virtual robot. According to the method and the device, all members in the service group can acquire the monitoring content in time, so that the monitoring efficiency is improved. In addition, the monitoring content comprises at least one of state information, project release information, files and slow logs, so that the controlled server is comprehensively monitored.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a server monitoring method and system.
Background
Generally, a server monitoring system includes a master control server and a plurality of controlled servers, and the master control server can monitor the plurality of controlled servers.
In the related art, the master control server may obtain the status information of each controlled server, and report the obtained status information to the user by sending an email or an information.
When the status information needs to be reported to a plurality of users, a mail or information needs to be sent to each user, which may affect the monitoring efficiency.
Disclosure of Invention
The embodiment of the application provides a server monitoring method and a server monitoring system, which are used for solving the problem that monitoring efficiency is influenced by the fact that mails or information need to be sent to a plurality of users. The technical scheme is as follows:
on one hand, a server monitoring method is provided and used in a server monitoring system, the server monitoring system comprises a master control server and a plurality of controlled servers, and a virtual robot is installed in the master control server, the method comprises the following steps:
the master control server acquires monitoring content of the controlled server, wherein the monitoring content comprises at least one of state information, project release information, files and slow logs;
and the master control server sends the monitoring content in a service group through the virtual robot.
In a possible implementation manner, when the monitoring content includes the state information, the server monitoring system further includes a registration center, and a plurality of controlled servers are registered in the registration center, and then the main control server obtains the monitoring content of the controlled server, including:
the master control server receives a first query instruction sent by a user in the service group through the virtual robot, wherein the first query instruction carries a label, and the label is used for indicating grouping of the controlled servers;
the master control server sends a first query request carrying the label to the registration center;
the registration center feeds back the address of the controlled server corresponding to the label to the master control server;
and the master control server acquires the monitoring content from the corresponding controlled server according to the address.
In a possible implementation manner, before the master control server receives, through the virtual robot, a first query instruction sent by a user in the service group, the method further includes:
the master control server receives a second query instruction sent by the user in the service group through the virtual robot;
the master control server sends a second query request to the registration center according to the second query instruction;
the registry feeds back the label sets of all controlled servers to the master control server;
and the master control server sends the label set in the service group through the virtual robot, wherein the label set is used for the user to select the label carried in the first query instruction.
In a possible implementation manner, the feeding back, by the registration center, the labelsets of all controlled servers to the master server includes:
the registration center detects each controlled server;
the registry determines the current online controlled server according to the activity detection result;
the registration center acquires all label sets of the controlled servers which are on line currently;
and the registry feeds the label set back to the master control server.
In one possible implementation, the method further includes:
if all controlled servers corresponding to one label are not online, the master control server receives first restart information sent by the user in the service group through the virtual robot, wherein the first restart information carries the label;
the master control server acquires a physical interface corresponding to the label;
and the master control server performs physical restart on the controlled server corresponding to the label through the physical interface.
In one possible implementation manner, after the registry obtains the tag sets of all currently online controlled servers, the method further includes:
the registration center compares the label set obtained this time with the label set obtained last time;
if the label exists in the label set obtained last time and is not in the label set obtained this time, the registration center sends the label to the master control server;
and the master control server sends prompt information carrying the label in the service group through the virtual robot, wherein the prompt information is used for prompting that all controlled servers corresponding to the label are not on line.
In one possible implementation, the method further includes:
if a part of controlled servers corresponding to one label are not on-line, the main control server receives second restart information sent by the user in the service group through the virtual robot, wherein the second restart information carries the address of the controlled server;
and the master control server sends a restart instruction to the controlled server according to the address, wherein the restart instruction is used for indicating the controlled server to restart.
In a possible implementation manner, the acquiring, by the master server, the monitoring content from the corresponding controlled server according to the address includes:
the master control server sends a first state acquisition request to a preset interface in a corresponding controlled server according to the address;
the controlled server acquires all state information of the controlled server according to the first state acquisition request;
and the master control server receives all state information fed back by the controlled server through the preset interface.
In a possible implementation manner, the acquiring, by the master server, the monitoring content from the corresponding controlled server according to the address includes:
the master control server receives a state acquisition instruction sent by the user in the service group through the virtual robot, wherein the state acquisition instruction carries a parameter type;
the master control server sends a second state acquisition request to a preset interface in a corresponding controlled server according to the address, wherein the second state acquisition request carries the parameter type;
the controlled server acquires state information corresponding to the parameter types;
and the master control server receives the state information fed back by the controlled server through the preset interface.
In a possible implementation manner, when the monitoring content includes the item release information, the acquiring, by the master server, the monitoring content of the controlled server includes:
the master control server receives a project issuing instruction sent by a user in the service group through the virtual robot, wherein the project issuing instruction carries project information;
the master control server controls a corresponding controlled server to release a project according to the project information;
the master control server acquires project release information of each controlled server, wherein the project release information is used for indicating that project release is completed or is abnormal.
In a possible implementation manner, when the monitoring content includes the file, the server monitoring system further includes a database, and a corresponding relationship between a file name and a storage path of the file is stored in the database, so that the acquiring, by the master server, the monitoring content of the controlled server includes:
the master control server receives a third query instruction sent by a user in the service group through the virtual robot, wherein the third query instruction carries a file name;
the master control server sends a third query request carrying the file name to the database;
the database feeds back a storage path of a file corresponding to the file name to the master control server;
and the master control server acquires the file from a corresponding controlled server according to the storage path.
In a possible implementation manner, before the master control server receives, through the virtual robot, a third query instruction sent by a user in the business group, the method further includes:
the master control server receives a fourth query instruction sent by the user in the service group through the virtual robot, wherein the fourth query instruction carries a keyword in a file name;
the master control server sends a fourth query request carrying the keyword to the database;
the database feeds back all file name sets carrying the keywords to the master control server;
and the master control server sends the file name set in the service group through the virtual robot, wherein the file name set is used for the user to select the file name carried in the third query instruction.
In a possible implementation manner, after the master server sends a third query request carrying the file name to the database, the method further includes:
and when the file is stored in the database, the database sends the file to the master control server.
In a possible implementation manner, when the monitoring content includes the slow log, and the server monitoring system further includes a database, the acquiring, by the master server, the monitoring content of the controlled server includes:
and the master control server receives the slow logs of each controlled server sent by the database at regular time.
On one hand, a server monitoring system is provided, the server monitoring system comprises a master control server and a plurality of controlled servers, and a virtual robot is installed in the master control server;
the master control server is used for acquiring monitoring content of the controlled server, wherein the monitoring content comprises at least one of state information, project release information, files and slow logs;
the master control server is further configured to send the monitoring content in a service group through the virtual robot.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
because the server monitoring system comprises the master control server and the controlled servers, and the virtual robot is installed in the master control server, the master control server can send the monitoring content in the service group through the virtual robot after acquiring the monitoring content of the controlled servers, so that all members in the service group can acquire the monitoring content in time, and the monitoring efficiency is improved. In addition, the monitoring content comprises at least one of state information, project release information, files and slow logs, so that the controlled server is comprehensively monitored.
The registration center feeds back the label sets of all the controlled servers to the master control server, and the master control server can send the label sets in the service group through the virtual robot, so that a user can select the labels carried in the first query instruction from the label sets, and the query difficulty is reduced.
When all the controlled servers corresponding to one label are not online, the controlled servers can be restarted through the physical interface; when a part of controlled servers corresponding to one label are not on-line, the controlled servers can be restarted by sending a restart instruction to the controlled servers, so that different restart modes can be selected in different application scenes.
All state information of the controlled server can be acquired, and partial state information of the controlled server can also be acquired, so that the state of the controlled server can be selectively acquired, and the user experience is improved.
The project release information of each controlled server is obtained through the main control server, and a user can be prompted when the project release is completed or the project release is abnormal, so that the user can check the project conveniently.
The database feeds back all the file name sets carrying the keywords to the master control server, and the master control server can send the file name sets in the service group through the virtual robot, so that a user can select the file name carried in the third query instruction from the file name sets, and the query difficulty is reduced.
The master control server receives the slow logs of each controlled server sent by the database at regular time, and then sends the slow logs to the service group through the virtual robot, so that a user can timely acquire the abnormal controlled server.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method of monitoring a server according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for monitoring a server according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for monitoring a server according to an embodiment of the present application;
FIG. 4 is a flow chart of a method for monitoring a server according to an embodiment of the present application;
FIG. 5 is a flow chart of a method for monitoring a server according to an embodiment of the present application;
fig. 6 is a block diagram of a server monitoring system according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application more clear, the embodiments of the present application will be further described in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for monitoring a server according to an embodiment of the present application is shown, where the method for monitoring a server is applicable to a server monitoring system, where the server monitoring system includes a master server and a plurality of controlled servers, and a virtual robot is installed in the master server. The server monitoring method can comprise the following steps:
The status information may represent various parameters in the controlled server. For example, the status information may include, but is not limited to: runtime, system load, PHP-FPM (FastCGI Process Manager) (total), disk usage, broadband send traffic, broadband receive traffic.
The item release information may indicate a release situation of the item. For example, the item release information may include an item release completion, an item release exception, and the like.
The slow log is used for recording the slow response of the controlled server and is recorded when the controlled server is abnormal.
In this embodiment, the master server may obtain different monitoring contents through different obtaining manners, which is described in detail below.
And 102, the master control server sends monitoring contents in the service group through the virtual robot.
After the master control server obtains the monitoring content, the virtual robot can be called, and the monitoring content is sent to the service group through the virtual robot.
In one implementation, the virtual robot may perform format conversion on the monitoring content and send the format-converted monitoring content to the service group.
In another implementation, the virtual robot may @ all members in the business group, i.e., send the monitoring content to all members; or the virtual robot can screen out the responsible part of members from the service group according to the monitoring content and @ the members, so as to send the monitoring content to the members.
To sum up, according to the server monitoring method provided by the embodiment of the application, since the server monitoring system includes the master control server and the plurality of controlled servers, and the virtual robot is installed in the master control server, the master control server can send the monitoring content in the service group through the virtual robot after acquiring the monitoring content of the controlled servers, so that all members in the service group can acquire the monitoring content in time, and thus the monitoring efficiency is improved. In addition, the monitoring content comprises at least one of state information, project release information, files and slow logs, so that the controlled server is comprehensively monitored.
Since the monitoring content includes at least one of status information, project release information, files, and slow logs, the following describes the four monitoring contents respectively.
1. The monitoring content includes status information.
Referring to fig. 2, a flowchart of a method for monitoring a server according to an embodiment of the present application is shown, where the method for monitoring a server is applicable to a server monitoring system, where the server monitoring system includes a master server, a plurality of controlled servers, and a registry, and a virtual robot is installed in the master server, and a plurality of controlled servers are registered in the registry. The server monitoring method can comprise the following steps:
When the user @ the virtual robot in the service group, the virtual robot may receive the second query instruction; or, when the user chats with other members in the service group, the virtual robot may perform semantic analysis on the chat content to obtain the second query instruction.
Wherein the second query instruction can be set according to the requirement. For example, if the second query instruction is set as @ virtual robot, when the user sends "@ virtual robot" in the business group, the virtual robot receives the second query instruction.
In this embodiment, the master control server may establish a connection with the registration center in advance, and a plurality of controlled servers are registered in the registration center in advance. It should be noted that, when registering a controlled server, the registration center may also group each controlled server, and identify a group in which the controlled server is located by using a tag.
And the second query request is used for querying the label of each controlled server registered in the registration center.
The main control server stores the corresponding relationship between the second query instruction and the second query request, and the main control server can search the corresponding second query request according to the received second query instruction and send the second query request to the registry.
Specifically, the step of the registry feeding back the label sets of all the controlled servers to the master control server may include: the registration center detects each controlled server; the registration center determines the current online controlled server according to the result of the activity detection; the method comprises the steps that a registration center obtains a label set of all current online controlled servers; the registry feeds back the set of labels to the master server.
Therefore, the registration center can filter out the labels corresponding to the controlled servers which are not on line, only feeds back the labels corresponding to the controlled servers which are on line, and can avoid acquiring state information from the controlled servers which are not on line, so that resources are saved.
In this embodiment, after the registry acquires all the tag sets of the currently online controlled servers, the registry may further compare the tag set acquired this time with the tag set acquired last time; if the label exists in the label set obtained last time and is not in the label set obtained this time, the registration center sends the label to the master control server; and the master control server sends prompt information carrying the label in the service group through the virtual robot, wherein the prompt information is used for prompting that all controlled servers corresponding to the label are not online.
When all the controlled servers corresponding to a certain label are not online, the restarting service cannot be provided, and only the controlled servers can be restarted physically. At this time, the master control server may receive first restart information sent by the user in the service group through the virtual robot, where the first restart information carries a tag; the master control server acquires a physical interface corresponding to the label; and the master control server performs physical restart on the controlled server corresponding to the label through the physical interface.
The master control server may display the number of each physical interface after receiving the first restart information, the user may select one number corresponding to the tag from the numbers, and the master control server may determine the physical interface according to the number selected by the user and physically restart all controlled servers corresponding to the tag through the physical interface.
And step 204, the master control server sends a label set in the service group through the virtual robot, wherein the label set is used for the user to select the label carried in the first query instruction.
After the master control server obtains the tag set, the virtual robot can be called, and the tag set is sent to the service group through the virtual robot.
After the user views the tag set in the service group, one or more tags may be selected from the tag set, and a first query instruction carrying the tags is sent in the service group.
For example, if the user selects a tag as japi from the tag set, the first query instruction sent in the service group may be: @ virtual robot japi.
In step 206, the main control server sends a first query request carrying a tag to the registry.
And step 207, the registration center feeds back the address of the controlled server corresponding to the label to the master control server.
After receiving the first query request, the registry can read the tags from the first query request, then obtain the addresses of the online controlled servers corresponding to the tags, and feed back the addresses to the master control server.
For example, the registry determines that the label japi corresponds to 3 online controlled servers, and the controlled servers are japi [1], japi [2] and japi [3], respectively, and then the registry can feed back addresses of japi [1], japi [2] and japi [3] to the master control server.
And step 208, the master control server acquires the state information from the corresponding controlled server according to the address.
The master control server may obtain status information from each controlled server according to the address of the controlled server. The controlled server is provided with a predetermined interface specially used for collecting state information, and the master control server can acquire the state information from the predetermined interface.
In this embodiment, the master control server may preset a plurality of parameter categories to be acquired, and acquire state information of all the parameter categories from a predetermined interface. At this time, the acquiring, by the master server, the state information from the corresponding controlled server according to the address may include: the master control server sends a first state acquisition request to a preset interface in a corresponding controlled server according to the address; the controlled server acquires all state information of the controlled server according to the first state acquisition request; and the master control server receives all state information fed back by the controlled server through a preset interface.
In another implementation manner, the master control server may further obtain status information of a part of the parameter classes from a predetermined interface. At this time, the acquiring, by the master server, the state information from the corresponding controlled server according to the address may include: the method comprises the steps that a master control server receives a state acquisition instruction sent by a user in a service group through a virtual robot, wherein the state acquisition instruction carries a parameter category; the master control server sends a second state acquisition request to a preset interface in a corresponding controlled server according to the address, wherein the second state acquisition request carries the parameter category; the controlled server acquires state information corresponding to the parameter types; and the master control server receives the state information fed back by the controlled server through a preset interface.
After the master control server obtains the state information, the virtual robot can be called, and the state information is sent to the service group through the virtual robot.
In one implementation, the virtual robot may perform format conversion on the status information and send the format-converted status information to the service group.
In another implementation, the virtual robot may @ all members in the service group, i.e. send status information to all members; alternatively, the virtual robot may screen out a part of members in charge from the service group according to the state information and @ these members, thereby sending the state information to these members.
The user can check the state information of each controlled server, and if a certain controlled server is determined to be not on line, the controlled server can be restarted. For example, the labels japi correspond to controlled servers japi [1], japi [2] and japi [3], and if the master control server only returns the state information of the japi [1] and the japi [3], the user can determine that the japi [2] is not online.
When a part of controlled servers corresponding to a certain label are not on-line, the restart service can be provided, the controlled server can be restarted only by sending a restart instruction to the controlled server, and the controlled server does not need to be restarted physically. At the moment, the master control server receives second restart information sent by the user in the service group through the virtual robot, wherein the second restart information carries the address of the controlled server; and the master control server sends a restart instruction to the controlled server according to the address, wherein the restart instruction is used for indicating the controlled server to restart.
To sum up, according to the server monitoring method provided by the embodiment of the application, since the server monitoring system includes the master control server and the plurality of controlled servers, and the virtual robot is installed in the master control server, the master control server can send the state information in the service group through the virtual robot after acquiring the state information of the controlled servers, so that all members in the service group can acquire the state information in time, and thus the monitoring efficiency is improved.
2. The monitoring content includes project release information.
Please refer to fig. 3, which is a flowchart illustrating a method for monitoring a server according to an embodiment of the present application, where the method for monitoring a server is applicable to a server monitoring system, where the server monitoring system includes a master server and a plurality of controlled servers, and a virtual robot is installed in the master server. The server monitoring method can comprise the following steps:
Optionally, the item issue instruction may also carry an item branch. Wherein, the item branch may include develop, preview and master.
And step 302, the master control server controls the corresponding controlled server to issue the project according to the project information.
The main control server can monitor each flow, and when one flow is executed and abnormal, the main control server generates project release information with abnormal project release; and when all the processes are successfully executed, the master control server generates project release information of the successful project release.
After acquiring the project release information, the master control server may invoke a virtual robot, and send the project release information to the service group through the virtual robot.
In one implementation, the virtual robot may perform format conversion on the project release information, and send the project release information after format conversion to the service group.
In another implementation, the virtual robot may @ all members in the service group, i.e., send the project release information to all members; or the virtual robot can screen out the responsible part of members from the service group according to the project release information and @ the members, so that the project release information is sent to the members.
To sum up, according to the server monitoring method provided by the embodiment of the application, since the server monitoring system includes the master control server and the plurality of controlled servers, and the virtual robot is installed in the master control server, the master control server can send the project release information in the service group through the virtual robot after obtaining the project release information of the controlled servers, so that all members in the service group can obtain the project release information in time, and thus the monitoring efficiency is improved.
3. The monitoring content comprises a file.
Referring to fig. 4, a flowchart of a method for monitoring a server according to an embodiment of the present application is shown, where the method for monitoring a server is applicable to a server monitoring system, where the server monitoring system includes a master server, a plurality of controlled servers, and a database, and a virtual robot is installed in the master server, and a corresponding relationship between a file name and a storage path of a file is stored in the database. The server monitoring method can comprise the following steps:
Wherein, the fourth query instruction can be set according to requirements. For example, if the fourth query instruction is @ virtual robot + keyword, when the user sends an "@ virtual robot rule" in the service group, the virtual robot receives the fourth query instruction, and the fourth query instruction carries the keyword of the "rule".
Wherein the fourth query request is used for querying the file name containing the keyword.
The main control server stores a corresponding relationship between the fourth query instruction and the fourth query request, and the main control server may search for the corresponding fourth query request according to the received fourth query instruction and send the fourth query request to the database.
The file names of all files are prestored in the database, after the keyword is obtained from the fourth query request, all file names containing the keyword can be found, and the file names are combined into a file name set.
After the master control server obtains the file name set, the virtual robot can be called, and the file name set is sent to the service group through the virtual robot.
After the user views the file name set in the service group, one or more file names may be selected from the file name set, and a third query instruction carrying the file names is sent in the service group.
For example, if the user selects a file name from the file name set as the interface call rule, the third query instruction sent in the service group may be: @ virtual robot interface calls rules.
In step 406, the master server sends a third query request carrying a file name to the database.
After receiving the third query request, the database may read the file name from the third query request, obtain the storage paths corresponding to the file name, and feed back the storage paths to the main control server.
And step 408, the master control server acquires the file from the corresponding controlled server according to the storage path.
After the master control server obtains the file, the virtual robot can be called, and the file is sent to the service group through the virtual robot.
Optionally, when the database stores the file corresponding to the file name, the database may also directly send the file to the master control server, and the master control server sends the file in the service group through the virtual robot.
To sum up, according to the server monitoring method provided by the embodiment of the application, since the server monitoring system includes the master control server and the plurality of controlled servers, and the virtual robot is installed in the master control server, the master control server can send files in the service group through the virtual robot after obtaining the files of the controlled servers, so that all members in the service group can obtain the files in time, and thus the monitoring efficiency is improved.
4. The monitoring content includes a slow log.
Referring to fig. 5, a flowchart of a method for monitoring a server according to an embodiment of the present application is shown, where the method for monitoring a server is applicable to a server monitoring system, where the server monitoring system includes a master control server, a plurality of controlled servers, and a database, and a virtual robot is installed in the master control server. The server monitoring method can comprise the following steps:
The database can collect the slow log of each controlled server in real time and send the slow log to the master control server at regular time.
After the master control server obtains the slow log, the master control server can call the virtual robot, and the slow log is sent to the service group through the virtual robot.
To sum up, according to the server monitoring method provided by the embodiment of the application, since the server monitoring system includes the master control server and the plurality of controlled servers, and the virtual robot is installed in the master control server, the master control server can send the slow log in the service group through the virtual robot after obtaining the slow log of the controlled servers, so that all members in the service group can obtain the slow log in time, and thus the monitoring efficiency is improved.
Referring to fig. 6, a block diagram of a server monitoring system according to an embodiment of the present application is shown. The server monitoring system comprises a main control server 610 and a plurality of controlled servers 620, and virtual robots are installed in the main control server;
the master control server 610 is configured to obtain monitoring content of the controlled server 620, where the monitoring content includes at least one of status information, project release information, file, and slow log;
the main control server 610 is further configured to send monitoring content in the service group through the virtual robot.
In an alternative embodiment, when the monitoring content includes the status information, the server monitoring system further includes a registry 630, and a plurality of controlled servers 620 are registered in the registry 630, then
The master control server 610 is further configured to receive, by the virtual robot, a first query instruction sent by the user in the service group, where the first query instruction carries a tag, and the tag is used to indicate a grouping of the controlled servers 620;
the main control server 610 is further configured to send a first query request carrying a tag to the registry 630;
the registry 630 is configured to feed back the address of the controlled server 620 corresponding to the tag to the master control server 610;
the master control server 610 is further configured to obtain the monitoring content from the corresponding controlled server 620 according to the address.
In an optional embodiment, before the master control server 610 receives, through the virtual robot, the first query instruction sent by the user in the service group, the master control server 610 is further configured to receive, through the virtual robot, the second query instruction sent by the user in the service group;
the main control server 610 is further configured to send a second query request to the registry 630 according to the second query instruction;
the registry 630 is further configured to feed back the label sets of all controlled servers 620 to the master control server 610;
the main control server 610 is further configured to send a tag set in the service group through the virtual robot, where the tag set is used for the user to select a tag carried in the first query instruction.
In an alternative embodiment, the registry 630 is further configured to:
exploring each controlled server 620;
determining a currently online controlled server 620 according to the activity detection result;
acquiring the label sets of all the controlled servers 620 which are currently online;
the labelsets are fed back to the master server 610.
In an optional embodiment, if all controlled servers 620 corresponding to a tag are not online, the master server 610 is further configured to:
receiving first restart information sent by a user in a service group through a virtual robot, wherein the first restart information carries a label;
acquiring a physical interface corresponding to the label;
and the controlled server 620 corresponding to the tag is physically restarted through the physical interface.
In an optional embodiment, after the registry 630 obtains all the tag sets of the controlled server 620 currently online, the registry 630 is further configured to compare the tag set obtained this time with the tag set obtained last time;
if there is a label in the label set obtained last time and not in the label set obtained this time, the registration center 630 is further configured to send a label to the main control server 610;
the master control server 610 is further configured to send, by the virtual robot, a prompt message carrying the tag in the service group, where the prompt message is used to prompt that all controlled servers 620 corresponding to the tag are not online.
In an optional embodiment, if a part of the controlled server 620 corresponding to a tag is not online, the master server 610 is further configured to:
receiving second restart information sent by a user in a service group through the virtual robot, wherein the second restart information carries an address of a controlled server 620;
and sending a restart instruction to the controlled server 620 according to the address, wherein the restart instruction is used for indicating the controlled server 620 to restart.
In an optional embodiment, the master control server 610 is further configured to send a first state obtaining request to a predetermined interface in the corresponding controlled server 620 according to the address;
the controlled server 620 is further configured to obtain all state information of the controlled server 620 according to the first state obtaining request;
the master control server 610 is further configured to receive all status information fed back by the controlled server 620 through a predetermined interface.
In an optional embodiment, the main control server 610 is further configured to receive, by the virtual robot, a status acquisition instruction sent by the user in the service group, where the status acquisition instruction carries the parameter category;
the master control server 610 is further configured to send a second state obtaining request to a predetermined interface in the corresponding controlled server 620 according to the address, where the second state obtaining request carries the parameter type;
the controlled server 620 is further configured to obtain state information corresponding to the parameter type;
the master control server 610 is further configured to receive status information fed back by the controlled server 620 through a predetermined interface.
In an optional embodiment, when the monitoring content includes the item publishing information, the main control server 610 is further configured to:
receiving a project issuing instruction sent by a user in a service group through a virtual robot, wherein the project issuing instruction carries project information;
controlling the corresponding controlled server 620 to release the project according to the project information;
project release information of each controlled server 620 is obtained, and the project release information is used for indicating that project release is completed or is abnormal.
In an optional embodiment, when the monitoring content includes a file, the server monitoring system further includes a database 640, and the database 640 stores a corresponding relationship between a file name of the file and a storage path, the master control server 610 is further configured to receive, by using the virtual robot, a third query instruction sent by the user in the service group, where the third query instruction carries the file name;
the main control server 610 is further configured to send a third query request carrying a file name to the database 640;
the database 640 is further configured to feed back a storage path of a file corresponding to the file name to the master control server 610;
the master control server 610 is further configured to obtain a file from the corresponding controlled server 620 according to the storage path.
In an optional embodiment, before the main control server 610 receives, through the virtual robot, a third query instruction sent by the user in the service group, the main control server 610 is further configured to receive, through the virtual robot, a fourth query instruction sent by the user in the service group, where the fourth query instruction carries a keyword in a file name;
the main control server 610 is further configured to send a fourth query request carrying the keyword to the database 640;
the database 640 is further configured to feed back all the file name sets carrying the keywords to the main control server 610;
the main control server 610 is further configured to send a file name set in the service group through the virtual robot, where the file name set is used for the user to select a file name carried in the third query instruction.
In an alternative embodiment, after the master control server 610 sends the third query request carrying the file name to the database 640, when the database 640 stores the file, the database 640 is further configured to send the file to the master control server 610.
In an optional embodiment, when the monitoring content includes a slow log, the server monitoring system further includes a database 640, and the master control server 610 is further configured to receive the slow log of each controlled server 620 periodically sent by the database 640.
To sum up, the server monitoring system provided by the embodiment of the application includes the master control server and the controlled servers, and the virtual robot is installed in the master control server, so that the master control server can send the monitoring content in the service group through the virtual robot after acquiring the monitoring content of the controlled servers, so that all members in the service group can acquire the monitoring content in time, and the monitoring efficiency is improved. In addition, the monitoring content comprises at least one of state information, project release information, files and slow logs, so that the controlled server is comprehensively monitored.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description should not be taken as limiting the embodiments of the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the embodiments of the present application should be included in the scope of the embodiments of the present application.
Claims (14)
1. A server monitoring method is characterized in that the method is used in a server monitoring system, the server monitoring system comprises a master control server and a plurality of controlled servers, and a virtual robot is installed in the master control server, the method comprises the following steps:
the master control server acquires monitoring content of the controlled server, wherein the monitoring content comprises at least one of state information, project release information, files and slow logs;
the master control server transmits the monitoring content through all the members in the service group or the screened responsible part of the members by the virtual robot;
when the monitoring content includes the status information, the server monitoring system further includes a registration center, and a plurality of controlled servers are registered in the registration center, and the acquiring, by the master server, the monitoring content of the controlled server includes:
the master control server receives a first query instruction sent by a user in the service group through the virtual robot, wherein the first query instruction carries a label, and the label is used for indicating grouping of the controlled servers;
the master control server sends a first query request carrying the label to the registration center;
the registration center feeds back the address of the controlled server corresponding to the label to the master control server;
and the master control server acquires the monitoring content from the corresponding controlled server according to the address.
2. The method of claim 1, wherein before the master server receives, through the virtual robot, a first query instruction sent by a user in the business group, the method further comprises:
the master control server receives a second query instruction sent by the user in the service group through the virtual robot;
the master control server sends a second query request to the registration center according to the second query instruction;
the registry feeds back the label sets of all controlled servers to the master control server;
and the master control server sends the label set in the service group through the virtual robot, wherein the label set is used for the user to select the label carried in the first query instruction.
3. The method of claim 2, wherein the registry feeds back the labelset of all controlled servers to the master server, comprising:
the registration center detects each controlled server;
the registry determines the current online controlled server according to the activity detection result;
the registration center acquires all label sets of the controlled servers which are on line currently;
and the registry feeds the label set back to the master control server.
4. The method of claim 3, further comprising:
if all controlled servers corresponding to one label are not online, the master control server receives first restart information sent by the user in the service group through the virtual robot, wherein the first restart information carries the label;
the master control server acquires a physical interface corresponding to the label;
and the master control server performs physical restart on the controlled server corresponding to the label through the physical interface.
5. The method of claim 3, wherein after the registry obtains the labelsets of all currently online controlled servers, the method further comprises:
the registration center compares the label set obtained this time with the label set obtained last time;
if the label exists in the label set obtained last time and is not in the label set obtained this time, the registration center sends the label to the master control server;
and the master control server sends prompt information carrying the label in the service group through the virtual robot, wherein the prompt information is used for prompting that all controlled servers corresponding to the label are not on line.
6. The method of claim 1, further comprising:
if a part of controlled servers corresponding to one label are not on-line, the main control server receives second restart information sent by the user in the service group through the virtual robot, wherein the second restart information carries the address of the controlled server;
and the master control server sends a restart instruction to the controlled server according to the address, wherein the restart instruction is used for indicating the controlled server to restart.
7. The method according to claim 1, wherein the acquiring, by the master server, the monitoring content from the corresponding controlled server according to the address includes:
the master control server sends a first state acquisition request to a preset interface in a corresponding controlled server according to the address;
the controlled server acquires all state information of the controlled server according to the first state acquisition request;
and the master control server receives all state information fed back by the controlled server through the preset interface.
8. The method according to claim 1, wherein the acquiring, by the master server, the monitoring content from the corresponding controlled server according to the address includes:
the master control server receives a state acquisition instruction sent by the user in the service group through the virtual robot, wherein the state acquisition instruction carries a parameter type;
the master control server sends a second state acquisition request to a preset interface in a corresponding controlled server according to the address, wherein the second state acquisition request carries the parameter type;
the controlled server acquires state information corresponding to the parameter types;
and the master control server receives the state information fed back by the controlled server through the preset interface.
9. The method according to claim 1, wherein when the monitoring content includes the project release information, the acquiring, by the master server, the monitoring content of the controlled server includes:
the master control server receives a project issuing instruction sent by a user in the service group through the virtual robot, wherein the project issuing instruction carries project information;
the master control server controls a corresponding controlled server to release a project according to the project information;
the master control server acquires project release information of each controlled server, wherein the project release information is used for indicating that project release is completed or is abnormal.
10. The method according to claim 1, wherein when the monitoring content includes the file, the server monitoring system further includes a database, and a corresponding relationship between a file name and a storage path of the file is stored in the database, then the acquiring, by the master server, the monitoring content of the controlled server includes:
the master control server receives a third query instruction sent by a user in the service group through the virtual robot, wherein the third query instruction carries a file name;
the master control server sends a third query request carrying the file name to the database;
the database feeds back a storage path of a file corresponding to the file name to the master control server;
and the master control server acquires the file from a corresponding controlled server according to the storage path.
11. The method of claim 10, wherein before the master server receives a third query instruction sent by a user in the service group through the virtual robot, the method further comprises:
the master control server receives a fourth query instruction sent by the user in the service group through the virtual robot, wherein the fourth query instruction carries a keyword in a file name;
the master control server sends a fourth query request carrying the keyword to the database;
the database feeds back all file name sets carrying the keywords to the master control server;
and the master control server sends the file name set in the service group through the virtual robot, wherein the file name set is used for the user to select the file name carried in the third query instruction.
12. The method of claim 10, wherein after the master server sends a third query request carrying the file name to the database, the method further comprises:
and when the file is stored in the database, the database sends the file to the master control server.
13. The method according to claim 1, wherein when the monitoring content includes the slow log, and the server monitoring system further includes a database, the acquiring, by the master server, the monitoring content of the controlled server includes:
and the master control server receives the slow logs of each controlled server sent by the database at regular time.
14. A server monitoring system is characterized in that the server monitoring system comprises a master control server and a plurality of controlled servers, and a virtual robot is installed in the master control server;
the master control server is used for acquiring monitoring content of the controlled server, wherein the monitoring content comprises at least one of state information, project release information, files and slow logs;
the master control server is also used for @ all members or screened responsible partial members in the service group through the virtual robot and sending the monitoring content;
when the monitoring content comprises the state information, the server monitoring system also comprises a registration center, and a plurality of controlled servers are registered in the registration center, then
The master control server is further configured to receive, by the virtual robot, a first query instruction sent by a user in the service group, where the first query instruction carries a tag, and the tag is used to indicate a group of the controlled servers;
the master control server is further configured to send a first query request carrying the tag to the registration center;
the registration center is used for feeding back the address of the controlled server corresponding to the label to the master control server;
and the master control server is also used for acquiring the monitoring content from the corresponding controlled server according to the address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110792361.4A CN113285855B (en) | 2021-07-14 | 2021-07-14 | Server monitoring method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110792361.4A CN113285855B (en) | 2021-07-14 | 2021-07-14 | Server monitoring method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113285855A CN113285855A (en) | 2021-08-20 |
CN113285855B true CN113285855B (en) | 2021-12-07 |
Family
ID=77286723
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110792361.4A Active CN113285855B (en) | 2021-07-14 | 2021-07-14 | Server monitoring method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113285855B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4393445A (en) * | 1981-03-06 | 1983-07-12 | International Business Machines Corporation | Information-signal recording apparatus employing record volume oriented identification signals |
US7194417B1 (en) * | 2000-09-22 | 2007-03-20 | Amadeus Revenue Integrity, Inc. | Automated method and system for recognizing unfulfilled obligations and initiating steps to convert said obligations to a fulfilled status or to a null status for resale |
EP2601603A2 (en) * | 2010-08-05 | 2013-06-12 | Roche Diagnostics GmbH | Method for aggregating task data objects and for providing an aggregated view |
EP2996288A1 (en) * | 2014-09-15 | 2016-03-16 | John R. Thorpe | Non-retained message system |
CN107508747A (en) * | 2017-09-12 | 2017-12-22 | 广东欧珀移动通信有限公司 | Group communication method, server and the computer-readable storage medium of converged communication |
CN108040004A (en) * | 2018-01-29 | 2018-05-15 | 上海壹账通金融科技有限公司 | Control method, device, equipment and the readable storage medium storing program for executing of virtual robot |
CN110661789A (en) * | 2019-09-09 | 2020-01-07 | 腾讯科技(深圳)有限公司 | Address resetting method, device, equipment and computer readable storage medium |
CN110674383A (en) * | 2019-09-26 | 2020-01-10 | 支付宝(杭州)信息技术有限公司 | Public opinion query method, device and equipment |
CN111565135A (en) * | 2020-04-30 | 2020-08-21 | 吉林省鑫泽网络技术有限公司 | Method for monitoring operation of server, monitoring server and storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7110975B2 (en) * | 2000-01-27 | 2006-09-19 | Marks De Chabris Gloriana | Order matching system |
AUPQ931500A0 (en) * | 2000-08-10 | 2000-08-31 | Montacute Holdings Pty Ltd | System for trading produts |
AU2003239385A1 (en) * | 2002-05-10 | 2003-11-11 | Richard R. Reisman | Method and apparatus for browsing using multiple coordinated device |
US7313690B2 (en) * | 2003-06-27 | 2007-12-25 | Microsoft Corporation | Three way validation and authentication of boot files transmitted from server to client |
CN103810650A (en) * | 2012-11-08 | 2014-05-21 | 无锡津天阳激光电子有限公司 | Method and device of catering Internet of Things |
RU2514142C1 (en) * | 2012-12-25 | 2014-04-27 | Закрытое акционерное общество "Лаборатория Касперского" | Method for enhancement of operational efficiency of hardware acceleration of application emulation |
CN103928861A (en) * | 2013-01-10 | 2014-07-16 | 尹航 | Intelligent electric power monitoring device group |
CN106792438A (en) * | 2016-11-26 | 2017-05-31 | 宇龙计算机通信科技(深圳)有限公司 | A kind of SOT state of termination management method and device |
CN107682182A (en) * | 2017-09-14 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of alarm method and system for realizing virtualization network load monitoring |
CN109150842B (en) * | 2018-07-25 | 2021-07-09 | 平安科技(深圳)有限公司 | Injection vulnerability detection method and device |
-
2021
- 2021-07-14 CN CN202110792361.4A patent/CN113285855B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4393445A (en) * | 1981-03-06 | 1983-07-12 | International Business Machines Corporation | Information-signal recording apparatus employing record volume oriented identification signals |
US7194417B1 (en) * | 2000-09-22 | 2007-03-20 | Amadeus Revenue Integrity, Inc. | Automated method and system for recognizing unfulfilled obligations and initiating steps to convert said obligations to a fulfilled status or to a null status for resale |
EP2601603A2 (en) * | 2010-08-05 | 2013-06-12 | Roche Diagnostics GmbH | Method for aggregating task data objects and for providing an aggregated view |
EP2996288A1 (en) * | 2014-09-15 | 2016-03-16 | John R. Thorpe | Non-retained message system |
CN107508747A (en) * | 2017-09-12 | 2017-12-22 | 广东欧珀移动通信有限公司 | Group communication method, server and the computer-readable storage medium of converged communication |
CN108040004A (en) * | 2018-01-29 | 2018-05-15 | 上海壹账通金融科技有限公司 | Control method, device, equipment and the readable storage medium storing program for executing of virtual robot |
CN110661789A (en) * | 2019-09-09 | 2020-01-07 | 腾讯科技(深圳)有限公司 | Address resetting method, device, equipment and computer readable storage medium |
CN110674383A (en) * | 2019-09-26 | 2020-01-10 | 支付宝(杭州)信息技术有限公司 | Public opinion query method, device and equipment |
CN111565135A (en) * | 2020-04-30 | 2020-08-21 | 吉林省鑫泽网络技术有限公司 | Method for monitoring operation of server, monitoring server and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113285855A (en) | 2021-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109150572B (en) | Method, device and computer readable storage medium for realizing alarm association | |
CN111277637B (en) | Method, device, terminal and storage medium for merging session groups | |
WO2021190087A1 (en) | Task execution method, device and system, and server | |
WO2007134885A1 (en) | Method, apparatus and computer program for controlling retention of data messages | |
CN104636211B (en) | Information interacting method and middleware system between a kind of software systems | |
CN112396432B (en) | Interview task generation system, interview task generation method, interview task generation equipment and interview task generation medium | |
CN110971447A (en) | Test information management method and device, electronic equipment and readable storage medium | |
US20080294743A1 (en) | Information processing device, computer readable recording medium, and information processing method | |
CN113506137A (en) | E-mail marketing analysis method, system and equipment | |
CN107045466B (en) | Service data auditing method, device and system | |
CN113285855B (en) | Server monitoring method and system | |
CN111200654A (en) | Client request error processing method and device | |
CN110048940A (en) | Sending method, device, server and the readable storage medium storing program for executing of instant communication message | |
CN112104480B (en) | Method and system for improving alarm quality | |
CN114201293A (en) | Kafka middleware cluster parameter modification method and device and storage medium | |
CN110362464B (en) | Software analysis method and equipment | |
CN112395119A (en) | Abnormal data processing method, abnormal data processing device, server and storage medium | |
CN115426421B (en) | Message analysis method based on RPA robot | |
CN113704212B (en) | Data synchronization method, device and equipment of server and computer storage medium | |
CN116109112B (en) | Service data processing method, device, medium and equipment based on aggregation interface | |
CN114531366B (en) | Service treatment method and device | |
CN113792950B (en) | Task dispatch method and device, computer readable storage medium and electronic equipment | |
CN112422414B (en) | Session message processing method, device and computer readable storage medium | |
US8924403B2 (en) | Method and system for central data querying | |
CN116467137A (en) | Distributed monitoring method, system, equipment and storage medium based on message queue |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: Room 307, Zijin Oriental building, 288 Qiyue street, Suzhou Industrial Park, Suzhou City, Jiangsu Province Patentee after: Tianju DIHE (Suzhou) Technology Co.,Ltd. Address before: Room 307, Zijin Oriental building, 288 Qiyue street, Suzhou Industrial Park, Suzhou City, Jiangsu Province Patentee before: TIANJU DIHE (SUZHOU) DATA CO.,LTD. |