CN108959468A - A kind of monitoring method of data base directory, storage medium and server - Google Patents

A kind of monitoring method of data base directory, storage medium and server Download PDF

Info

Publication number
CN108959468A
CN108959468A CN201810634316.4A CN201810634316A CN108959468A CN 108959468 A CN108959468 A CN 108959468A CN 201810634316 A CN201810634316 A CN 201810634316A CN 108959468 A CN108959468 A CN 108959468A
Authority
CN
China
Prior art keywords
alarm
directory
data base
time
monitored
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.)
Granted
Application number
CN201810634316.4A
Other languages
Chinese (zh)
Other versions
CN108959468B (en
Inventor
孙泽祥
梁海安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810634316.4A priority Critical patent/CN108959468B/en
Priority to PCT/CN2018/105531 priority patent/WO2019242123A1/en
Publication of CN108959468A publication Critical patent/CN108959468A/en
Application granted granted Critical
Publication of CN108959468B publication Critical patent/CN108959468B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to fields of communication technology, propose monitoring method, storage medium and the server of a kind of data base directory.The monitoring method of the data base directory includes: the data dictionary information of access target database;Data base directory to be monitored is determined according to the data dictionary information of access;The directory information of the data base directory is obtained using preset script file;The monitored item of data base directory is constructed according to the directory information;The monitored item is sent to zabbix server, so that the zabbix server is monitored the data base directory.The data dictionary information that the above process passes through access database, it can determine the directory information of data base directory to be monitored, then monitored item can be constructed automatically according to the directory information, and the monitored item built is sent to zabbix server and is monitored, compared with the method for traditional manual definition monitored item, operating efficiency is effectively increased.

Description

A kind of monitoring method of data base directory, storage medium and server
Technical field
The present invention relates to field of communication technology more particularly to a kind of monitoring methods of data base directory, storage medium kimonos Business device.
Background technique
Data base directory is the place of database server storage data file, does not comprise only the file of pass table, also wraps Include data file and server option file etc..Currently, generalling use the database monitorings product such as zabbix to data base directory It is monitored.However, user needs to define monitored item in zabbix manually, the prison to one or more data base directories is realized Control, operating efficiency are lower.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of monitoring method of data base directory, storage medium and server, Aim to solve the problem that the problem that operating efficiency is low when being monitored to data base directory.
The embodiment of the present invention in a first aspect, providing a kind of monitoring method of data base directory, comprising:
The data dictionary information of access target database, the data dictionary information are the readable of database of record metadata Information;
Data base directory to be monitored is determined according to the data dictionary information of access;
The directory information of the data base directory is obtained using preset script file;
The monitored item of data base directory is constructed according to the directory information;
The monitored item is sent to zabbix server so that the zabbix server to the data base directory into Row monitoring.
The second aspect of the embodiment of the present invention, provides a kind of computer readable storage medium, described computer-readable to deposit Storage media is stored with computer-readable instruction, and such as the embodiment of the present invention is realized when the computer-readable instruction is executed by processor First aspect propose data base directory monitoring method the step of.
The third aspect of the embodiment of the present invention, provides a kind of server, including memory, processor and is stored in institute The computer-readable instruction that can be run in memory and on the processor is stated, the processor executes described computer-readable Following steps are realized when instruction:
The data dictionary information of access target database, the data dictionary information are the readable of database of record metadata Information;
Data base directory to be monitored is determined according to the data dictionary information of access;
The directory information of the data base directory is obtained using preset script file;
The monitored item of data base directory is constructed according to the directory information;
The monitored item is sent to zabbix server so that the zabbix server to the data base directory into Row monitoring.
The monitoring method for the data base directory that the embodiment of the present invention proposes includes: the data dictionary letter of access target database Breath;Data base directory to be monitored is determined according to the data dictionary information of access;The number is obtained using preset script file According to the directory information of library directory;The monitored item of data base directory is constructed according to the directory information;The monitored item is sent to Zabbix server, so that the zabbix server is monitored the data base directory.The above process passes through access number According to the data dictionary information in library, the directory information of data base directory to be monitored can determine, it then can be according to the directory information Automatic building monitored item, and the monitored item built is sent to zabbix server and is monitored, with traditional manual definition The method of monitored item is compared, and operating efficiency is effectively increased.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is a kind of process of one embodiment of the monitoring method of data base directory provided in an embodiment of the present invention Figure;
Fig. 2 is a kind of process of second embodiment of the monitoring method of data base directory provided in an embodiment of the present invention Figure;
Fig. 3 is a kind of structure chart of one embodiment of the monitoring device of data base directory provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of monitoring method of data base directory, storage medium and servers, it is intended to solve Operating efficiency low problem when being monitored to data base directory.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention Range.
Referring to Fig. 1, one embodiment of the monitoring method of data base directory includes:
101, the data dictionary information of access target database;
Target database is the database for needing to monitor, and data dictionary information is the readable letter of database of record metadata Breath, such as the system view that database provides, can obtain the metadata information of database by these views, for example database Table space, the information such as database physical file path.Corresponding data access command can be constructed, to the data of target database Dictionary information accesses.
Specifically, step 101 may include:
(1) system information of terminal device is obtained using preset script file;
(2) corresponding data access command is constructed according to the system information;
(3) using the data dictionary information of the data access command access target database.
For above-mentioned steps (1), the system information of terminal device is obtained using preset script file.For example, can make The system information of terminal is obtained with standardized shell or python script, the system information got may include aix, Sun, hp-ux or linux etc..
For above-mentioned steps (2), corresponding data access command is constructed according to the system information.For different systems For, the form of the data access command of use is also different, it is therefore desirable to which it is suitable to be constructed according to specific system information Data access command.
For above-mentioned steps (3), using the data dictionary information of the data access command access target database, here Data access command be and the matched instruction of terminal system.
102, data base directory to be monitored is determined according to the data dictionary information of access;
After the data dictionary information of access target database, determined according to the data dictionary information of access to be monitored Data base directory.By accessing data dictionary information, the metadata information of available target database is believed by the metadata Breath can determine the information such as the store path of table space, each physical file that target database has, and then can determine mesh The data base directory that mark database has.In practical applications, all catalogues that available target database has, are then adopted Duplicate removal is carried out to these catalogues with sql command, to obtain data base directory to be monitored.
103, the directory information of the data base directory is obtained using preset script file;
After determining the data base directory that needs monitor, the data base directory is obtained using preset script file Directory information.Specifically, the catalogue letter that standardized shell or python script obtains the data base directory can be used Breath.In the script, it can execute corresponding order according to specific host platform system and obtain the remaining sky of directory size, catalogue Between, the directory informations such as catalogue utilization rate.
104, the monitored item of data base directory is constructed according to the directory information;
After obtaining directory information, the monitored item of data base directory is constructed according to the directory information.
Further, step 104 may include:
(1) predefined universal monitor item is obtained, the universal monitor item includes general directory name;
(2) directory name to be monitored is extracted from the directory information;
(3) directory name general in the universal monitor item is replaced with into the directory name extracted, obtains the number According to the monitored item of library directory.
Predefined universal monitor item is obtained, the universal monitor item includes general directory name.For example, Oracle.asm.size [{ #PATH_NAME }, used_pct] indicates the universal monitor item for being used for monitored directory utilization rate, Oracle.asm.size is the name identification of monitored item, and { #PATH_NAME } is variable, represents general directory name, used_ Pct indicates catalogue utilization rate, is a monitoring attributes of catalogue.The directory name for needing to monitor is extracted, with the catalogue extracted Title, which replaces { #PATH_NAME } in the monitored item, can be obtained the monitored item built.
For example, the catalogue utilization rate monitored item constructed according to the universal monitor item are as follows: " oracle.asm.size [/ Paic/app/oracle/rdbms, used-pct] " 35.46.
Wherein ,/paic/app/oracle/rdbms indicates the catalogue of monitoring, and 35.46 indicate the occurrence of the monitored item, I.e. catalogue utilization rate is 35.46%, which can be from the directory information Middle acquisition.
105, the monitored item is sent to zabbix server, so that the zabbix server is to the database mesh Record is monitored.
After building the monitored item of data base directory, these monitored item are sent to zabbix server, by Zabbix server is monitored these monitored item, namely is monitored to the data base directory of target database.
The monitoring method for the data base directory that the embodiment of the present invention proposes includes: the data dictionary letter of access target database Breath;Data base directory to be monitored is determined according to the data dictionary information of access;The number is obtained using preset script file According to the directory information of library directory;The monitored item of data base directory is constructed according to the directory information;The monitored item is sent to Zabbix server, so that the zabbix server is monitored the data base directory.The above process passes through access number According to the data dictionary information in library, the directory information of data base directory to be monitored can determine, it then can be according to the directory information Automatic building monitored item, and the monitored item built is sent to zabbix server and is monitored, with traditional manual definition The method of monitored item is compared, and operating efficiency is effectively increased.
Referring to Fig. 2, a kind of second embodiment of the monitoring method of data base directory includes: in the embodiment of the present invention
201, the data dictionary information of access target database;
202, data base directory to be monitored is determined according to the data dictionary information of access;
203, the directory information of the data base directory is obtained using preset script file;
204, the monitored item of data base directory is constructed according to the directory information;
205, the monitored item is sent to zabbix server;
Step 201-205 is identical as step 101-105, specifically can refer to the related description of step 101-105.
206, the monitored item to receive constructs corresponding alarm threshold value;
Zabbix server can construct corresponding alarm threshold value after receiving monitored item for these monitored item.Than It such as, can be with for catalogue utilization rate monitored item oracle.asm.size [/paic/app/oracle/rdbms, used_pct] One alarm threshold value 80 is set, also even monitors that catalogue utilization rate is more than 80%, then can trigger alert event.
Furthermore it is also possible to using the drawing function of zabbix server itself, on time to all collection values of the monitored item Between sequence draw, graphically can intuitively show the monitored item in the value and variation tendency of various time points.
If the value for 207, monitoring the monitored item is more than the alarm threshold value, preset warning message is generated;
208, it after generating preset warning message, is constructed according to the warning message and sends alarm mail.
Zabbix server is monitored the value of each monitored item, if monitoring, the value of some monitored item is more than setting Alarm threshold value then generates preset warning message, which generally may include title (such as the XX catalogue of object of alarming Monitored item), the information such as time of fire alarming and warning level.After generating preset warning message, mail alarm journey can be called Sequence constructs according to the warning message and sends alarm mail, to notify related personnel to pay attention to.
However, whithin a period of time, the phenomenon that superthreshold may repeatedly occur in some monitored item, and if every appearance is primary super Threshold value just sends an envelope alarm mail, and unnecessary bother can be brought to related personnel.Therefore, in order to avoid frequently sending alarm The name for object of alarming can be referred to as warning message by mail, and after generating preset warning message, according to the alarm Information architecture and before sending alarm mail, takes following methods to be handled:
(1) it is inquired in preset alarm logging table according to the title of the alarm object with the presence or absence of the alarm object Alarm logging;
(2) if it does not exist it is described alarm object alarm logging, then be the alarm object building alarm logging, then hold The step of row constructs according to the warning message and sends alarm mail.
Specifically, an alarm logging table can be set in PostgreSQL database, warning message of every generation, It is inquired in alarm logging table according to the title of alarm object with the presence or absence of corresponding alarm logging first;Alarm note if it does not exist Record, then show that the alert event is to alarm for the first time, generate corresponding alarm logging at this time, be stored in the alarm logging table, so It is constructed afterwards according to the warning message and sends alarm mail.Alarm logging if it exists, then it is first for showing the alert event not Alarm, relevant alarm mail have been sent, and can be not repeated to send alarm mail at this time.
Further, the alarm logging includes alarm object oriented, alarm times, alarm mail sending time and note Renewal time is recorded, the method can also include:
(3) if it exists it is described alarm object alarm logging, then judge between current time and the record renewal time Interval whether be greater than the first duration;
(4) if the interval between current time and the record renewal time is greater than the first duration, the alarm is updated It number, alarm mail sending time and record renewal time, then executes and alert postal of concurrently delivering newspaper is constructed according to the warning message The step of part;
(5) if the interval between current time and the record renewal time is less than or equal to first duration, sentence Whether the interval between the alarm mail sending time of breaking and the record renewal time is greater than the second duration;If the alarm Interval between post time and the record renewal time is less than or equal to the second duration, then updates the alarm times With the step of recording renewal time, then returning to the value for monitoring the monitored item;If the alarm mail sending time and described The interval recorded between renewal time is greater than the second duration, then updates the alarm times, alarm mail sending time and record Then renewal time executes the step of constructing according to the warning message and send alarm mail.
In alarm logging, include alarm object oriented, alarm times, alarm mail sending time and record renewal time Etc. multiple data, alarm times refer to that the alarm object generates the number of warning message, and alarm mail sending time refers to last hair The time of alarm mail is sent, record renewal time refers to the last time for updating alarm logging.In the alarm of some alarm object When record creation, alarm times are recorded as 1 time, and alarm mail sending time and record renewal time can recorde and be for current It unites the time.If judging that current time and the record update there are the alarm logging of the alarm object in alarm logging table Whether the interval between the time is greater than the first duration;If between the record renewal time in current time and alarm logging table Every being greater than the first duration (such as 2 minutes), show that the last alarm of current time distance has had been subjected to one section of longer time, this When can retransmit an alarm mail, therefore update the alarm times in alarm logging, alarm mail sending time and record more The new time, alarm times are specially added 1, when being updated with current system time replacement alarm mail sending time and record Between, it is then constructed according to warning message and sends alarm mail.
If the interval between current time and the record renewal time is less than or equal to first duration, show current Time gap last time time of fire alarming soon, when further judging that the alarm mail sending time and the record update at this time Between between interval whether be greater than the second duration (such as 5 minutes), i.e. judgement last time and upper one for sending alarm mail Whether it is separated by certain duration between the secondary time for generating warning message;If the alarm mail sending time and the record are more Interval between the new time is less than or equal to the second duration, shows that the last alarm mail that sends of current time distance is not grown, this Shi Bubi repeats to send alarm mail, therefore only updates the alarm times and record renewal time, specially adds alarm times 1, the step of being recorded renewal time with current system time replacement, then returned to the value of monitoring item.If the alarm postal Interval between part sending time and the record renewal time is greater than the second duration, shows that current time distance is last and sends Alarm mail has had been subjected to one section of longer time, can retransmit an alarm mail at this time, therefore update in alarm logging Alarm times, alarm mail sending time and record renewal time, alert postal of concurrently delivering newspaper then is constructed according to the warning message Part.
Further, if the interval between the alarm mail sending time and the record renewal time is greater than second Duration is then updating the alarm times, alarm mail sending time and before record renewal time, can also include:
If the interval between the alarm mail sending time and the record renewal time is less than third duration and described Less than first time number of alarm times then executes and updates the alarm times, alarm mail sending time and record renewal time Step, the third duration are greater than second duration;
If the interval between the alarm mail sending time and the record renewal time is greater than third duration and described Less than second time number of alarm times then executes and updates the alarm times, alarm mail sending time and record renewal time Step, second number are greater than first number;
If the alarm times are greater than second number, the alarm times and record renewal time are updated, then The step of returning to the value for monitoring the monitored item.
Be illustrated below: assuming that second when is 5 minutes a length of, when third, is 1 hour a length of, and first number is 6 times, second Number is 60 times, if the interval between the alarm mail sending time and the record renewal time is greater than 5 minutes, at this time into one Step judges the interval whether less than 1 hour and whether the alarm times are less than 6 times, if then updating the alarm times, report Alert post time and record renewal time, then send alarm mail;Otherwise can continue to judge whether the interval is greater than 1 Hour and the alarm times whether less than 60 times, if then updating the alarm times, alarm mail sending time and record Then renewal time sends alarm mail.If alarm times already exceed 60 times, need not repeat to send alarm mail, at this time The step of updating the alarm times and record renewal time, then returning to the value for monitoring the monitored item.It is arranged in this way, The warning message that some monitored item persistently generates the 5th minute or so, can only be carried out for the 1st hour or so respectively for the first time The transmission of alarm mail, to avoid the frequent transmission of alarm mail.
The monitoring method for the data base directory that the embodiment of the present invention proposes includes: the data dictionary letter of access target database Breath;Data base directory to be monitored is determined according to the data dictionary information of access;The number is obtained using preset script file According to the directory information of library directory;The monitored item of data base directory is constructed according to the directory information;The monitored item is sent to Zabbix server;Monitored item to receive constructs corresponding alarm threshold value;If monitoring, the value of the monitored item is more than institute Alarm threshold value is stated, then generates preset warning message;After generating preset warning message, constructed according to the warning message And send alarm mail.Compared with one embodiment of the invention, the present embodiment is more than alarm in the value for monitoring monitored item After threshold value, warning message can be automatically generated and send alarm mail, handled in time convenient for related personnel.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
A kind of monitoring method of data base directory is essentially described above, a kind of monitoring of data base directory will be filled below It sets and is described in detail.
Referring to Fig. 3, a kind of one embodiment of the monitoring device of data base directory includes: in the embodiment of the present invention
Data dictionary info access module 301, for the data dictionary information of access target database, the data dictionary Information is the readable information of database of record metadata;
Data base directory determining module 302 determines database mesh to be monitored for the data dictionary information according to access Record;
Directory information obtains module 303, and the catalogue for being obtained the data base directory using preset script file is believed Breath;
Monitored item constructs module 304, for constructing the monitored item of data base directory according to the directory information;
Monitored item sending module 305, for the monitored item to be sent to zabbix server, so that the zabbix takes Business device is monitored the data base directory.
Further, the data dictionary info access module may include:
System information acquiring unit, for using preset script file to obtain the system information of terminal device;
Data access command construction unit, for constructing corresponding data access command according to the system information;
Data dictionary information access unit, for the data dictionary using the data access command access target database Information.
Further, the monitored item building module may include:
Universal monitor item acquiring unit, for obtaining predefined universal monitor item, the universal monitor item includes general Directory name;
Directory name extraction unit, for extracting directory name to be monitored from the directory information;
Directory name replacement unit, for directory name general in the universal monitor item to be replaced with the mesh extracted Title is recorded, the monitored item of the data base directory is obtained.
Further, the monitored item sending module may include:
Alarm threshold value construction unit, for the corresponding alarm threshold value of monitored item building to receive;
Warning message generates unit, if the value for monitoring the monitored item is more than the alarm threshold value, generates pre- If warning message;
Alarm mail transmission unit, for being constructed simultaneously according to the warning message after generating preset warning message Send alarm mail.
Further, the warning message includes the title of alarm object, and the monitored item sending module can also wrap It includes:
Alarm logging query unit, for being inquired in preset alarm logging table according to the title of the alarm object and being It is no that there are the alarm loggings of the alarm object;
Alarm logging construction unit is then the alarm object for the alarm logging of the alarm object if it does not exist Alarm logging is constructed, the step of constructing according to the warning message and send alarm mail is then executed.
Further, the alarm logging includes alarm object oriented, alarm times, alarm mail sending time and note Renewal time is recorded, the monitored item sending module can also include:
First judging unit then judges current time and the note for the alarm logging of the alarm object if it exists Whether the interval between record renewal time is greater than the first duration;
First alarm logging updating unit, if the interval between current time and the record renewal time is greater than the One duration then updates the alarm times, alarm mail sending time and record renewal time, then executes according to the alarm Information architecture and the step of send alarm mail;
Second judgment unit, if being less than or equal to for the interval between current time and the record renewal time described First duration, then when judging whether the interval between the alarm mail sending time and the record renewal time is greater than second It is long;If the interval between the alarm mail sending time and the record renewal time is less than or equal to the second duration, more The step of new alarm times and record renewal time, then return monitors the value of the monitored item;If the alarm mail Interval between sending time and the record renewal time is greater than the second duration, then updates the alarm times, alarm mail Sending time and record renewal time, then execute the step of constructing according to the warning message and send alarm mail.
Further, the monitored item sending module can also include:
First execution unit, if the interval between the alarm mail sending time and the record renewal time is small In less than first time number of third duration and the alarm times, then executes and update the alarm times, alarm mail sending time The step of with record renewal time, the third duration is greater than second duration;
Second execution unit, if the interval between the alarm mail sending time and the record renewal time is big In less than second time number of third duration and the alarm times, then executes and update the alarm times, alarm mail sending time The step of with record renewal time, second number is greater than first number;
Second alarm logging updating unit updates the report if being greater than second number for the alarm times The step of alert number and record renewal time, then return monitors the value of the monitored item.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer-readable recording medium storage has Computer-readable instruction realizes any one number indicated such as Fig. 1 or Fig. 2 when the computer-readable instruction is executed by processor According to library directory monitoring method the step of.
The embodiment of the present invention also provides a kind of server, including memory, processor and storage are in the memory And the computer-readable instruction that can be run on the processor, the processor are realized when executing the computer-readable instruction As Fig. 1 or Fig. 2 any one data base directory indicated monitoring method the step of.
Fig. 4 is the schematic diagram for the server that one embodiment of the invention provides.As shown in figure 4, the server 4 of the embodiment wraps It includes: processor 40, memory 41 and being stored in the computer that can be run in the memory 41 and on the processor 40 Readable instruction 42.The processor 40 realizes the monitoring of above-mentioned each data base directory when executing the computer-readable instruction 42 Step in embodiment of the method, such as step 101 shown in FIG. 1 is to 105.Alternatively, the processor 40 executes the computer The function of each module/unit in above-mentioned each Installation practice, such as module 301 to 305 shown in Fig. 3 are realized when readable instruction 42 Function.
Illustratively, the computer-readable instruction 42 can be divided into one or more module/units, one Or multiple module/units are stored in the memory 41, and are executed by the processor 40, to complete the present invention.Institute Stating one or more module/units can be the series of computation machine readable instruction section that can complete specific function, the instruction segment For describing implementation procedure of the computer-readable instruction 42 in the server 4.
The server 4 can be desktop PC, notebook, palm PC and cloud server etc. and calculate equipment. The server 4 may include, but be not limited only to, processor 40, memory 41.It will be understood by those skilled in the art that Fig. 4 is only It is the example of server 4, does not constitute the restriction to server 4, may include than illustrating more or fewer components or group Close certain components or different components, for example, the server 4 can also include input-output equipment, network access equipment, Bus etc..
The processor 40 can be central processing unit (CentraL Processing Unit, CPU), can also be Other general processors, digital signal processor (DigitaL SignaL Processor, DSP), specific integrated circuit (AppLication Specific Integrated Circuit, ASIC), ready-made programmable gate array (FieLd- ProgrammabLe Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 41 can be the internal storage unit of the server 4, such as the hard disk or memory of server 4. The memory 41 is also possible to the External memory equipment of the server 4, such as the plug-in type being equipped on the server 4 is hard Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure DigitaL, SD) card, flash card (FLash Card) etc..Further, the memory 41 can also both include the internal storage unit of the server 4 or wrap Include External memory equipment.The memory 41 is for storing needed for the computer-readable instruction and the server other Program and data.The memory 41 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnLy Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of monitoring method of data base directory characterized by comprising
The data dictionary information of access target database, the data dictionary information are the readable letter of database of record metadata Breath;
Data base directory to be monitored is determined according to the data dictionary information of access;
The directory information of the data base directory is obtained using preset script file;
The monitored item of data base directory is constructed according to the directory information;
The monitored item is sent to zabbix server, so that the zabbix server supervises the data base directory Control.
2. the monitoring method of data base directory according to claim 1, which is characterized in that the access target database Data dictionary information includes:
The system information of terminal device is obtained using preset script file;
Corresponding data access command is constructed according to the system information;
Using the data dictionary information of the data access command access target database.
3. the monitoring method of data base directory according to claim 1, which is characterized in that described according to the directory information Building data base directory monitored item include:
Predefined universal monitor item is obtained, the universal monitor item includes general directory name;
Directory name to be monitored is extracted from the directory information;
Directory name general in the universal monitor item is replaced with into the directory name extracted, obtains the data base directory Monitored item.
4. the monitoring method of data base directory according to any one of claim 1 to 3, which is characterized in that described Zabbix server is monitored the data base directory
Monitored item to receive constructs corresponding alarm threshold value;
If the value for monitoring the monitored item is more than the alarm threshold value, preset warning message is generated;
After generating preset warning message, is constructed according to the warning message and send alarm mail.
5. the monitoring method of data base directory according to claim 4, which is characterized in that the warning message includes alarm The title of object, after generating preset warning message, before constructing according to the warning message and send alarm mail, also Include:
The alarm with the presence or absence of the alarm object is inquired in preset alarm logging table according to the title of the alarm object Record;
The alarm logging of the alarm object if it does not exist, then construct alarm logging for the alarm object, then execute basis The step of warning message constructs and sends alarm mail.
6. the monitoring method of data base directory according to claim 5, which is characterized in that the alarm logging includes alarm Object oriented, alarm times, alarm mail sending time and record renewal time, the method also includes:
The alarm logging of the alarm object if it exists then judges that the interval between current time and the record renewal time is It is no to be greater than the first duration;
If the interval between current time and the record renewal time is greater than the first duration, the alarm times, report are updated Alert post time and record renewal time, then execute the step that alarm mail is constructed and sent according to the warning message Suddenly;
If the interval between current time and the record renewal time is less than or equal to first duration, the report is judged Whether the interval between alert post time and the record renewal time is greater than the second duration;If the alarm mail is sent Interval between time and the record renewal time is less than or equal to the second duration, then updates the alarm times and record more The step of new time, then return monitors the value of the monitored item;If the alarm mail sending time and the record update Interval between time is greater than the second duration, then updates the alarm times, alarm mail sending time and record renewal time, Then the step of constructing according to the warning message and send alarm mail is executed.
7. the monitoring method of data base directory according to claim 6, which is characterized in that if the alarm mail is sent Between interval between the record renewal time be greater than the second duration, then update the alarm times, alarm mail is sent Before time and record renewal time, further includes:
If the interval between the alarm mail sending time and the record renewal time is less than third duration and the alarm Less than first time number of number then executes the step of updating the alarm times, alarm mail sending time and record renewal time, The third duration is greater than second duration;
If the interval between the alarm mail sending time and the record renewal time is greater than third duration and the alarm Less than second time number of number then executes the step of updating the alarm times, alarm mail sending time and record renewal time, Second number is greater than first number;
If the alarm times are greater than second number, the alarm times and record renewal time are updated, are then returned The step of monitoring the value of the monitored item.
8. a kind of computer readable storage medium, the computer-readable recording medium storage has computer-readable instruction, special Sign is, the database as described in any one of claims 1 to 7 is realized when the computer-readable instruction is executed by processor The step of monitoring method of catalogue.
9. a kind of server, including memory, processor and storage can transport in the memory and on the processor Capable computer-readable instruction, which is characterized in that the processor realizes following steps when executing the computer-readable instruction:
The data dictionary information of access target database, the data dictionary information are the readable letter of database of record metadata Breath;
Data base directory to be monitored is determined according to the data dictionary information being accessed;
The directory information of the data base directory is obtained using preset script file;
The monitored item of data base directory is constructed according to the directory information;
The monitored item is sent to zabbix server, so that the zabbix server supervises the data base directory Control.
10. server according to claim 9, which is characterized in that described to construct database mesh according to the directory information The monitored item of record includes:
Predefined universal monitor item is obtained, the universal monitor item includes general directory name;
Directory name to be monitored is extracted from the directory information;
Directory name general in the universal monitor item is replaced with into the directory name extracted, obtains the data base directory Monitored item.
CN201810634316.4A 2018-06-20 2018-06-20 Monitoring method of database directory, storage medium and server Active CN108959468B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810634316.4A CN108959468B (en) 2018-06-20 2018-06-20 Monitoring method of database directory, storage medium and server
PCT/CN2018/105531 WO2019242123A1 (en) 2018-06-20 2018-09-13 Method for monitoring database directory, storage medium, terminal device and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810634316.4A CN108959468B (en) 2018-06-20 2018-06-20 Monitoring method of database directory, storage medium and server

Publications (2)

Publication Number Publication Date
CN108959468A true CN108959468A (en) 2018-12-07
CN108959468B CN108959468B (en) 2024-02-02

Family

ID=64491415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810634316.4A Active CN108959468B (en) 2018-06-20 2018-06-20 Monitoring method of database directory, storage medium and server

Country Status (2)

Country Link
CN (1) CN108959468B (en)
WO (1) WO2019242123A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783449A (en) * 2018-12-13 2019-05-21 深圳壹账通智能科技有限公司 Data query processing method, platform, system and readable storage medium storing program for executing
CN109857720A (en) * 2018-12-20 2019-06-07 中国平安人寿保险股份有限公司 Database table monitoring method, device, computer installation and readable storage medium storing program for executing

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843904A (en) * 2016-03-23 2016-08-10 江苏太湖云计算信息技术股份有限公司 Monitoring alarm system for database operation performance

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874755B1 (en) * 2013-07-31 2014-10-28 Splunk, Inc. Provisioning of cloud networks with services
CN103605722B (en) * 2013-11-15 2018-11-06 北京奇虎科技有限公司 Database monitoring method and device, equipment
CN105095496A (en) * 2015-08-24 2015-11-25 浪潮软件股份有限公司 Method for monitoring MYSQL table space through ZABBIX

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843904A (en) * 2016-03-23 2016-08-10 江苏太湖云计算信息技术股份有限公司 Monitoring alarm system for database operation performance

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HMLINUX: "zabbix自动发现oracle表空间并监控其使用率", pages 1 - 8 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783449A (en) * 2018-12-13 2019-05-21 深圳壹账通智能科技有限公司 Data query processing method, platform, system and readable storage medium storing program for executing
CN109857720A (en) * 2018-12-20 2019-06-07 中国平安人寿保险股份有限公司 Database table monitoring method, device, computer installation and readable storage medium storing program for executing
CN109857720B (en) * 2018-12-20 2024-02-02 中国平安人寿保险股份有限公司 Database table monitoring method, device, computer device and readable storage medium

Also Published As

Publication number Publication date
CN108959468B (en) 2024-02-02
WO2019242123A1 (en) 2019-12-26

Similar Documents

Publication Publication Date Title
CN109086182B (en) Automatic database alarming method and terminal equipment
CN105373541B (en) The processing method and system of the data operation request of database
CN103036956A (en) Filing system and implement method of distributed configured massive data
WO2022062185A1 (en) Warning information pushing method and system, intelligent terminal, and storage medium
CN109298835B (en) Data archiving processing method, device, equipment and storage medium of block chain
CN105468492A (en) SE(search engine)-based data monitoring method and system
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN109062936B (en) Data query method, computer readable storage medium and terminal equipment
CN109240876A (en) Example monitoring method, computer readable storage medium and terminal device
CN109947729B (en) Real-time data analysis method and device
CN106202416A (en) Table data write method and device, table data read method and device
CN107832475A (en) Deployment control method, deployment control engine and deployment control system
CN110389967A (en) Date storage method, device, server and storage medium
CN108959468A (en) A kind of monitoring method of data base directory, storage medium and server
CN114157679A (en) Cloud-native-based distributed application monitoring method, device, equipment and medium
US8700637B2 (en) Complex event processing engine
CN113886419A (en) SQL statement processing method and device, computer equipment and storage medium
CN113849362B (en) Business service platform management method, device and computer readable storage medium
CN110677271B (en) Big data alarm method, device, equipment and storage medium based on ELK
CN106549983B (en) Database access method, terminal and server
CN114518848B (en) Method, device, equipment and medium for processing stored data
CN113849520A (en) Intelligent identification method and device of abnormal SQL (structured query language), electronic equipment and storage medium
US9600358B1 (en) Scalable monitoring and error handling in multi-latency systems
CN111143328A (en) Agile business intelligent data construction method, system, equipment and storage medium
CN110515923B (en) Data migration method and system between distributed databases

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant