Limiting execution of event-responses with use of policies
View Patent ↗Policies, which specify event-responses for reacting to events, may be configured on host computer systems. An event-response may be executed when a particular event is detected on a host. The events may include a software change, a host machine processes change, a resources key change, and/or a critical failure. One or more event-responses may be defined for a policy. When an event is detected, the active policy is examined for event-responses corresponding to the event. The event-responses may also have defined a permitted number of executions. Thus, an event-response may be automatically executed only a permitted number of times. After the permitted number is reached, the event-response no longer executes in response to an event. The counters corresponding to event-responses may be reset when a new policy is activated.
1. A method, comprising:
detecting a host event;
identifying an event-response in a current policy corresponding to the detected host event;
determining a number of times the event-response corresponding to the host event has executed; and
when the number of executions is less than or equal to a pre-defined value, execute the event-response;
wherein identifying comprises: determining whether the current policy has one or more associated event-responses; and when one or more event-responses are associated with the current policy, accessing a configuration file for the current policy before detecting the host event;
when the pre-defined value is equal to zero, execute the event-response.
2. The method of claim 1 , further comprising receiving an identification of one or more event-responses for association with the current policy.
3. The method of claim 1 , further comprising when the number of executions is greater than the pre-defined value, log information regarding the host event.
4. The method of claim 1 , in which the step of executing the event-response comprises changing the active policy to a new policy.
5. The method of claim 1 , in which the host event comprises at least one of a software change, a host machine processes change, a resources key change, and a critical failure.
6. A computer program product, comprising:
a non-transitory computer readable medium comprising:
code to detect a host event;
code to identify an event-response in a current policy corresponding to the detected host event;
code to determine a number of times the event-response corresponding to the host event has executed; and
code to execute the event-response when the number of executions is less than or equal to a pre-defined value
wherein identifying comprises: determining whether the current policy has one or more associated event-responses; and when one or more event-responses are associated with the current policy, accessing a configuration file for the current policy before detecting the host event;
when the pre-defined value is equal to zero, execute the event-response.
7. The computer program product of claim 6 , in which the medium further comprises:
code to determine whether the current policy has one or more associated event-responses;
and code to access a configuration file for the current policy when one or more event-responses are associated with the current policy.
8. The computer program product of claim 7 , in which the medium further comprises code to receive an identification of one or more event-responses for association with the current policy.
9. The computer program product of claim 6 , in which the medium further comprises code to log information regarding the host event when the number of executions is greater than the pre-defined value.
10. The computer program product of claim 6 , in which the medium further comprises code to change the active policy to a new policy when the event-response executes.
11. The computer program product of claim 6 , in which the host event comprises at least one of a software change, a host machine processes change, a resources key change, and a critical failure.
12. The computer program product of claim 6 , in which the medium further comprises code to execute the event-response when the pre-defined value is equal to zero.
13. An apparatus, comprising:
a memory; and
a processor coupled to the memory, in which the processor is configured:
to detect a host event;
to identify an event-response in a current policy corresponding to the detected host event;
to determine a number of times the event-response corresponding to the host event has executed; and
to execute the event- response when the number of executions is less than or equal to a pre-defined value;
wherein identifying comprises: determining whether the current policy has one or more associated event-responses; and when one or more event-responses are associated with the current policy, accessing a configuration file for the current policy before detecting the host event;
when the pre-defined value is equal to zero, execute the event-response.
14. The apparatus of claim 13 , in which the processor is further configured: to determine whether the current policy has one or more associated event-responses; and to access a configuration file for the current policy when one or more event-responses are associated with the current policy.
15. The apparatus of claim 14 , in which the processor is further configured to receive an identification of one or more event-responses for association with the current policy.
16. The apparatus of claim 13 , in which the processor is further configured to log information to the memory regarding the host event when the number of executions is greater than the pre-defined value.
17. The apparatus of claim 13 , in which the processor is further configured to change the active policy to a new policy when the event-response executes.
18. The apparatus of claim 13 , in which the host event comprises at least one of a software change, a host machine processes change, a resources key change, and a critical failure.