monasca_log_api.healthcheck package¶
Submodules¶
monasca_log_api.healthcheck.kafka_check module¶
-
class
CheckResult
(healthy, message)¶ Bases:
tuple
Result from the healthcheck, contains healthy(boolean) and message
-
healthy
¶ Alias for field number 0
-
message
¶ Alias for field number 1
-
-
class
KafkaHealthCheck
[source]¶ Bases:
object
Evaluates kafka health
Healthcheck verifies if:
- kafka server is up and running
- there is a configured topic in kafka
If following conditions are met healthcheck returns healthy status. Otherwise unhealthy status is returned with explanation.
Example of middleware configuration:[kafka_healthcheck] kafka_url = localhost:8900 kafka_topics = log
- Note:
- It is possible to specify multiple topics if necessary. Just separate them with ,
monasca_log_api.healthcheck.keystone_protocol module¶
-
class
SkippingAuthProtocol
(app, conf)[source]¶ Bases:
keystonemiddleware.auth_token.AuthProtocol
SkippingAuthProtocol to reach healthcheck endpoint
Because healthcheck endpoints exists as endpoint, it is hidden behind keystone filter thus a request needs to authenticated before it is reached.
- Note:
- SkippingAuthProtocol is lean customization
of
keystonemiddleware.auth_token.AuthProtocol
that disables keystone communication if request is meant to reach healthcheck
-
filter_factory
(global_conf, **local_conf)[source]¶ Return factory function for
SkippingAuthProtocol
Parameters: - global_conf – global configuration
- local_conf – local configuration
Returns: factory function
Return type: function