[keycloak-user] keycloak heathcheck with microprofile

Stian Thorgersen sthorger at redhat.com
Sun Jun 16 04:28:44 EDT 2019


I'm that case it's more obvious that Keycloak can track dB status, but
still it's not KC that is down so health check on KC being down is not
exactly right. Really wonder what best practices are here.

On Wed, 12 Jun 2019, 14:57 Meissa M'baye Sakho, <msakho at redhat.com> wrote:

> The use case I'm facing is a DB deployed externally. The requirement is to
> make sure that DB access from keycloak is always UP.
> This has been implemented in the following link:
> https://github.com/thomasdarimont/keycloak-health-checks/tree/master
>
> I wanted to do the same with smallrye.
> --
>
> Meissa Sakho, RHCA
>
> Architect
>
> Red Hat EMEA <https://www.redhat.com/>
>
> msakho at redhat.com
> M: +33-6-9559-7778
> <https://www.redhat.com/>
>
>
> Le mer. 12 juin 2019 à 14:40, Stian Thorgersen <sthorger at redhat.com> a
> écrit :
>
>> Ah, problem is we don't have support for CDI, but from what I gather
>> there's a static instance of the smallrye registry that would allow adding
>> custom health checks.
>>
>> I've also been talking to lots of folks around health checks and whether
>> or not a "service" is responsible for checking if services it consumes is
>> up as well, but opinions differ here. Some say Keycloak is down if the DB
>> is down, but some say the DB should have separate health checks. Now
>> looking at Kube for instance having Keycloak marked as down if the DB is
>> down is kinda wrong as it would result in Kube restarting KC pods, not the
>> DB pods which are actually down.
>>
>> On Wed, 12 Jun 2019 at 10:56, Meissa M'baye Sakho <msakho at redhat.com>
>> wrote:
>>
>>> Stian,
>>> The problem is not enabling it. I already did it.
>>> I would like to go beyond the defaults endpoints.
>>> I need to add features like beeing able to have an endpoint that tells
>>> me if the keycloak database is up and running.
>>> For that I need to add some dev and that's where I'm a little bit blind.
>>>
>>>
>>>
>>> --
>>>
>>> Meissa Sakho, RHCA
>>>
>>> Architect
>>>
>>> Red Hat EMEA <https://www.redhat.com/>
>>>
>>> msakho at redhat.com
>>> M: +33-6-9559-7778
>>> <https://www.redhat.com/>
>>>
>>>
>>> Le mer. 12 juin 2019 à 10:41, Stian Thorgersen <sthorger at redhat.com> a
>>> écrit :
>>>
>>>> Keycloak 6 is built with WildFly 16 that includes the smallrye. You can
>>>> enable it by following config in WildFly docs or Google it. We will
>>>> document this soon.
>>>>
>>>> On Wed, 12 Jun 2019, 09:32 Meissa M'baye Sakho, <msakho at redhat.com>
>>>> wrote:
>>>>
>>>>> Hello all,
>>>>> Any advice on that?
>>>>>
>>>>> --
>>>>>
>>>>> Meissa Sakho, RHCA
>>>>>
>>>>> Architect
>>>>>
>>>>> Red Hat EMEA <https://www.redhat.com/>
>>>>>
>>>>> msakho at redhat.com
>>>>> M: +33-6-9559-7778
>>>>> <https://www.redhat.com/>
>>>>>
>>>>>
>>>>> Le mer. 29 mai 2019 à 12:48, Meissa M'baye Sakho <msakho at redhat.com> a
>>>>> écrit :
>>>>>
>>>>> > Hello everyone,
>>>>> > Have someone tried to crate health check with SmallRye and the new
>>>>> metrics
>>>>> > extension?
>>>>> > I've tried long ago Thomas darimont's following example [1] to
>>>>> implement
>>>>> > health check, but would like to know is someone has started
>>>>> something.
>>>>> > ´1]=
>>>>> https://github.com/thomasdarimont/keycloak-health-checks/tree/master
>>>>> >
>>>>> > thanks
>>>>> > --
>>>>> >
>>>>> > Meissa Sakho, RHCA
>>>>> >
>>>>> > Architect
>>>>> >
>>>>> > Red Hat EMEA <https://www.redhat.com/>
>>>>> >
>>>>> > msakho at redhat.com
>>>>> > M: +33-6-9559-7778
>>>>> > <https://www.redhat.com/>
>>>>> >
>>>>> _______________________________________________
>>>>> keycloak-user mailing list
>>>>> keycloak-user at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>
>>>>


More information about the keycloak-user mailing list