summaryrefslogtreecommitdiff
path: root/oslo_middleware/healthcheck/disable_by_file.py
diff options
context:
space:
mode:
Diffstat (limited to 'oslo_middleware/healthcheck/disable_by_file.py')
-rw-r--r--oslo_middleware/healthcheck/disable_by_file.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/oslo_middleware/healthcheck/disable_by_file.py b/oslo_middleware/healthcheck/disable_by_file.py
index 05d61bf..61a55c8 100644
--- a/oslo_middleware/healthcheck/disable_by_file.py
+++ b/oslo_middleware/healthcheck/disable_by_file.py
@@ -23,6 +23,22 @@ LOG = logging.getLogger(__name__)
class DisableByFileHealthcheck(pluginbase.HealthcheckBaseExtension):
+ """DisableByFile healthcheck middleware plugin
+
+ This plugin checks presence of a file to report if the service
+ is unavailable or not.
+
+ Example of middleware configuration:
+
+ .. code-block:: ini
+
+ [filter:healthcheck]
+ paste.filter_factory = oslo_middleware:Healthcheck.factory
+ path = /healthcheck
+ backends = disable_by_file
+ disable_by_file_path = /var/run/nova/healthcheck_disable
+ """
+
def healthcheck(self):
path = self.conf.get('disable_by_file_path')
if path is None: