Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom 161 posts 322 karma points
    Dec 19, 2017 @ 11:37
    Tom
    0

    Health Check API Example

    I was told from Umbraco that with v7.6, there is an API that developers can tap into to run/schedule health checks. That's great. But can someone give me running example?

    Thanks

    BTD

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Dec 19, 2017 @ 11:47
    Kevin Jump
    0

    HI Tom,

    i have a client dependency health checker - which you can use as example code

    https://github.com/KevinJump/Umbraco-ClientDependencyHealthChecker

    the main health check element is here : https://github.com/KevinJump/Umbraco-ClientDependencyHealthChecker/blob/master/Jumoo.CdfHealthChecker/ClientDependencyHealthChecker.cs

    the code in the documentation is also quite usefull for getting started : https://our.umbraco.org/Documentation/Extending/Healthcheck/

  • Tom 161 posts 322 karma points
    Dec 19, 2017 @ 12:38
    Tom
    0

    Thank You very much for sharing Kevin.
    Have a great day. Tom

  • Tom 161 posts 322 karma points
    Dec 19, 2017 @ 14:06
    Tom
    0

    Kevin:

    Is there C# code that shows me how to invoke the default Health Checks and send back the results? If I can get my hands on this, then I can use Umbraco to schedule running the health checks?

    Thanks

    Tom

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Dec 19, 2017 @ 14:16
    Kevin Jump
    0

    Hi

    in Umbraco 7.6 there is a new config HealthChecks.config this controls how scheduled health checks are run (so it's not configured with the standard schedule stuff in UmbracoSettings.Config).

    https://our.umbraco.org/Documentation/Reference/Config/HealthChecks/

  • Tom 161 posts 322 karma points
    Dec 19, 2017 @ 14:24
    Tom
    0

    Wow! If I understand the docs, I can enable/disable health checks and if I configure properly, it will send me an email SOMETHING for each health check I enable right?

    Can you tell me what Umbraco sends or is something like "Health Check XYZ" Pass or Fail and why it failed?

    Tom

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Dec 19, 2017 @ 14:33
    Kevin Jump
    0

    Yeah - It depends on the Summary settings you put in the config:

    Each notification method can separately be enabled or disabled. The attribute verbosity can be set to Summary or Detailed to get more or less information in the alerts, and the failureOnly can be set to true or false if you'd prefer to get notifications only if at least one potential problem is detected.

  • Tom 161 posts 322 karma points
    Dec 19, 2017 @ 14:47
    Tom
    0

    Many thanks Kevin.

  • Phil Atkinson 51 posts 244 karma points
    Dec 20, 2017 @ 10:22
    Phil Atkinson
    0

    I do like the schedule idea - I saw this at CodeGarden this year. At the moment I have a custom healthcheck endpoint (hit by my load balancer every few seconds) which checks data integrity and local indexes are happy.

Please Sign in or register to post replies

Write your reply to:

Draft