CN115426252A - Method and device for acquiring server hardware log - Google Patents

Method and device for acquiring server hardware log Download PDF

Info

Publication number
CN115426252A
CN115426252A CN202210813420.6A CN202210813420A CN115426252A CN 115426252 A CN115426252 A CN 115426252A CN 202210813420 A CN202210813420 A CN 202210813420A CN 115426252 A CN115426252 A CN 115426252A
Authority
CN
China
Prior art keywords
bmc
server hardware
server
acquiring
webpage
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.)
Pending
Application number
CN202210813420.6A
Other languages
Chinese (zh)
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.)
Inspur Communication Technology Co Ltd
Original Assignee
Inspur Communication 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 Inspur Communication Technology Co Ltd filed Critical Inspur Communication Technology Co Ltd
Priority to CN202210813420.6A priority Critical patent/CN115426252A/en
Publication of CN115426252A publication Critical patent/CN115426252A/en
Pending legal-status Critical Current

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/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
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • 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/28Restricting access to network management systems or functions, e.g. using authorisation function to access network configuration
    • 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/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • 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/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and a device for acquiring a server hardware log, which are applied to an OMC (operation management and control) system, wherein the method comprises the following steps: acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage; sending a get request to a BMC webpage to obtain randomTag; based on the URL prefix, the login user name, the login password and randomTag, sending a post request to the BMC webpage to acquire token and cookie; and sending a get request to the BMC webpage to acquire a server hardware log based on the URL prefix, the token and the cookie. According to the invention, the token and the cookie are obtained by simulating the login of the BMC webpage, and the server hardware log is obtained through the request data interface based on the token and the cookie, so that the server hardware log can be effectively obtained without logging in the server, and the obtaining efficiency of the server hardware log is improved.

Description

Method and device for acquiring server hardware log
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for acquiring a server hardware log.
Background
When a server hardware fault problem is located, the server hardware fault needs to be located based on server hardware log data.
In the related art, the server hardware log is usually obtained by logging in the server, and this method relies on normal logging in of the server again, so for a failed server, the server cannot normally log in again in most cases, the server hardware log information cannot be effectively obtained, and it is difficult to ensure timeliness of obtaining the server hardware log.
Therefore, how to effectively and efficiently obtain the server hardware log is an urgent problem to be solved in the industry.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a device for acquiring a server hardware log.
In a first aspect, the present invention provides a method for acquiring a server hardware log, which is applied to an operation and maintenance center OMC system, and includes:
acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
sending a get request to the BMC webpage to obtain a random number randomTag;
sending a post request to the BMC webpage based on the URL prefix, the login user name and the login password and the randomTag, and acquiring token information and cookie information;
and sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information, and acquiring server hardware log data.
Optionally, the method for obtaining a server hardware log according to the present invention obtains a URL prefix, a login user name, and a login password corresponding to a BMC web page, and includes:
and periodically traversing a server IP information table stored in a database of the OMC system, and acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage from the server IP information table.
Optionally, according to the method for obtaining a server hardware log provided by the present invention, based on the URL prefix, the token information, and the cookie information, sending a get request to the BMC webpage, and after obtaining server hardware log data, the method further includes:
acquiring BMC dictionary data stored in a database of the OMC system;
and translating the server hardware log data into user readable log data based on the BMC dictionary data, and writing the user readable log data into a database of the OMC system.
Optionally, before periodically traversing a server IP information table stored in a database of the OMC system, the method for acquiring a server hardware log according to the present invention further includes:
and writing the IP address and the Port of the server corresponding to the BMC webpage, and the login user name and the login password corresponding to the BMC webpage into a database of the OMC system.
In a second aspect, the present invention further provides an apparatus for obtaining a server hardware log, which is applied to an operation maintenance center OMC system, and includes:
the first acquisition module is used for acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
the second acquisition module is used for sending a get request to the BMC webpage to acquire a random number randomTag;
a third obtaining module, configured to send a post request to the BMC web page based on the URL prefix, the login user name, the login password, and the randomTag, and obtain token information and cookie information;
and the fourth obtaining module is used for sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information to obtain server hardware log data.
Optionally, according to the apparatus for acquiring a server hardware log provided by the present invention, the first acquiring module is specifically configured to:
and periodically traversing a server IP information table stored in a database of the OMC system, and acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage from the server IP information table.
Optionally, the apparatus for obtaining a server hardware log according to the present invention further includes:
a fifth obtaining module, configured to obtain BMC dictionary data stored in a database of the OMC system;
and the first writing module is used for translating the server hardware log data into user readable log data based on the BMC dictionary data and writing the user readable log data into a database of the OMC system.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for obtaining the server hardware log according to the first aspect.
In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method for obtaining a server hardware log according to the first aspect.
In a fifth aspect, the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for obtaining a server hardware log according to the first aspect is implemented.
According to the method and the device for acquiring the server hardware log, the token information and the cookie information are acquired through simulating the login BMC webpage, the server hardware log is acquired through the request data interface based on the token information and the cookie information, the server hardware log can be effectively acquired under the condition that the server does not need to be logged in, and the acquisition efficiency of the server hardware log is improved.
Drawings
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart illustrating a method for obtaining a hardware log of a server according to the present invention;
FIG. 2 is a second flowchart illustrating a method for obtaining a server hardware log according to the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for obtaining a server hardware log according to the present invention;
fig. 4 is a schematic physical structure diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The following describes a method and an apparatus for obtaining a server hardware log according to the present invention with reference to fig. 1 to 4.
Fig. 1 is a schematic flow diagram of a method for obtaining a server hardware log, as shown in fig. 1, the method is applied to an OMC (Operation and Maintenance Center) system, and includes:
step 100, acquiring a URL (Uniform Resource Locator) prefix, a login user name and a login password corresponding to a BMC (Baseboard Management Controller) webpage;
step 110, sending a get request to the BMC webpage to obtain a random number randomTag;
step 120, based on the URL prefix, the login user name and the login password, and the randomTag, sending a post request to the BMC webpage to acquire token information and cookie information;
and step 130, sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information, and acquiring server hardware log data.
Optionally, the method for acquiring the server hardware log provided by the present invention may be applied to an operation maintenance center OMC system, and the server hardware log data may be acquired by simulating to log in the BMC, and then by analyzing a login mode, and simulating to acquire an API (Application Program Interface) Interface, so that the server hardware log data may be quickly and conveniently located based on the acquired server hardware log data.
Specifically, in order to overcome the defects that the server hardware log data are difficult to effectively acquire and cannot be efficiently acquired in the prior art, the method and the device for acquiring the server hardware log data acquire token information and cookie information through simulating the log-in BMC webpage, acquire the server hardware log through the request data interface based on the token information and the cookie information, effectively acquire the server hardware log without logging in the server, and improve the acquisition efficiency of the server hardware log.
It will be appreciated that the baseboard management controller BMC is a dedicated microcontroller embedded on the server motherboard responsible for managing the interface between system management software and platform hardware. Therefore, data acquisition can be carried out on the BMC, crawling synchronization of server hardware data can be achieved, and further operation and maintenance personnel of the operation and maintenance center can be helped to quickly locate server hardware faults by gathering and analyzing crawled logs of various driving devices.
Optionally, a URL prefix, a login user name, and a login password corresponding to the BMC webpage of the baseboard management controller may be obtained.
For example, the obtained URL prefix, login username, and login password are as follows:
url_prefix:https://ip:port
username:"1e-1b-12-16-11"
password:"1e-1b-12-16-11"。
it is understood that the URL prefix includes the IP (Internet Protocol) address and Port of the server.
Optionally, a get request may be sent to the BMC web page based on the obtained URL prefix, and a random number randomTag may be obtained, for example, the URL and request-header are requested as follows:
url:url_prefix+/api/randomtag
header:X-CSRFTOKEN:null
header:X-Requested-With:XMLHttp
header:Cookie:null。
optionally, a post request may be sent to the BMC web page based on the URL prefix, login username and login password, and randomTag, to obtain token information and cookie information, for example, request URL and request-body as follows:
Figure BDA0003740166510000061
Figure BDA0003740166510000071
based on the post request, the token and the cookie information can be acquired as the cookie;
and then, respectively acquiring token information and cookie information in the following modes:
token=cookieToken.get("token")
cookie=cookieToken.get("cookie")
optionally, a get request may be sent to the BMC web page based on the obtained URL prefix, token information, and cookie information, and server hardware log data may be obtained, for example, the request URL and the request-header are as follows:
url:url_prefix+/api/event
header:X-CSRFTOKEN:token
header:X-Requested-With:XMLHttp
header:Cookie:cookie。
based on the get request, the service data result of the server drive log, that is, the server hardware log data, can be obtained.
The method for acquiring the server hardware log comprises the steps of forming a complete data crawling processing flow by an OMC system and a BMC webpage, firstly simulating and logging in the BMC webpage to acquire token information and cookie information, and then requesting a data interface to carry the token information and the cookie information to acquire server hardware log data.
Optionally, by the method for acquiring the server hardware log provided by the present invention, the hardware log data of all servers related to the OMC system can be acquired.
According to the method for acquiring the server hardware log, the token information and the cookie information are acquired through simulating the log-in BMC webpage, the server hardware log is acquired through the request data interface based on the token information and the cookie information, the server hardware log can be effectively acquired under the condition that the server does not need to be logged in, and the acquisition efficiency of the server hardware log is improved.
Optionally, the obtaining of a URL prefix, a login user name, and a login password corresponding to a BMC webpage of the baseboard management controller includes:
and periodically traversing a server IP information table stored in a database of the OMC system, and acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage from the server IP information table.
Specifically, a server IP information table stored in a database of the OMC system may be periodically traversed, and a URL prefix, a login user name, and a login password corresponding to the BMC web page may be acquired from the server IP information table.
Optionally, the period duration for traversing the IP information table of the server may be adaptively set based on actual applications, which is not specifically limited in the present invention.
For example, the period duration for traversing the server IP information table may be 1 minute, i.e., traversing the database of the OMC system every 1 minute interval.
Optionally, sending a get request to the BMC webpage based on the URL prefix, the token information, and the cookie information, and after obtaining server hardware log data, the method further includes:
acquiring BMC dictionary data stored in a database of the OMC system;
and translating the server hardware log data into user readable log data based on the BMC dictionary data, and writing the user readable log data into a database of the OMC system.
Specifically, after a get request is sent to a BMC webpage based on a URL prefix, token information and cookie information and server hardware log data are obtained, BMC dictionary data stored in a database of the OMC system can be obtained, the obtained server hardware log data are translated into user readable log data based on the BMC dictionary data, and the user readable log data are written into the database of the OMC system, so that operation and maintenance personnel can obtain the log data from the database at any time to quickly locate server hardware faults.
Optionally, before periodically traversing the server IP information table stored in the database of the OMC system, the method further includes:
and writing the IP address and the Port of the server corresponding to the BMC webpage, and the login user name and the login password corresponding to the BMC webpage into a database of the OMC system.
Specifically, before periodically traversing the server IP information table stored in the database of the OMC system, the IP address and Port of the server corresponding to the BMC web page, and the login user name and login password corresponding to the BMC web page may be written into the database of the OMC system.
Fig. 2 is a second schematic flow chart of the method for acquiring a server hardware log according to the present invention, and as shown in fig. 2, the method includes a simulation login stage and a data acquisition stage, which relate to an OMC-database (OMC-database) of the OMC system, an OMC-service (OMC-service) and a BMC web page (BMC-web) of the OMC system.
Specifically, in the simulation login phase, the method comprises the following steps:
step 201, periodically traversing the server IP information table at the omc-database, and acquiring a URL prefix, a login user name and a login password:
url_prefix:https://ip:port
username:"1e-1b-12-16-11"
password:"1e-1b-12-16-11"。
step 202, sending a get request to bmc-web by the omc-service based on the URL prefix, and acquiring a random number randomTag:
url:url_prefix+/api/randomtag
header:X-CSRFTOKEN:null
header:X-Requested-With:XMLHttp
header:Cookie:null。
step 203, the omc-service sends a post request to the bmc-web based on the URL prefix, the login user name and the login password to acquire the cookie token information:
Figure BDA0003740166510000091
Figure BDA0003740166510000101
specifically, in the data acquisition phase, the method comprises the following steps:
step 204, the omc-service sends a get request to the bmc-web based on the URL prefix and cookie information token information to obtain server hardware log data result:
url:url_prefix+/api/event
header:X-CSRFTOKEN:token
header:X-Requested-With:XMLHttp
header:Cookie:cookie。
step 205, acquiring hardware driving dictionary data, namely BMC dictionary data, from the omc-database, and translating the server hardware log data result into user readable log data based on the hardware driving dictionary data.
And step 206, writing the user readable log data into the omc-database.
It can be understood that the method for acquiring the server hardware log provided by the embodiment of the invention realizes that the OMC system acquires data of a plurality of server hardware drive logs. Firstly, obtaining a BMC web page login step through analysis, wherein the OMC back-end service simulation obtains important token and cookie data, then a header carries the token and the cookie data in a request service API interface, so that required server hardware log data is obtained, the stored BMC dictionary data is translated to generate log data readable by a user, and the log data is written into a database of an OMC system, so that an OMC user can conveniently and quickly locate the hardware fault of the server under the condition that the user does not log in the server.
It can be understood that the method for acquiring the server hardware log provided by the embodiment of the invention has higher reference value for realizing the function under the similar scene of the application system of the management server platform.
According to the method for acquiring the server hardware log, the token information and the cookie information are acquired through simulating the login of the BMC webpage, the server hardware log is acquired through the request data interface based on the token information and the cookie information, the server hardware log can be effectively acquired under the condition that the server does not need to be logged in, and the acquisition efficiency of the server hardware log is improved.
The following describes an apparatus for acquiring a server hardware log according to the present invention, and the apparatus for acquiring a server hardware log described below and the method for acquiring a server hardware log described above may be referred to in correspondence with each other.
Fig. 3 is a schematic structural diagram of an apparatus for obtaining a server hardware log according to the present invention, as shown in fig. 3, the apparatus is applied to an OMC system, and includes: a first acquisition module 310, a second acquisition module 320, a third acquisition module 330, and a fourth acquisition module 340; wherein:
the first obtaining module 310 is configured to obtain a URL prefix, a login user name, and a login password corresponding to a BMC webpage of the BMC;
the second obtaining module 320 is configured to send a get request to the BMC web page to obtain a random number randomTag;
the third obtaining module 330 is configured to send a post request to the BMC webpage based on the URL prefix, the login user name, the login password, and the randomTag, and obtain token information and cookie information;
the fourth obtaining module 340 is configured to send a get request to the BMC webpage based on the URL prefix, the token information, and the cookie information, and obtain server hardware log data.
According to the device for acquiring the server hardware log, the token information and the cookie information are acquired through simulating the login of the BMC webpage, the server hardware log is acquired through the request data interface based on the token information and the cookie information, the server hardware log can be effectively acquired under the condition that the server does not need to be logged in, and the acquisition efficiency of the server hardware log is improved.
Optionally, the first obtaining module is specifically configured to:
and periodically traversing a server IP information table stored in a database of the OMC system, and acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage from the server IP information table.
Optionally, the apparatus for obtaining a server hardware log provided by the present invention further includes:
a fifth obtaining module, configured to obtain BMC dictionary data stored in a database of the OMC system;
and the first writing module is used for translating the server hardware log data into user readable log data based on the BMC dictionary data and writing the user readable log data into a database of the OMC system.
Optionally, the apparatus for obtaining a server hardware log provided by the present invention further includes:
and the second writing module is used for writing the IP address and the Port of the server corresponding to the BMC webpage, and the login user name and the login password corresponding to the BMC webpage into a database of the OMC system.
According to the device for acquiring the server hardware log, the token information and the cookie information are acquired through simulating the login of the BMC webpage, the server hardware log is acquired through the request data interface based on the token information and the cookie information, the server hardware log can be effectively acquired under the condition that the server does not need to be logged in, and the acquisition efficiency of the server hardware log is improved.
Specifically, the apparatus for acquiring a server hardware log according to the embodiment of the present invention can implement all the method steps implemented by the method for acquiring a server hardware log, and can achieve the same technical effects, and details of the same parts and beneficial effects as those of the method embodiment in this embodiment are not described herein again.
Fig. 4 is a schematic physical structure diagram of an electronic device provided in the present invention, and as shown in fig. 4, the electronic device may include: a processor (processor) 410, a communication Interface 420, a memory (memory) 430 and a communication bus 440, wherein the processor 410, the communication Interface 420 and the memory 430 are communicated with each other via the communication bus 440. The processor 410 may call logic instructions in the memory 430 to execute the method for obtaining the server hardware log provided by the above methods, where the method includes:
acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
sending a get request to the BMC webpage to obtain a random number randomTag;
sending a post request to the BMC webpage based on the URL prefix, the login user name and the login password and the randomTag, and acquiring token information and cookie information;
and sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information to acquire server hardware log data.
In addition, the logic instructions in the memory 430 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. 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 removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer being capable of executing the method for obtaining a server hardware log provided by the above methods, the method including:
acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
sending a get request to the BMC webpage to obtain a random number randomTag;
based on the URL prefix, the login user name and the login password as well as the randomTag, sending a post request to the BMC webpage to acquire token information and cookie information;
and sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information, and acquiring server hardware log data.
In another aspect, the present invention also provides a non-transitory computer readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the method for obtaining a server hardware log provided in the foregoing embodiments, the method including:
acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
sending a get request to the BMC webpage to obtain a random number randomTag;
sending a post request to the BMC webpage based on the URL prefix, the login user name and the login password and the randomTag, and acquiring token information and cookie information;
and sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information to acquire server hardware log data.
The above-described embodiments of the apparatus are merely illustrative, and 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 network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for obtaining a server hardware log is applied to an Operation Maintenance Center (OMC) system and comprises the following steps:
acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
sending a get request to the BMC webpage to obtain a random number randomTag;
sending a post request to the BMC webpage based on the URL prefix, the login user name and the login password and the randomTag, and acquiring token information and cookie information;
and sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information, and acquiring server hardware log data.
2. The method for acquiring the server hardware log according to claim 1, wherein acquiring a URL prefix, a login user name and a login password corresponding to a BMC webpage comprises:
and periodically traversing a server IP information table stored in a database of the OMC system, and acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage from the server IP information table.
3. The method for acquiring the server hardware log according to claim 1 or 2, wherein based on the URL prefix, the token information and the cookie information, the method for transmitting the get request to the BMC webpage further includes, after acquiring server hardware log data:
acquiring BMC dictionary data stored in a database of the OMC system;
and translating the server hardware log data into user readable log data based on the BMC dictionary data, and writing the user readable log data into a database of the OMC system.
4. The method of claim 2, wherein before periodically traversing the server IP information table stored in the database of the OMC system, the method further comprises:
and writing the IP address and the Port of the server corresponding to the BMC webpage, and the login user name and the login password corresponding to the BMC webpage into a database of the OMC system.
5. An apparatus for obtaining a server hardware log, which is applied to an Operation and Maintenance Center (OMC) system, includes:
the first acquisition module is used for acquiring a URL prefix, a login user name and a login password corresponding to a BMC (baseboard management controller) webpage;
the second acquisition module is used for sending a get request to the BMC webpage to acquire a random number randomTag;
a third obtaining module, configured to send a post request to the BMC web page based on the URL prefix, the login user name, the login password, and the randomTag, and obtain token information and cookie information;
and the fourth acquisition module is used for sending a get request to the BMC webpage based on the URL prefix, the token information and the cookie information, and acquiring server hardware log data.
6. The apparatus for obtaining the server hardware log according to claim 5, wherein the first obtaining module is specifically configured to:
and periodically traversing a server IP information table stored in a database of the OMC system, and acquiring a URL prefix, a login user name and a login password corresponding to the BMC webpage from the server IP information table.
7. The apparatus for obtaining a server hardware log according to claim 5 or 6, further comprising:
a fifth obtaining module, configured to obtain BMC dictionary data stored in a database of the OMC system;
and the first writing module is used for translating the server hardware log data into user readable log data based on the BMC dictionary data and writing the user readable log data into a database of the OMC system.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for obtaining a server hardware log according to any one of claims 1 to 4 when executing the program.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for obtaining a server hardware log according to any one of claims 1 to 4.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method for obtaining a server hardware log according to any of claims 1 to 4.
CN202210813420.6A 2022-07-11 2022-07-11 Method and device for acquiring server hardware log Pending CN115426252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210813420.6A CN115426252A (en) 2022-07-11 2022-07-11 Method and device for acquiring server hardware log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210813420.6A CN115426252A (en) 2022-07-11 2022-07-11 Method and device for acquiring server hardware log

Publications (1)

Publication Number Publication Date
CN115426252A true CN115426252A (en) 2022-12-02

Family

ID=84197300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210813420.6A Pending CN115426252A (en) 2022-07-11 2022-07-11 Method and device for acquiring server hardware log

Country Status (1)

Country Link
CN (1) CN115426252A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10069812B1 (en) * 2014-03-14 2018-09-04 Intuit Inc. Technique for facilitating auto login to a website
CN111191097A (en) * 2019-12-20 2020-05-22 天阳宏业科技股份有限公司 Method, device and system for automatically acquiring webpage information by web crawler
CN112799904A (en) * 2020-12-30 2021-05-14 苏州浪潮智能科技有限公司 Batch automatic operation inspection method, device and medium for servers
CN113055185A (en) * 2021-03-24 2021-06-29 的卢技术有限公司 Token-based authentication method and device, storage medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10069812B1 (en) * 2014-03-14 2018-09-04 Intuit Inc. Technique for facilitating auto login to a website
CN111191097A (en) * 2019-12-20 2020-05-22 天阳宏业科技股份有限公司 Method, device and system for automatically acquiring webpage information by web crawler
CN112799904A (en) * 2020-12-30 2021-05-14 苏州浪潮智能科技有限公司 Batch automatic operation inspection method, device and medium for servers
CN113055185A (en) * 2021-03-24 2021-06-29 的卢技术有限公司 Token-based authentication method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US11329904B2 (en) Using subject alternative names for aggregate network traffic monitoring
US8949990B1 (en) Script-based XSS vulnerability detection
US9213832B2 (en) Dynamically scanning a web application through use of web traffic information
US9426171B1 (en) Detecting network attacks based on network records
US10630531B2 (en) Propagating state information to network nodes
US9473516B1 (en) Detecting network attacks based on a hash
CN112261172B (en) Service addressing access method, device, system, equipment and medium
CN109067789A (en) Web vulnerability scanning method, system based on linux system
KR101443071B1 (en) Error Check System of Webpage
CN104991831A (en) SSO system integration method based on server
CN106648838B (en) Resource pool management configuration method and device
CN107911496A (en) A kind of VPN service terminal acts on behalf of the method and device of DNS
CN111800511B (en) Synchronous login state processing method, system, equipment and readable storage medium
US9621632B2 (en) Scaling of stateful enterprise services
CN110572402A (en) internet hosting website detection method and system based on network access behavior analysis and readable storage medium
US10705945B1 (en) Computing system testing service
US20090248855A1 (en) Method for monitoring web page statistics
CN113867958A (en) Method, device and equipment for pushing task corner mark and readable medium
CN109698832B (en) Method for rapidly providing Portal authentication and rapidly popping Portal authentication page and related equipment
US20140019610A1 (en) Correlated Tracing of Connections through TDS
CN115426252A (en) Method and device for acquiring server hardware log
CN113726813B (en) Network security configuration method, device and storage medium
AU2018390863A1 (en) Computer system and method for extracting dynamic content from websites
CN113778709B (en) Interface calling method, device, server and storage medium
CN113204449B (en) Session backup method, computer-readable storage medium and terminal device

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