The freezer_dr.monitors.common.driver
Module¶
-
class
freezer_dr.monitors.common.driver.
MonitorBaseDriver
(backend_name, notifier)[source]¶ Bases:
object
Abstract class that all monitoring plugins should implement to have a unified interface and as many plugins as we want…
-
analyze_nodes
(nodes)[source]¶ Process nodes from get_data and return list of down nodes :param nodes: dict of metrics of nodes { ‘metric1’: nodes, ‘metric2’: nodes} :return: a list of down nodes
-
get_data
()[source]¶ Gathering metrics data. making the actual api call to the monitoring system and get a list of nodes status.
-
get_metrics
()[source]¶ return list of metrics used to monitor compute nodes. it’s Optional not all drivers need to implement this method.
-
is_alive
()[source]¶ Plugin should provide a way to make sure that the monitoring system is a live or not. It’s optional not all drivers need to implement it. :return: True or False
-
process_failed
(nodes=[], wait=0)[source]¶ Double check the failed nodes again to make sure that nodes are down. return a list of down nodes to be passed to the evacuation tool to process failed hosts. :param nodes: a list contains pre-checked nodes to re-check them again :param wait: a configurable a mount of time to wait before doing this check to give a chance for the host to recover if there was a minor issue. :return: a list of nodes to be evacuated, the list will be passed directly to the evacuation tool to process them
-