The content of the invention
It is an object of the invention to provide a kind of easy growth data acquisition system, specifically for the suitable extensively of IT operation and maintenance tools
With the characteristics of, be easy to extend, be easy to customize, can also improve efficiency and the accuracy of data loading.
Scheme is used by purpose to realize the present invention, easily extends mass data collection system:Include and externally enter
Storehouse information submits interface and database, has further included data storage controller, storage information caching, storage operational terminal management
Device, storage task buffer, storage terminal, storage information unloading file, configuration rule storehouse, error message unloading file;
Data storage controller:It is responsible for receiving, distributes and treat storage information, in start-up course, scans and load storage letter
Cease the storage information of unloading in unloading file;After data storage controller starts, the data in being cached according to storage information
Item number, the storage information during storage information is cached according to configuration rule converts in an optimal manner is packaged into storage task, and carries
Give storage operational terminal manager;In system shutdown procedures, data storage controller storage information is cached in do not divide
With storage information, the storage task for being rejected submission can also be included, is dumped in storage information unloading file;
Be put in storage operational terminal manager:It is responsible for reception, the distribution of storage task, after system start-up, is put in storage operational terminal
Manager receives the storage task of data storage controller submission, is then checked for affiliated storage terminal whether available free end
End, if there is non-occupied terminal, then carries out storage task point-score;If it is not, it also needs to check task buffer according to configuration rule
In task quantity whether reached maximum carrying quantity, when task maximum carrying quantity has been reached, further according to
Task unloading storage information unloading file is put in storage in part by the unloading strategy put in rule;When the affiliated storage of the controller is whole
When end is in low-load state, which should notify data storage controller, scan in storage information unloading file whether
There is the storage information be not put in storage of unloading;In the system shutdown procedures, which stops receiving new task
With distribution task to storage terminal, unappropriated storage task is to storage information unloading file in preservation task buffer.
Be put in storage terminal:The task that terminal receives manager distribution is put in storage, performs in-stockroom operation, in the process of implementation, if
It was found that the storage information of mistake, then filter the wrong storage information, and error message unloading file is dumped to, then proceeded to
Execution is not carried out the storage information finished, abnormal in the event of storing, such as IO, and database service is abnormal etc., then retracts all
Database manipulation, and the storage task that the storage terminal is carrying out is dumped in storage information unloading file.
Configuration rule storehouse:The configuration information of storage configuration rule including the optimal storage information number of every batch of, waits optimal information
Number maximum duration, maximum can carry number of tasks, storage mission failure number of retries, storage information unloading strategy, storage information and turn
File, error message unloading file are deposited, criterion is provided for system operation, is made under specific circumstances for all parts corresponding anti-
Foundation should be provided.
The operation principle of the present invention includes following key step:
1) configuration rule of storage method, is configured, the configuration to configuration rule includes setting:The optimal storage letter of every batch of
Breath number waits optimal information number maximum duration, maximum that can carry number of tasks, storage mission failure number of retries, storage information turn
Deposit strategy, storage information unloading file, error message unloading file;
2), log-on data storage control, in start-up course, data storage controller initializes storage information and delays first
Deposit, then scan storage information unloading file whether have the information be not put in storage, if so, then by these information be re-loaded into
In the information cache of storehouse, in case scheduling;
3), after data storage controller starts, storage information is treated in reception, in controller detection storage information caching whether
The information of storage in need, and judge whether the quantity of information has reached the optimal storage information number of default every batch of, if reached
Optimal number has been arrived, then has been divided into batch of data according to optimal number, is packaged into a storage task, submit to storage operational terminal
Manager;It if being not reaching to optimal number, is waited, is being waited in optimal information number maximum duration according to rule, if slow
It deposits middle number of data and reaches the optimal storage information number of every batch of, then distribute a storage task by optimal data item number, otherwise wait for
After by total data be encapsulated as a storage task, submit to storage operational terminal manager;
4), when storage operational terminal manager receives storage task, according to configuration rule, judge to be put in storage task buffer
Whether the task quantity in queue, which has had reached default maximum, can carry number of tasks, if it is not, the task is put into
Into storage task buffer;If number of tasks can be carried beyond maximum, turned according to the storage information set in configuration rule
Deposit strategy, directly the task is dumped in storage information unloading file and/or, random unloading storage task buffer in proportion
In partial task into storage information unloading file;
5), storage operational terminal manager is allocated storage task, first determines whether have in storage task buffer
Unappropriated task, if so, then judging whether the storage terminal belonging to the storage operational terminal manager is all within operation
In, if available free storage terminal, a task is taken out from storage task buffer, and gives free time storage terminal and holds
Row;If without idle storage terminal, wait until that storage terminal is released, reallocation storage task;
6), after idle storage terminal receives storage task, in-stockroom operation is immediately performed, if in implementation procedure
In, abnormal caused by storage information mistake, storage terminal can then filter the exception information, and continue to execute what is be not carried out
Storage information simultaneously dumps to the storage information of mistake in error message unloading file;If as network, data base administration system
It is abnormal caused by the reasons such as system, disk I/O, then it is put in storage terminal and certain amount or time is retried according to default configuration rule
In-stockroom operation, if being still unable to normal storage, all operations for the executed that retracts, and by the storage in the storage task
Information dumps to storage information unloading file;
7), when the storage terminal for being put in storage operational terminal manager administration is in low load condition, operational terminal pipe is put in storage
Data storage controller scanning storage information unloading file will be notified by managing device, check whether the storage information of unloading, if so,
Then these information are re-loaded in storage information caching, re-start scheduling;
8), when being put in storage in operational terminal manager closing process, storage operational terminal manager stops whole to storage work
Hold manager submit task, storage information caching in storage information, due to concurrent, refused by storage operational terminal manager
Exhausted task is dumped in storage information unloading file;Storage operational terminal manager stops receiving new task, stops to entering
Storehouse terminal distribution task dumps to all unallocated tasks in task buffer in storage information unloading file;Each storage
Terminal stopping receives an assignment, but continues to execute unfinished task, pending to finish, and exits working condition.
Using the collection scheduling device of this scheme, scheduling pipe is added to mass data storage process compared with the prior art
Reason can significantly improve and improve the scalability of system, be changed with adapting to different monitored systems and its scale, system can
Autgmentability, customization are high;And putaway rule configuration is flexible, is suitable for the specific business characteristic of different monitored systems, holds
Easily according to the actual conditions adjustment stock management of monitored system;And accuracy and integrality, the data loading of data loading
The reliability of work is high, employs delayed impact of the unloading mechanism to avoid excess load to system;With monitoring system, flow system
The ability of the concurrent efforts such as system, diagnostic system is strong.
Specific embodiment
All features or disclosed all methods disclosed in this specification or in the process the step of, except mutually exclusive
Feature and/or step beyond, can combine in any way.
As shown in Figure 1, in IT O&Ms field, to preserve the magnanimity performance indicator number collected by different acquisition terminal
According to.Configuration rule first, the optimal storage information quantity of definition every batch of is 1000, wait optimal information number maximum duration is 3
Second, maximum can carry number of tasks 500, when the task amount in the storage task buffer that storage operational terminal manager is managed surpasses
When going out maximum number of tasks, the task 30% in random unloading task buffer is into storage information unloading file, storage mission failure
Number of retries 3 times, storage information unloading file are message.dump, error message unloading file error_
message.dump。
In system starting process, data storage controller scans message.dump files first, and whether check wherein has
By the storage information of unloading, if there is then these information are loaded into the storage information caching of controller.
After system starts, data storage controller will be checked in storage information caching with the presence or absence of storage information, institute
It is database realizing associated with data storage controller to state storage information caching, is continued waiting for if not, if so,
Then according in configuration rule, judging whether the cache information number has reached 1000, if reached, extract 1000 and enter
Storehouse information, and this 1000 storage informations are encapsulated as a task, storage operational terminal manager is submitted to, if do not reached
It to 1000 datas, then waits 3 seconds, in this 3 seconds waiting process, if number of data reaches in being cached before 3 seconds
1000, then controller is no longer waiting for, and immediately extracts this 1000 data, is encapsulated as a storage task, is submitted to
Operational terminal manager is put in storage, on the contrary, after 3 second stand-by period, 1000 data requirements is still not reaching to, then controls
Device all extracts storage information all in caching, is encapsulated as a task and submits storage operational terminal manager.
Storage operational terminal manager receive task after, first determine whether belonging to storage terminal whether oepration at full load,
If it is not, directly the task is put into storage task buffer, the storage task buffer is with being put in storage operational terminal
The associated database of manager, wait it is to be allocated, if storage terminal all in working condition, according to configuration rule, judges to appoint
Whether the data in business caching have reached 500, if having reached 500, at random dump to 30% in 500 tasks
In storage information unloading file, then newly submitting for task is put into task buffer, is waited to be allocated.
When the storage terminal belonging to storage operational terminal manager is available free, then operational terminal manager is put in storage, will appointed
A task submitting earliest is distributed to the idle storage terminal and is performed in business caching, if without idle storage terminal,
Then resource is waited to discharge.
When storage terminal receives storage task, storage task is then carried out, in task process is put in storage in execution, hair
Existing storage information mistake, for example, data type not to, the sql error that performs when exception, storage end-filtration falls these mistakes
Information, and these information are dumped in file error_message.dump, and continue to execute entering of being not carried out finishing
Storehouse information preserves the other information be not put in storage.
Be put in storage terminal in the process of implementation, IO is abnormal, startup, Network Abnormal etc. be not abnormal for database service if run into
When, storage terminal will retry 3 subtasks according to configuration rule, if still there is identical exception, retract all operations,
And all storage informations in the task are dumped in message.dump files.
When the storage terminal belonging to storage operational terminal manager is in underrun, operational terminal pipe is put in storage at this time
Manage device notification controller, scan in message.dump files whether a part of storage information of unloading, if so, then again plus
It is downloaded in the caching of controller, Reseals task, and re-execute these storage tasks.
When in this method system shutdown procedures, controller stops receiving new storage information, and stops submission task and arrive
Be put in storage operational terminal manager, preserve storage information cache in all storage informations and by storage operational terminal manager
Into file message.dump, storage operational terminal manager stops receiving new task the storage task of refusal, stops dividing
With the task in caching to storage terminal, and all tasks in task buffer are dumped in message.dump files,
Storage terminal continues to execute being not carried out finishing of the task, according to original logic unloading file when occurring abnormal.