U4-11394 - Allow for more configuration of Health Checks

Created by Pete Duncanson 31 May 2018, 11:40:09 Updated by Pete Duncanson 21 Aug 2018, 11:26:10

Relates to: U4-11393

Health Checks have some configuration build into them however there is no way of adding custom config options that I'm aware of. I'd like to be able to have and editable section of the settings that my health check could use rather than hard coding it into Health Check itself and limiting updates to an Umbraco release. An example is my developer files in root check which ideally developers should be able to customise and add to (http://issues.umbraco.org/issue/U4-11393).

This issue is to see if there already is an option available or to add one if not.


Pete Duncanson 19 Jun 2018, 10:09:55

Not sure if this the config for this should be in the healthcheck.xml config file or not. It makes sense initially but its quite a big file so hard to find the bit you need and it could mean you lose your edits when doing an upgrade. Would it be better to have it in a separate file, if so what should it be called HealthCheckCustom.xml or similar?

Jeavon Leopold 19 Jun 2018, 10:30:09

@peteduncanson I think these should be added to HealthChecks.config (we did actually think about it when we created this config file)

This was the rough idea (the checkSettings section isn't implemented)

Sebastiaan Janssen 19 Jun 2018, 15:07:21

As @crumpled_jeavon I think they should be part of the same config file, if there's good arguments for making a separate file I'm all ears but I haven't thought of anything that makes a whole lot of sense yet.

Less fills == keeping it simple.

Pete Duncanson 19 Jun 2018, 15:10:05

Excellent stuff. In that case I'll flesh this out and get this in as a separate PR and then test drive it in my other Health Check for files in root ;)

Sebastiaan Janssen 19 Jun 2018, 17:04:43


Pete Duncanson 03 Jul 2018, 14:22:06

Got somewhere with this one, however testing it was proving "interesting" so I'm going to merge it in with the work I've done with #u4-11393 and push them in as one if that ok. At least then we have a health check thats using this work so testing is much easier.

Additionally trying to do a whiteslist for files is a knightmare in C#. Ended up going for regexp matched in the settings and then running those against a list of files found in the root. We remove any that match and should end up with a list of those we aren't sure off that we will flag up. Means you can't do GLOB's and the regexp look a little "funky" due to the escaping of full stops etc. but it works. Each file to match has a separate entry and a regexp so its targetted:


Pete Duncanson 21 Aug 2018, 11:26:10

Nearly got something ready for this, holidays and illness have got in the way. When complete I think I'll have three issues that will be in the one PR, is that ok? I could do one of them as a separate PR but then it has an dependency on this one going in first. Not sure of the best way to go about handling that and open to ideas.

Priority: Normal

Type: Bug

State: Submitted


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: