The freezer_dr.monitors.drivers.monasca.driver
Module¶
-
class
freezer_dr.monitors.drivers.monasca.driver.
MonascaDriver
(backend_name, notifier)[source]¶ Bases:
freezer_dr.monitors.common.driver.MonitorBaseDriver
Monasca monitoring driver to monitor compute nodes. It makes use of Monasca to monitor the compute nodes. Metric information needed. ‘hostname’
must be used in dimensions to filter the values in alarms. You need to define alarms for all hosts with the required metrics.-
analyze_nodes
(nodes)[source]¶ It will check if the nodes are in ‘OK’ state or not. If not they will considered down. We have three states as follow:
- OK
- ALARM
- UNDEFINED
-
get_data
()[source]¶ - This function returns monitoring data from Monasca. It calls
- _get_raw_data to get raw data and then process these data returns
a normalized dict :return: doct contains: {
- hostname1: {
- metric_name1: [‘Ok’, ‘ALARM’, ‘UNDETERMINED’] metric_name2: [‘OK’, ‘OK’, ‘OK’]
}, hostname2: {
metric_name1: [‘Ok’, ‘ALARM’, ‘OK’] metric_name2: [‘ALARM’, ‘UNDETERMINED’, ‘OK’]}
}
-