freezer_dr.monitors.drivers.dummy package¶
Submodules¶
freezer_dr.monitors.drivers.dummy.driver module¶
-
class
freezer_dr.monitors.drivers.dummy.driver.
DummyDriver
(backend_name, notifier)[source]¶ Bases:
freezer_dr.monitors.common.driver.MonitorBaseDriver
A monitoring driver that returns a configured list of nodes as failed.
This can be useful for testing without actually shutting down the nodes. The nodes that should be reported as failing, can be configured in the monitoring section of the freezer_dr configuration file as follows: kwargs = nodes_down:hostname1;hostname2
-
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=None, 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
-