# Patent

## Title
Using data aggregation to manage a memory for an event-based analysis engine

## Abstract

In one aspect, a method includes receiving an original rule configured to be used by an event based analysis engine. The original rule requires data to be collected over a period of time. The method also includes determining if the period of time is greater than a time period threshold; determining if the original rule includes an aggregate function; generating an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold and aggregating data according to the aggregation rule.

## Background
BACKGROUND
An event-based analysis engine reacts to one or more events. For example, if an event occurs, the event-based analysis engine performs an action based on a rule. In one particular example, the event may be based on historical information.
SUMMARY
In one aspect, a method includes receiving an original rule configured to be used by an event based analysis engine. The original rule requires data to be collected over a period of time. The method also includes determining if the period of time is greater than a time period threshold; determining if the original rule includes an aggregate function; generating an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold and aggregating data according to the aggregation rule.
In another aspect, an apparatus includes electronic hardware circuitry configured to receive an original rule configured to be used by an event based analysis engine. The original rule requires data to be collected over a period of time. The circuitry is also configured to determine if the period of time is greater than a time period threshold, determine if the original rule includes an aggregate function, generate an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold and aggregate data according to the aggregation rule.
In a further aspect, an article includes a non-transitory computer-readable medium that stores computer-executable instructions. The instructions cause a machine to receive an original rule configured to be used by an event based analysis engine, the original rule requiring data to be collected over a period of time, determine if the period of time is greater than a time period threshold, determine if the original rule includes an aggregate function, generate an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold; and aggregate data according to the aggregation rule.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of an example of a system that includes an event-based analysis engine.
FIG. 2 is a flowchart of an example of a process to generate aggregation rules.
FIG. 3 is a flowchart of an example of a process to generate aggregated data.
FIG. 4 is a flowchart of an example of a process to aggregate historical data.
FIG. 5 is a block diagram of a computer on which any of the processes of FIGS. 2, 3 and 4 may be implemented.



DETAILED DESCRIPTION
Information Technology (IT) environments include a large number of network, computer, storage and backup equipment, which generate a high number of events in a short period of time. An event-based analysis engine that analyzes these events needs to be able to handle many events and to validate many rules efficiently. To do so the event-based analysis engine is required to keep the rules, facts (objects) and the events in memory so it will be able to evaluate every event quickly. In a very large environment this method consumes a lot of memory thereby generating scalability issues.
Described herein are techniques to handle large amount of data in a system that includes an event based analysis engine. In particular, an original rule (e.g., a rule generated by a user) is translated in to an aggregation rule (e.g., an aggregation rule transparent to the user). In one example, the data is aggregated based on a time window of an original rule.
As used herein an entity is a component in the environment that is monitored. An event is a process or metric of the component that is retrieved. For example, an entity is a host, backup client, CPU, storage device and so forth. An event, for example, may be a backup job, CPU utilization and so forth. A rule includes at least one entity, zero or more event(s), a condition and a time window (or timestamp) to measure the entity.
Referring to FIG. 1, a system 100 includes an event-based analysis engine 102, a storage device 106, repositories 108, network components 110, a listener 116 a compiler 122 and a feeder 124. The event-based analysis engine 102 receives the events generated by the network components 110 and processes rules for the events received (e.g., determines an appropriate rule to apply to each event and determines if the rule has been met). In one example, the network components 110 include one or more of hosts, storage arrays, switches (e.g., a fibre channel switch), data protection appliances, applications and so forth.
The listener 116 receives the events and dispatches the event to the storage device 106 and/or to the analysis engine 102 and when required it activates the aggregation process. In particular, the listener 116 receives events from the network components 110 for events based on the rules. The listener 116 includes an aggregation module 118 which aggregates the data. The aggregation module 118 aggregates the data based on an aggregation rule that exists in the metadata, determined by the compiler and loaded into the event-based analysis engine 102.
The event-based analysis engine 102 includes a memory 112. In one example, the rules that have been used within a predetermined time period remain stored in the memory 112 while rules that have not been used in the predetermined time period are moved to the storage device 106. When data arrives into the listener 116, if the event received relates to an active rule (e.g., a rule in use and data is being collect for) which is an aggregation rule, the aggregation module 118 will modify the aggregated information (e.g., average, maximum, minimum, summation, count and so forth) and will send the event to the storage device 106 and the aggregated information to the storage device 106 and to the event-based analysis engine 102 and a summarized entity will be inserted in the memory 112. For example, if the backup jobs are taken on an hourly basis over several months and if the user has created a rule that checks the average of the backup-job backup size over a period of time like a month, instead of saving all the backup job data done during the rule time period (month) the backup job data is summarized at an aggregation level that is daily for an aggregation rule thereby reducing the amount of data to keep in memory 112.
The repositories 108 describe definitions of different domain objects and additionally describe the relationship between the different domain objects and between the objects and their components in the same domain. As used herein, a domain is a collection of objects in a particular environment. For example, the environment can be a continuous data protection environment and the objects can be data protection appliances, hosts, storage arrays, applications and so forth.
The repositories 108 include a metadata repository 152 and a rules repository 158. The rules repository 158 stores the rules in a rules repository format. For example, the rules repository 158 stores the rules generated by the user that will be used by the event-based analysis engine 102. Additionally, the metadata repository 152 will include the aggregation rules.
The metadata repository 152 stores metadata on each event. The metadata includes the information about the attributes of an entity or of an event. In one example, the metadata for each event is used to determine the size of the data in order to perform data aggregation. The metadata repository 152 also stores object types, object hierarchy and the relationships of the objects to each other in an object repository format. In particular, an object is part of an object type and each object is related to one or more other objects. Each object also has one or more attributes. Any attribute of an object that is monitored and is not part of the object is stored. For example, every “Host” object has its Internet Protocol (IP) attribute that may contain multiple values. The metadata repository 152 also stores a relationship of an object to its attributes and components (Object Extension) and a relationship between an object to its related cross-domain objects (context).
The repositories 108 collect information from multiple data-sources/domains and are able to validate rules that are (1) from the same domain because the relationship between the objects is retrieved from the data-source/domains and (2) from multiple domains in case the user defines the relationship of the objects from different data-sources/domains.
The compiler 122 compiles the rules repository format into a format compatible with the event-based analysis engine rules 102. The compiler also identifies rules that include an aggregate function (e.g., average, maximum, minimum, summation, count and so forth) and converts those rules in to an aggregation rule. In one example, the aggregation rule is used internally by the system 100 and is transparent to a user that generated the rule. At compile time, an aggregation level is determined (e.g., hourly, daily, weekly and so forth) by the compiler 122 according to the time window. The aggregation rule is stored in the rule repository 158 and loaded in to the event-based analysis engine 102. The feeder 124 and the listener 116 are notified that a new rule is activated.
The feeder 124 queries the storage device 106 to retrieve the historical data and provides the historical information to the event-based engine 102. In one example, the feeder 124 fetches relevant data over a time window of an aggregation rule and inserts the fetched data into the analysis engine 102. In particular, the feeder 124 will group the entities according to the aggregation level and fetches the data from the storage device 106. In one example, the listener 116 is configured to aggregate data at the aggregation level and stores the aggregated data at the storage device 106, which stores the event and the calculated values.
In another example, for those rules that are not aggregation rules the feeder 124 fetches all the events in a time window of each rule.
Referring to FIG. 2, an example of a process to generate aggregation rules is a process 200. Process 200 identifies original rules that are candidates for aggregation (202). For example, the compiler 122 evaluates an original rule and determines if there is an aggregate function within the original rule. In another example, the compiler 122 evaluates an original rule and determines if there is an aggregate function within the original rule and determines if the time window is greater than a time period threshold by, for example, reading metadata for the events associated with the original rule. In a further example, the compiler 122 determines if the rule will require data over a particular time (time window), which will cause a data size to be larger than a predetermined value.
Process 200 translates candidates in to an aggregation rule (212). For example, the compiler 122 translates the original rule in to an aggregation rule. In one particular example, the original rule is renamed to include an identifier. For example, an original rule labeled “BackupJob” is renamed “AggegateBackupJob”. The aggregation rule is transparent to the user. Internally the event-based analysis engine 102 uses the aggregation rule, which generate the same result as the original rule.
Process 200 determines if there are any aggregation rules being run (222). If there are any aggregation rules being run, process 200 determines the aggregation level. For example, if the time window for the original rule is greater than 3 hours but less than 3 days, the aggregate level is hourly. If the time period for the original rule is greater than three days, the aggregation level is daily.
Referring to FIG. 3, an example of a process to generate aggregated data is a process 300. Process 300 identifies monitored entities associated with data received (302). For example, the listener 116 identifies monitored entities associated with data received. Process 300 aggregates the data (304). For example, for those entities for which an aggregation rule exists, the aggregation module 118 aggregates the data. Process 300 loads the aggregated data into memory (308) and sends the data and the aggregated data to the storage device (310). For example, the aggregation module 118 loads the aggregated data into the memory 112 and sends the data and the aggregated data to the storage device 106.
Referring to FIG. 4, an example of a process to aggregate historical data is a process 400. In one example, process 400 is performed when an aggregation rule is activated. In another example, process 400 is performed when the event-based analysis engine 102 is restarted.
Process 400 groups events/attributes according to an aggregation level (402). For example, the feeder 124 groups the entity according to the aggregation level. Process 400 fetches the aggregated data from the storage device 106 (412). For example, the feeder 124 instructs the storage device 106 to perform the aggregated function and fetches the aggregated data. The raw data is retrieved from the storage device 106 and the aggregated data is stored in the storage device 106. Process 400 loads the required data in to the event-based analysis engine 102 (416). For example, the feeder 124 loads the required data at the event-based analysis engine 106. The required data refers to data required by a rule.
Referring to FIG. 5, a computer 500 includes a processor 502, a volatile memory 504, a non-volatile memory 506 (e.g., hard disk) and the user interface (UI) 508 (e.g., a graphical user interface, a mouse, a keyboard, a display, touch screen and so forth). The non-volatile memory 506 stores computer instructions 512, an operating system 516 and data 518. In one example, the computer instructions 512 are executed by the processor 502 out of volatile memory 504 to perform all or part of the processes described herein (e.g., processes 200, 300 and 400).
The processes described herein (e.g., processes 200, 300 and 400) are not limited to use with the hardware and software of FIG. 5; they may find applicability in any computing or processing environment and with any type of machine or set of machines that is capable of running a computer program. The processes described herein may be implemented in hardware, software, or a combination of the two. The processes described herein may be implemented in computer programs executed on programmable computers/machines that each includes a processor, a non-transitory machine-readable medium or other article of manufacture that is readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and one or more output devices. Program code may be applied to data entered using an input device to perform any of the processes described herein and to generate output information.
The system may be implemented, at least in part, via a computer program product, (e.g., in a non-transitory machine-readable storage medium such as, for example, a non-transitory compute-readable medium), for execution by, or to control the operation of, data processing apparatus (e.g., a programmable processor, a computer, or multiple computers)). Each such program may be implemented in a high level procedural or object-oriented programming language to communicate with a computer system. However, the programs may be implemented in assembly or machine language. The language may be a compiled or an interpreted language and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network. A computer program may be stored on a non-transitory machine-readable medium that is readable by a general or special purpose programmable computer for configuring and operating the computer when the non-transitory machine-readable medium is read by the computer to perform the processes described herein. For example, the processes described herein may also be implemented as a non-transitory machine-readable storage medium, configured with a computer program, where upon execution, instructions in the computer program cause the computer to operate in accordance with the processes. A non-transitory machine-readable medium may include but is not limited to a hard drive, compact disc, flash memory, non-volatile memory, volatile memory, magnetic diskette and so forth but does not include a transitory signal per se.
The processes described herein are not limited to the specific examples described. For example, the processes 200, 300 and 400 are not limited to the specific processing order of FIGS. 2 to 4, respectively. Rather, any of the processing blocks of FIGS. 2 to 4 may be re-ordered, combined or removed, performed in parallel or in serial, as necessary, to achieve the results set forth above.
The processing blocks (for example, in the processes 200, 300 and 400) associated with implementing the system may be performed by one or more programmable processors executing one or more computer programs to perform the functions of the system. All or part of the system may be implemented as, special purpose logic circuitry (e.g., an FPGA (field-programmable gate array) and/or an ASIC (application-specific integrated circuit)). All or part of the system may be implemented using electronic hardware circuitry that include electronic devices such as, for example, at least one of a processor, a memory, programmable logic devices or logic gates.
Elements of different embodiments described herein may be combined to form other embodiments not specifically set forth above. Other embodiments not specifically described herein are also within the scope of the following claims.

## Claims

1. A method comprising:
receiving an original rule configured to be used by an event based analysis engine, the original rule requiring data to be collected over a period of time;
determining if the period of time is greater than a time period threshold;
determining if the original rule includes an aggregate function;
generating an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold;
aggregating data according to the aggregation rule; and
determining if a size of data to be collected over the period of time is greater than a size threshold comprises evaluating metadata of events associated with the original rule,
wherein generating the aggregation rule comprises generating an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function, if the period of time is greater than the time period threshold and if the size of the data to be collected over the period of time is greater than a size threshold.

2. The method of claim 1 wherein aggregating the data according to the aggregation rule comprises aggregating data previously collected.

3. The method of claim 2 wherein aggregating the data previously collected according to the aggregation rule comprises aggregating data previously collected if the aggregation rule is activated.

4. The method of claim 1 wherein aggregating the data according to the aggregation rule comprises aggregating data based on an aggregation level.

5. An apparatus, comprising:
electronic hardware circuitry configured to:
receive an original rule configured to be used by an event based analysis engine, the original rule requiring data to be collected over a period of time;
determine if the period of time is greater than a time period threshold;
determine if the original rule includes an aggregate function;
generate an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold;
aggregate data according to the aggregation rule; and
determine if a size of data to be collected over the period of time is greater than a size threshold comprises evaluating metadata of events associated with the original rule,
wherein the circuitry configured to generate the aggregation rule comprises circuitry configured to generate an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function, if the period of time is greater than the time period threshold and if the size of the data to be collected over the period of time is greater than a size threshold.

6. The apparatus of claim 5 wherein the circuitry comprises at least one of a processor, a memory, a programmable logic device and a logic gate.

7. The apparatus of claim 5 wherein the circuitry configured to aggregate the data according to the aggregation rule comprises circuitry configured to aggregate data previously collected.

8. The apparatus of claim 7 wherein the circuitry configured to aggregate the data previously collected according to the aggregation rule comprises circuitry configured to aggregate data previously collected if the aggregation rule is activated.

9. The apparatus of claim 5 wherein the circuitry configured to aggregate the data according to the aggregation rule comprises circuitry configured to aggregate data based on an aggregation level.

10. An article comprising:
a non-transitory computer-readable medium that stores computer-executable instructions, the instructions causing a machine to:
receive an original rule configured to be used by an event based analysis engine, the original rule requiring data to be collected over a period of time;
determine if the period of time is greater than a time period threshold;
determine if the original rule includes an aggregate function;
generate an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function and if the period of time is greater than the time period threshold;
aggregate data according to the aggregation rule; and
determine if a size of data to be collected over the period of time is greater than a size threshold comprises evaluating metadata of events associated with the original rule,
wherein the instructions causing the machine to generate the aggregation rule comprises instructions causing the machine to generate an aggregation rule that aggregates the data to be collected by the original rule if the original rule includes an aggregate function, if the period of time is greater than the time period threshold and if the size of the data to be collected over the period of time is greater than a size threshold.

11. The article of claim 10 wherein the instructions causing a machine to aggregate the data according to the aggregation rule comprises instructions causing a machine to aggregate data previously collected.

12. The article of claim 11 wherein the instructions causing a machine to aggregate the data previously collected according to the aggregation rule comprises instructions causing a machine to aggregate data previously collected if the aggregation rule is activated.

13. The article of claim 10 wherein the instructions causing a machine to aggregate the data according to the aggregation rule comprises instructions causing a machine to aggregate data based on an aggregation level.