The nova.compute.monitors.base
Module¶
-
class
CPUMonitorBase
(compute_manager)¶ Bases:
nova.compute.monitors.base.MonitorBase
Base class for all monitors that return CPU-related metrics.
-
get_metric_names
()¶
-
-
class
MonitorBase
(compute_manager)¶ Bases:
object
Base class for all resource monitor plugins.
A monitor is responsible for adding a set of related metrics to a nova.objects.MonitorMetricList object after the monitor has performed some sampling or monitoring action.
-
add_metrics_to_list
(metrics_list)¶ Adds metric objects to a supplied list object.
Parameters: metric_list – nova.objects.MonitorMetricList that the monitor plugin should append nova.objects.MonitorMetric objects to.
-
get_metric_names
()¶ Get available metric names.
Get available metric names, which are represented by a set of keys that can be used to check conflicts and duplications
Returns: set containing one or more values from :py:attr: nova.objects.fields.MonitorMetricType.ALL
-
get_metrics
()¶ Returns a list of tuples containing information for all metrics tracked by the monitor.
Note that if the monitor class is responsible for tracking a related set of metrics – e.g. a set of percentages of CPU time allocated to user, kernel, and idle – it is the responsibility of the monitor implementation to do a single sampling call to the underlying monitor to ensure that related metric values make logical sense.
Returns: list of (metric_name, value, timestamp) tuples
-