cmk.graphing.v1.graphs
- class MinimalRange(lower, upper)
The minimal range describes what will at least be covered by the graphs vertical axis, regardless of the metrics values. The vertical axis will be extended if the metrics exceed the minimal range, but it will never be smaller.
- Parameters:
lower (
int|float|str|Constant|WarningOf|CriticalOf|MinimumOf|MaximumOf|Sum|Product|Difference|Fraction) – A lower boundupper (
int|float|str|Constant|WarningOf|CriticalOf|MinimumOf|MaximumOf|Sum|Product|Difference|Fraction) – An upper bound
Example
>>> MinimalRange(0, 100) MinimalRange(lower=0, upper=100)
- class Graph(*, name, title, minimal_range=None, compound_lines=(), simple_lines=(), optional=(), conflicting=())
Instances of this class will only be picked up by Checkmk if their names start with
graph_.- Parameters:
name (
str) – A unique nametitle (
Title) – A titleminimal_range (
MinimalRange|None) – A minimal rangecompound_lines (
Sequence[str|Constant|WarningOf|CriticalOf|MinimumOf|MaximumOf|Sum|Product|Difference|Fraction]) – A list of metric names or objects. These will constitute compound lines: Colored areas, stacked on top of each other.simple_lines (
Sequence[str|Constant|WarningOf|CriticalOf|MinimumOf|MaximumOf|Sum|Product|Difference|Fraction]) – A list of metric names or objects. These will be rendered as simple lines, without colored areas.optional (
Sequence[str]) – A list of metric names. This graph template will be used, even if the metrics specified here are missing.conflicting (
Sequence[str]) – A list of metric names. This graph template will never be used if any of these metrics are created by the plugin.
Example
>>> graph_name = Graph( ... name="name", ... title=Title("A title"), ... minimal_range=MinimalRange(0, 100), ... compound_lines=["metric-name-1"], ... simple_lines=["metric-name-2"], ... optional=["metric-name-1"], ... conflicting=["metric-name-3"], ... )
- class Bidirectional(*, name, title, lower, upper)
Instances of this class will only be picked up by Checkmk if their names start with
graph_.- Parameters:
Example
>>> graph_name = Bidirectional( ... name="name", ... title=Title("A title"), ... lower=Graph( ... name="lower", ... title=Title("A title"), ... compound_lines=["metric-name-1"], ... ), ... upper=Graph( ... name="upper", ... title=Title("A title"), ... compound_lines=["metric-name-2"], ... ), ... )