lighthouse.checks.http
¶lighthouse.checks.http.
HTTPCheck
(*args, **kwargs)[source]¶Bases: lighthouse.check.Check
Simple check for HTTP services.
Pings a configured uri on the host. The check passes if the response code is in the 2xx range.
name
= 'http'¶validate_dependencies
()[source]¶This check uses stdlib modules so dependencies are always present.
validate_check_config
(config)[source]¶Validates the http check config. The “uri” key is required.
apply_check_config
(config)[source]¶Takes a validated config dictionary and sets the uri
, use_https
and method
attributes based on the config’s contents.
perform
()[source]¶Performs a simple HTTP request against the configured url and returns true if the response has a 2xx code.
The url can be configured to use https via the “https” boolean flag in the config, as well as a custom HTTP method via the “method” key.
The default is to not use https and the GET method.