[
https://issues.apache.org/jira/browse/FELIX-6292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151140#comment-17151140
]
Amit Mondal commented on FELIX-6292:
------------------------------------
[~henzlerg] I just noticed your new changes and it would help a lot of
consumers when an event is fired after a health check gets executed. I needed
such an eventing mechanism.
I think we should introduce such an eventing mechanism as a general rule of
thumb in Felix HC. It should not be restricted to *_HealthCheckMonitor_*.
Actually, according to my use case, consumers will provide several health
checks that get triggered in different intervals and/or when a specific time of
the day reaches (cron). Let's say, user A introduces the following HCs.
# *AbcHealthCheck* -> every 30 minutes
# *BcdHealthCheck* -> every 1 hour
# *CdeHealthCheck* -> every 5 hours
# *DefHealthCheck* -> Every day at 5 PM
Now, after these aforementioned HCs get executed, user could perform custom
tasks based on the HC results.
*_HealthCheckMonitor_* will not be very useful here since, in
*_HealthCheckMonitor_*, we need to configure the interval or the cron
expression when all health checks are executed at once in parallel. That means
the actual configured intervals and cron expressions are not considered by
*_HealthCheckMonitor._*
I think we should do either of the following:
# Let *_HealthCheckMonitor_* send events after all configured health checks
are executed when they are supposed to be executed. That is,
*_HealthCheckMonitor_* is not gonna execute them explicitly but rather track
them when they get executed and send events thereafter
# We can always send events after an HC gets executed. A more generic solution
and the easiest one. This doesn't need *_HealthCheckMonitor_* to be configured
at all.
I believe, option 2, will be useful in many scenarios and a more conforming
solution for the reporting mechanism.
> Introduce functionality to perform custom operation after a heath check is
> executed
> -----------------------------------------------------------------------------------
>
> Key: FELIX-6292
> URL: https://issues.apache.org/jira/browse/FELIX-6292
> Project: Felix
> Issue Type: New Feature
> Components: Health Checks
> Reporter: Amit Mondal
> Priority: Minor
> Labels: ready-to-commit
>
> Sometimes consumers need to perform custom operations after a health check
> gets executed. For example, one might need to send the health check result to
> online monitoring system such as Kibana, Grafana etc. That's why we need to
> introduce an extension point for consumers to extend the current
> functionality.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)