CN117873827A - Log configuration information updating method and device, storage medium and electronic device - Google Patents

Log configuration information updating method and device, storage medium and electronic device Download PDF

Info

Publication number
CN117873827A
CN117873827A CN202410010155.7A CN202410010155A CN117873827A CN 117873827 A CN117873827 A CN 117873827A CN 202410010155 A CN202410010155 A CN 202410010155A CN 117873827 A CN117873827 A CN 117873827A
Authority
CN
China
Prior art keywords
configuration information
log
acquisition
log configuration
acquiring
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
CN202410010155.7A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202410010155.7A priority Critical patent/CN117873827A/en
Publication of CN117873827A publication Critical patent/CN117873827A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method and a device for updating log configuration information, a storage medium and an electronic device, wherein the method comprises the following steps: analyzing the acquired data sent by the first acquisition proxy end to obtain first log configuration information used by the first acquisition proxy end when acquiring the running log of the target equipment; acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period; updating the first log configuration information to the second log configuration information if the first log configuration information is determined to be inconsistent with the second log configuration information; and sending the second log configuration information to the first acquisition proxy end so that the first acquisition proxy end acquires the running log of the target equipment according to the second log configuration information. By adopting the technical scheme, the problem of how to automatically update the log configuration information is solved.

Description

Log configuration information updating method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of log collection, and in particular, to a method and apparatus for updating log configuration information, a storage medium, and an electronic device.
Background
At present, when logs are collected, different log configuration information is usually required to be set for different devices due to different running services of the devices and different device types. In the prior art, log configuration information is manually set on each device, however, under the condition that the number of the devices is large, the efficiency of setting the log configuration information is too low, and the abnormal log acquisition condition can only be found by means of active fault reporting of the devices, so that the log acquisition rule can not be automatically updated according to the abnormal log acquisition condition.
Aiming at the problem of how to automatically update log configuration information in the related art, no effective solution is proposed at present.
Accordingly, there is a need for improvements in the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the application provides a method and a device for updating log configuration information, a storage medium and an electronic device, so as to at least solve the problem of how to automatically update the log configuration information.
According to an aspect of the embodiments of the present application, there is provided a method for updating log configuration information, including: analyzing the acquired data sent by the first acquisition proxy end to obtain first log configuration information used by the first acquisition proxy end when acquiring the running log of the target equipment; acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period; updating the first log configuration information to the second log configuration information if the first log configuration information is not consistent with the second log configuration information; and sending the second log configuration information to the first acquisition proxy end so that the first acquisition proxy end acquires the running log of the target equipment according to the second log configuration information.
In an exemplary embodiment, obtaining, from a database, second log configuration information corresponding to the first acquisition agent according to a first preset period, where the second log configuration information includes: determining the acquisition time of last acquiring the second log configuration information from the database; starting timing from the acquisition time to obtain a timing time period; acquiring a first port number corresponding to a first acquisition proxy set for the target device from the database under the condition that the timing time period is determined to be the same as the period time period in the first preset period; and under the condition that the second port number of the first acquisition proxy is consistent with the first port number, determining log configuration information corresponding to the first acquisition proxy as the second log configuration information.
In an exemplary embodiment, obtaining, from a database, second log configuration information corresponding to the first acquisition agent according to a first preset period, where the second log configuration information includes: determining the workload of the target equipment at the acquisition moment; under the condition that the difference value between the workload of the target equipment and the preset workload is smaller than a first preset value, acquiring second log configuration information corresponding to the first acquisition proxy end from a database according to the first preset period; and/or updating the first preset period to a second preset period under the condition that the difference value between the equipment workload and the preset workload is larger than the first preset value, wherein the period time period in the second preset period is smaller than the period time period of the first preset period.
In one exemplary embodiment, in a case where it is determined that the first log configuration information is inconsistent with the second log configuration information, updating the first log configuration information to the second log configuration information includes: determining a configuration type required by the operation log during acquisition; under the condition that the configuration type comprises acquisition of log capacity, acquiring a first capacity value corresponding to the log capacity from the first log configuration information and acquiring a second capacity value corresponding to the log capacity from the second log configuration information; in the event that it is determined that the first capacity value is not equal to the second capacity value, the first capacity value is modified to the second capacity value.
In one exemplary embodiment, in a case where it is determined that the first log configuration information is inconsistent with the second log configuration information, updating the first log configuration information to the second log configuration information includes: determining a configuration type required by the operation log during acquisition; under the condition that the configuration type comprises a log path, acquiring a first path name corresponding to the log path from the first log configuration information and acquiring a second path name corresponding to the log path from the second log configuration information; and modifying the first path name to the second path name under the condition that the first path name is not consistent with the second path name.
In one exemplary embodiment, in a case where it is determined that the first log configuration information is inconsistent with the second log configuration information, updating the first log configuration information to the second log configuration information includes: determining a configuration type required by the operation log during acquisition; acquiring a first acquisition file list of the first log configuration information and a second acquisition file list of the second log configuration information under the condition that the configuration type is determined to comprise the acquisition file list; deleting a first file name in the first collection file list from the first collection file list under the condition that the first file name does not exist in the second collection file list; and for a second file name in the second collection file list, under the condition that the second file name does not exist in the first collection file list, the second file name is newly added from the first collection file list.
In an exemplary embodiment, after the second log configuration information is sent to the first collecting agent, so that the first collecting agent collects the running log of the data management system according to the second log configuration information, the method further includes: acquiring log information acquired by the first acquisition proxy end for acquiring the running log of the target equipment; under the condition that abnormal information generated by acquisition failure exists in the log information, acquiring records corresponding to the abnormal information are determined from the log information, wherein the acquiring records at least comprise acquisition time of the abnormal information and acquisition paths of the abnormal information; and sending prompt information generated according to the acquisition record to a target object so as to prompt the target object to analyze the abnormal information based on the acquisition record.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for updating log configuration information, including: the analysis module is used for analyzing the acquired data sent by the first acquisition proxy end to obtain first log configuration information used by the first acquisition proxy end when acquiring the running log of the target equipment; the acquisition module is used for acquiring second log configuration information corresponding to the first acquisition agent terminal from the database according to a first preset period; an updating module, configured to update the first log configuration information to the second log configuration information if it is determined that the first log configuration information is inconsistent with the second log configuration information; and the sending module is used for sending the second log configuration information to the first acquisition proxy end so that the first acquisition proxy end can acquire the running log of the target equipment according to the second log configuration information.
According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described method of updating log configuration information at runtime.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for updating the log configuration information by using the computer program.
According to the method and the device, the first log configuration information of the target equipment can be obtained by analyzing the acquired data of the acquisition agent end, and then compared with the second log configuration information obtained from the database according to the preset period, and the first log configuration information is updated into the second log configuration information to be used for acquiring the running log of the target equipment under the condition that the first log configuration information is inconsistent with the second log configuration information. By adopting the technical scheme, the problem of how to automatically update the log configuration information is solved, and the effect of automatically updating the log configuration information can be further realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
Fig. 1 is a hardware configuration block diagram of a computer terminal that performs an updating method of log configuration information of an embodiment of the present application;
FIG. 2 is a flow chart of a method of updating log configuration information according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a method of updating log configuration information according to an embodiment of the present application;
fig. 4 is a block diagram of a configuration of an update apparatus of log configuration information according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms and "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal or similar computing device. Taking the example of running on a computer terminal, fig. 1 is a block diagram of the hardware structure of the computer terminal for executing the method for updating the log configuration information according to the embodiment of the present application. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1), which processor 102 may include, but is not limited to, a microprocessor (Microprocessor Unit, abbreviated MPU) or programmable logic device (Programmable logic device, abbreviated PLD) and a memory 104 configured to store data, and in one exemplary embodiment, a transmission device 106 configured to communicate with an input/output device 108.
The memory 104 may be configured to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for updating log configuration information in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the above-described method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module configured to communicate wirelessly with the internet.
In this embodiment, there is provided a method for updating log configuration information, and fig. 2 is a flowchart of a method for updating log configuration information according to an embodiment of the present application, where the flowchart includes the following steps:
step S202, analyzing the acquired data sent by a first acquisition proxy to obtain first log configuration information used by the first acquisition proxy when acquiring the running log of the target equipment;
in step S202, the collected data sent by the first collecting agent includes log configuration information and collected log information.
Step S204, obtaining second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period;
The database in step S204 is configured to store log configuration information of a plurality of collecting agent ends, where the collecting agent ends are configured to collect device logs according to the log configuration information.
Step S206, updating the first log configuration information into the second log configuration information when the first log configuration information is not consistent with the second log configuration information;
step S208, the second log configuration information is sent to the first collection agent end, so that the first collection agent end collects the running log of the target device according to the second log configuration information.
Optionally, in the step S208, the second log configuration information may be sent to the first collecting agent by: determining an update list of log configuration information, wherein the update list at least comprises second log configuration information; acquiring a third port number of log configuration information aiming at any log configuration information in the update list; and sending the log configuration information to the second collection agent terminal under the condition that the fourth port number of the second collection agent terminal is consistent with the third port number.
Through the steps, the first log configuration information used when the first collection agent terminal collects the running log of the target equipment is obtained by analyzing the collection data sent by the first collection agent terminal; acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period; updating the first log configuration information to the second log configuration information if the first log configuration information is not consistent with the second log configuration information; the second log configuration information is sent to the first collection agent end, so that the first collection agent end collects the running log of the target equipment according to the second log configuration information, the problem of how to automatically update the log configuration information is solved, and the effect of automatically updating the log configuration information can be achieved.
In an exemplary embodiment, for the implementation process of step S204, the obtaining, from the database, the second log configuration information corresponding to the first collection agent according to the first preset period, specifically includes: determining the acquisition time of last acquiring the second log configuration information from the database; starting timing from the acquisition time to obtain a timing time period; acquiring a first port number corresponding to a first acquisition proxy set for the target device from the database under the condition that the timing time period is determined to be the same as the period time period in the first preset period; and under the condition that the second port number of the first acquisition proxy is consistent with the first port number, determining log configuration information corresponding to the first acquisition proxy as the second log configuration information.
Optionally, in the above embodiment, for example, the time of last obtaining the second log configuration information from the database is 10:00, and the preset period is 2 hours, where the second log configuration information is obtained from the database at 12:00 next time. The log configuration information in the database is also configured with the corresponding relation between the port number of the acquisition agent end and the equipment.
In an exemplary embodiment, for the implementation process of step S204, the obtaining, from the database, the second log configuration information corresponding to the first collection agent according to the first preset period, further includes: determining the workload of the target equipment at the acquisition moment; under the condition that the difference value between the workload of the target equipment and the preset workload is smaller than a first preset value, acquiring second log configuration information corresponding to the first acquisition proxy end from a database according to the first preset period; and/or updating the first preset period to a second preset period under the condition that the difference value between the equipment workload and the preset workload is larger than the first preset value, wherein the period time period in the second preset period is smaller than the period time period of the first preset period.
Alternatively, in the above embodiment, for example, the more services the target device operates, the larger the workload, and the more running logs the device generates, so it is required to detect whether the log configuration information changes more frequently, so the shorter the period of acquiring the log configuration information from the database.
In an exemplary embodiment, the implementation process for updating the first log configuration information to the second log configuration information in the case that it is determined that the first log configuration information is inconsistent with the second log configuration information in the step S206 includes: determining a configuration type required by the operation log during acquisition; under the condition that the configuration type comprises acquisition of log capacity, acquiring a first capacity value corresponding to the log capacity from the first log configuration information and acquiring a second capacity value corresponding to the log capacity from the second log configuration information; in the event that it is determined that the first capacity value is not equal to the second capacity value, the first capacity value is modified to the second capacity value.
It should be noted that, in the above embodiment, the log capacity is used to limit the size of the log collection file, so as to prevent that other log information cannot be collected normally due to an excessively large single log file.
In an exemplary embodiment, for the step S206, in a case where it is determined that the first log configuration information is inconsistent with the second log configuration information, the implementation process of updating the first log configuration information to the second log configuration information further includes: determining a configuration type required by the operation log during acquisition; under the condition that the configuration type comprises a log path, acquiring a first path name corresponding to the log path from the first log configuration information and acquiring a second path name corresponding to the log path from the second log configuration information; and modifying the first path name to the second path name under the condition that the first path name is not consistent with the second path name.
In an exemplary embodiment, for the step S206, in a case where it is determined that the first log configuration information is inconsistent with the second log configuration information, the implementation process of updating the first log configuration information to the second log configuration information further includes: determining a configuration type required by the operation log during acquisition; acquiring a first acquisition file list of the first log configuration information and a second acquisition file list of the second log configuration information under the condition that the configuration type is determined to comprise the acquisition file list; deleting a first file name in the first collection file list from the first collection file list under the condition that the first file name does not exist in the second collection file list; and for a second file name in the second collection file list, under the condition that the second file name does not exist in the first collection file list, the second file name is newly added from the first collection file list.
Optionally, in the above embodiment, the collected file list includes a plurality of files, different files are used for storing different log information, and the log information may be classified and stored by using a specific file name.
In an exemplary embodiment, after performing the step S208 above to send the second log configuration information to the first collecting agent, so that the first collecting agent collects the running log of the data management system according to the second log configuration information, the method further includes: acquiring log information acquired by the first acquisition proxy end for acquiring the running log of the target equipment; under the condition that abnormal information generated by acquisition failure exists in the log information, acquiring records corresponding to the abnormal information are determined from the log information, wherein the acquiring records at least comprise acquisition time of the abnormal information and acquisition paths of the abnormal information; and sending prompt information generated according to the acquisition record to a target object so as to prompt the target object to analyze the abnormal information based on the acquisition record.
It should be noted that, in the above embodiment, the abnormal information generated by the acquisition failure is not an error log generated by the abnormal operation of the device, and the log acquisition can still continue to record the device log when the device is in operation, and the acquisition failure represents that the device log cannot be recorded, so that the target object needs to be prompted to analyze the abnormal information.
It will be apparent that the embodiments described above are only some, but not all, of the embodiments of the present application. In order to better understand the method for updating the log configuration information, the following description will explain the above process with reference to the embodiments, but is not limited to the technical solutions of the embodiments of the present application, specifically:
in an alternative embodiment, the method for updating the log configuration information of the present application is further described with reference to fig. 3. As shown in fig. 3: the configuration management database (corresponding to the database) CMDB (Configuration Management Database) is used for storing log collection rules (i.e. log configuration information) of the agents at the plurality of collection agents, and the log collection management device synchronizes the latest log collection rule a (corresponding to the second log configuration information) at one collection Agent from the CMDB according to a preset period through a timing task, then compares and marks the running log collection rule B (corresponding to the first log configuration information) obtained from the collection Agent, and then marks the log collection rule a and the log collection rule B. The function of the log configuration information updating device can also be realized by the log collection management and control device in the embodiment.
Alternatively, for example, the log collection rule a is:
device name: yntest0001ap;
log file path: the/home/ap/sa/log/;
list of log files: test_install. Log, test_add. Log;
log capacity: 52106KB.
The log acquisition rule B is as follows:
device name: yntest0001ap;
log file path: the/home/ap/sa/log/;
list of log files: test_install.log;
log capacity: 45102KB.
The log collection management and control device can determine through comparing the log collection rule A with the log collection rule B, the latest log collection rule A expands the log capacity from 45102KB (namely a first capacity value) to 52106KB (namely a second capacity value) on the basis of the currently running log collection rule B, and a file name is newly added in a file list. Aiming at each collecting agent end of the collecting agent ends, the log collecting management and control device can determine the update condition of the log collecting rules through the mode, and then the updated log collecting rules of the collecting agent ends are issued to each collecting agent end in batches, wherein the collecting agent ends without updated items of the log collecting rules do not need to issue the log collecting rules for updating.
The acquisition agent terminal acquires the running log of the equipment according to the updated log acquisition rule after receiving the updated log acquisition rule, then sends the acquired log information to the log acquisition management and control device, and when the log acquisition management and control device detects abnormal information generated by acquisition failure in the log information, the target object is promoted to adjust the log acquisition rule, optionally, a standby log acquisition rule can be set in the database, and when the acquisition failure occurs, the log acquisition management and control device acquires the standby log acquisition rule from the database and transmits the standby log acquisition rule to the acquisition agent terminal for log acquisition.
By the method for updating the log configuration information, the log acquisition rules of the acquisition agent terminals can be automatically and periodically updated, the log acquisition rules can be issued in batches to the plurality of acquisition agent terminals, the abnormal acquisition condition can be timely processed, and the log configuration and log acquisition efficiency is improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
The embodiment also provides a device for updating log configuration information, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
Fig. 4 is a block diagram of a log configuration information updating apparatus according to an embodiment of the present application, the apparatus including:
the parsing module 42 is configured to parse the collected data sent by the first collecting agent to obtain first log configuration information used when the first collecting agent collects the running log of the target device;
the obtaining module 44 is configured to obtain, from a database, second log configuration information corresponding to the first collection agent according to a first preset period;
an updating module 46, configured to update the first log configuration information to the second log configuration information if it is determined that the first log configuration information is inconsistent with the second log configuration information;
And the sending module 48 is configured to send the second log configuration information to the first collecting agent, so that the first collecting agent collects the running log of the target device according to the second log configuration information.
Analyzing the acquired data sent by the first acquisition proxy through the updating device of the log configuration information of the embodiment of the application to obtain first log configuration information used by the first acquisition proxy when acquiring the running log of the target equipment; acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period; updating the first log configuration information to the second log configuration information if the first log configuration information is not consistent with the second log configuration information; and sending the second log configuration information to the first acquisition proxy end so that the first acquisition proxy end acquires the running log of the target equipment according to the second log configuration information. The problem of how to automatically update the log configuration information is solved, and the effect of automatically updating the log configuration information can be achieved.
In one exemplary embodiment, the acquisition module 44 is further configured to: determining the acquisition time of last acquiring the second log configuration information from the database; starting timing from the acquisition time to obtain a timing time period; acquiring a first port number corresponding to a first acquisition proxy set for the target device from the database under the condition that the timing time period is determined to be the same as the period time period in the first preset period; and under the condition that the second port number of the first acquisition proxy is consistent with the first port number, determining log configuration information corresponding to the first acquisition proxy as the second log configuration information.
In one exemplary embodiment, the acquisition module 44 is further configured to: determining the workload of the target equipment at the acquisition moment; under the condition that the difference value between the workload of the target equipment and the preset workload is smaller than a first preset value, acquiring second log configuration information corresponding to the first acquisition proxy end from a database according to the first preset period; and/or updating the first preset period to a second preset period under the condition that the difference value between the equipment workload and the preset workload is larger than the first preset value, wherein the period time period in the second preset period is smaller than the period time period of the first preset period.
In one exemplary embodiment, the update module 46 is further configured to: determining a configuration type required by the operation log during acquisition; under the condition that the configuration type comprises acquisition of log capacity, acquiring a first capacity value corresponding to the log capacity from the first log configuration information and acquiring a second capacity value corresponding to the log capacity from the second log configuration information; in the event that it is determined that the first capacity value is not equal to the second capacity value, the first capacity value is modified to the second capacity value.
In one exemplary embodiment, the update module 46 is further configured to: determining a configuration type required by the operation log during acquisition; under the condition that the configuration type comprises a log path, acquiring a first path name corresponding to the log path from the first log configuration information and acquiring a second path name corresponding to the log path from the second log configuration information; and modifying the first path name to the second path name under the condition that the first path name is not consistent with the second path name.
In one exemplary embodiment, the update module 46 is further configured to: determining a configuration type required by the operation log during acquisition; acquiring a first acquisition file list of the first log configuration information and a second acquisition file list of the second log configuration information under the condition that the configuration type is determined to comprise the acquisition file list; deleting a first file name in the first collection file list from the first collection file list under the condition that the first file name does not exist in the second collection file list; and for a second file name in the second collection file list, under the condition that the second file name does not exist in the first collection file list, the second file name is newly added from the first collection file list.
In an exemplary embodiment, the sending module 48 is further configured to: acquiring log information acquired by the first acquisition proxy end for acquiring the running log of the target equipment; under the condition that abnormal information generated by acquisition failure exists in the log information, acquiring records corresponding to the abnormal information are determined from the log information, wherein the acquiring records at least comprise acquisition time of the abnormal information and acquisition paths of the abnormal information; and sending prompt information generated according to the acquisition record to a target object so as to prompt the target object to analyze the abnormal information based on the acquisition record.
The embodiment of the present application also provides a storage medium including a stored program, where any one of the embodiments described above is executed when the program is executed.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, analyzing acquisition data sent by a first acquisition proxy to obtain first log configuration information used by the first acquisition proxy for acquiring the running log of target equipment;
s2, acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period;
s3, updating the first log configuration information into the second log configuration information under the condition that the first log configuration information is inconsistent with the second log configuration information;
s4, the second log configuration information is sent to the first acquisition proxy end, so that the first acquisition proxy end acquires the running log of the target device according to the second log configuration information.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
Embodiments of the present application also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, analyzing acquisition data sent by a first acquisition proxy to obtain first log configuration information used by the first acquisition proxy for acquiring the running log of target equipment;
s2, acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period;
s3, updating the first log configuration information into the second log configuration information under the condition that the first log configuration information is inconsistent with the second log configuration information;
s4, the second log configuration information is sent to the first acquisition proxy end, so that the first acquisition proxy end acquires the running log of the target device according to the second log configuration information.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for updating log configuration information, comprising:
analyzing the acquired data sent by the first acquisition proxy end to obtain first log configuration information used by the first acquisition proxy end when acquiring the running log of the target equipment;
acquiring second log configuration information corresponding to the first acquisition agent terminal from a database according to a first preset period;
updating the first log configuration information to the second log configuration information if the first log configuration information is not consistent with the second log configuration information;
and sending the second log configuration information to the first acquisition proxy end so that the first acquisition proxy end acquires the running log of the target equipment according to the second log configuration information.
2. The method for updating log configuration information according to claim 1, wherein obtaining the second log configuration information corresponding to the first collection agent from the database according to the first preset period includes:
Determining the acquisition time of last acquiring the second log configuration information from the database;
starting timing from the acquisition time to obtain a timing time period;
acquiring a first port number corresponding to a first acquisition proxy set for the target device from the database under the condition that the timing time period is determined to be the same as the period time period in the first preset period;
and under the condition that the second port number of the first acquisition proxy is consistent with the first port number, determining log configuration information corresponding to the first acquisition proxy as the second log configuration information.
3. The method for updating log configuration information according to claim 2, wherein obtaining the second log configuration information corresponding to the first collection agent from the database according to the first preset period includes:
determining the workload of the target equipment at the acquisition moment;
under the condition that the difference value between the workload of the target equipment and the preset workload is smaller than a first preset value, acquiring second log configuration information corresponding to the first acquisition proxy end from a database according to the first preset period;
And/or updating the first preset period to a second preset period under the condition that the difference value between the equipment workload and the preset workload is larger than the first preset value, wherein the period time period in the second preset period is smaller than the period time period of the first preset period.
4. The method for updating log configuration information according to claim 1, wherein updating the first log configuration information to the second log configuration information in the case where it is determined that the first log configuration information is inconsistent with the second log configuration information, comprises:
determining a configuration type required by the operation log during acquisition;
under the condition that the configuration type comprises acquisition of log capacity, acquiring a first capacity value corresponding to the log capacity from the first log configuration information and acquiring a second capacity value corresponding to the log capacity from the second log configuration information;
in the event that it is determined that the first capacity value is not equal to the second capacity value, the first capacity value is modified to the second capacity value.
5. The method for updating log configuration information according to claim 1, wherein updating the first log configuration information to the second log configuration information in the case where it is determined that the first log configuration information is inconsistent with the second log configuration information, comprises:
Determining a configuration type required by the operation log during acquisition;
under the condition that the configuration type comprises a log path, acquiring a first path name corresponding to the log path from the first log configuration information and acquiring a second path name corresponding to the log path from the second log configuration information;
and modifying the first path name to the second path name under the condition that the first path name is not consistent with the second path name.
6. The method for updating log configuration information according to claim 1, wherein updating the first log configuration information to the second log configuration information in the case where it is determined that the first log configuration information is inconsistent with the second log configuration information, comprises:
determining a configuration type required by the operation log during acquisition;
acquiring a first acquisition file list of the first log configuration information and a second acquisition file list of the second log configuration information under the condition that the configuration type is determined to comprise the acquisition file list;
deleting a first file name in the first collection file list from the first collection file list under the condition that the first file name does not exist in the second collection file list;
And for a second file name in the second collection file list, under the condition that the second file name does not exist in the first collection file list, the second file name is newly added from the first collection file list.
7. The method for updating log configuration information according to claim 1, wherein after the second log configuration information is sent to the first collecting agent, so that the first collecting agent collects the operation log of the data management system according to the second log configuration information, the method further comprises:
acquiring log information acquired by the first acquisition proxy end for acquiring the running log of the target equipment;
under the condition that abnormal information generated by acquisition failure exists in the log information, acquiring records corresponding to the abnormal information are determined from the log information, wherein the acquiring records at least comprise acquisition time of the abnormal information and acquisition paths of the abnormal information;
and sending prompt information generated according to the acquisition record to a target object so as to prompt the target object to analyze the abnormal information based on the acquisition record.
8. An updating apparatus for log configuration information, comprising:
the analysis module is used for analyzing the acquired data sent by the first acquisition proxy end to obtain first log configuration information used by the first acquisition proxy end when acquiring the running log of the target equipment;
the acquisition module is used for acquiring second log configuration information corresponding to the first acquisition agent terminal from the database according to a first preset period;
an updating module, configured to update the first log configuration information to the second log configuration information if it is determined that the first log configuration information is inconsistent with the second log configuration information;
and the sending module is used for sending the second log configuration information to the first acquisition proxy end so that the first acquisition proxy end can acquire the running log of the target equipment according to the second log configuration information.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.
CN202410010155.7A 2024-01-03 2024-01-03 Log configuration information updating method and device, storage medium and electronic device Pending CN117873827A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410010155.7A CN117873827A (en) 2024-01-03 2024-01-03 Log configuration information updating method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410010155.7A CN117873827A (en) 2024-01-03 2024-01-03 Log configuration information updating method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117873827A true CN117873827A (en) 2024-04-12

Family

ID=90589727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410010155.7A Pending CN117873827A (en) 2024-01-03 2024-01-03 Log configuration information updating method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117873827A (en)

Similar Documents

Publication Publication Date Title
US20220075679A1 (en) Log analysis in vector space
CN107704360B (en) Monitoring data processing method, equipment, server and storage medium
CN112434039A (en) Data storage method, device, storage medium and electronic device
CN112783725B (en) Index collection method and device
CN111367760B (en) Log collection method and device, computer equipment and storage medium
CN111104260A (en) Service upgrade monitoring method, device, server and storage medium
CN110795264A (en) Monitoring management method and system and intelligent management terminal
CN111736938A (en) Information display method and device, storage medium and electronic device
CN112422369B (en) Method and device for determining offline time, storage medium and electronic device
CN117873827A (en) Log configuration information updating method and device, storage medium and electronic device
CN110578989B (en) Debugging method and device of air conditioner, air conditioner and storage medium
CN112650815B (en) Method and device for synchronizing environment data, storage medium and electronic device
CN112395155A (en) Service monitoring method and device, storage medium and electronic device
CN114281250A (en) Method and device for cleaning storage file, storage medium and electronic device
CN114791835A (en) Program restarting method and device, storage medium and electronic device
CN114691443A (en) Cross section data sending method and device, electronic equipment and storage medium
CN112597532A (en) Monitoring method and device for sensitive data access
CN111274219A (en) Data storage method and device, storage medium and electronic device
CN112769889B (en) Service data pushing method and device, storage medium and electronic device
CN113434135B (en) Method and device for determining call repeatability of interface, storage medium and electronic device
CN115734204A (en) Data updating method and device, storage medium and electronic device
EP4336883A1 (en) Modeling method, network element data processing method and apparatus, electronic device, and medium
CN117421177A (en) Method and device for monitoring running state of server
CN114911636A (en) Method and device for monitoring circulation of interactive data, storage medium and electronic device
CN116126915A (en) Intelligent gateway data storage deployment method, device, equipment and medium

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