Rittal LCP Water flow: Cannot calculate graph recipes

**CMK version:**2.4.0p9.cee
**OS version:**Ubuntu 24.04

**Error message:**Cannot calculate graph recipes

Rittal LCP show in service view

LCP Fanunit WATER FLOW: Waterflow Status: OK, Flow: 43.1, MinFlow: 0.0, MaxFlow: 130.0

and in

Service graphs:

Cannot calculate graph recipes
Traceback (most recent call last):
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_html_render.py", line 719, in _resolve_graph_recipe_with_error_handling
    return graph_specification.recipes()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_graph_templates.py", line 950, in recipes
    recipe := self._build_recipe_from_template(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/cee/_graphs.py", line 145, in _build_recipe_from_template
    return super()._build_recipe_from_template(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_graph_templates.py", line 923, in _build_recipe_from_template
    return _create_graph_recipe_from_template(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_graph_templates.py", line 705, in _create_graph_recipe_from_template
    _evaluated_scalar_to_horizontal_rule(evaluated) for evaluated in graph_template.scalars
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_graph_templates.py", line 716, in _evaluated_scalar_to_horizontal_rule
    rendered_value=get_render_function(evaluated.unit_spec)(evaluated.value),
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_formatter.py", line 145, in render
    postformatted = self._postformat(
                    ^^^^^^^^^^^^^^^^^
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_formatter.py", line 124, in _postformat
    self._apply_precision(
  File "/omd/sites/sideview/lib/python3/cmk/gui/graphing/_formatter.py", line 85, in _apply_precision
    value_floor = math.floor(value)
                  ^^^^^^^^^^^^^^^^^
OverflowError: cannot convert float infinity to integer

the other graphs work fine

I am experiencing the exact same problem with this check. I am running CheckMK version 2.4.0p15.cee on AlmaLinux 9. The issue has persisted since I upgraded from CheckMK 2.3 to 2.4.

Has anybody had success in resolving this issue?

The problem here is the following line inside the check.

    yield Metric("flow", section.flow, levels=(section.maxflow, float("inf")))

As this levels are only used for rendering the graph and nothing else, i would do the following to fix the graph problem.

  • copy the file - ~/lib/check_mk/plugins/collection/agent_based/cmciii_lcp_waterflow.py
  • to ~/local/lib/python3/cmk/plugins/collection/agent_based/
  • change the mentioned line to
    yield Metric("flow", section.flow, levels=(section.maxflow, section.maxflow * 2))

Or some other value you like

But in the end it is a bug in the graphing system as this must handle “inf” and “-inf” values as levels or boundaries.

This is something for @moritz :wink:

3 Likes

Thanks Andreas, it’s working again now.

Thank you very much, this change resolved the problem.

1 Like

Hi,
this has been fixed with werk 18327.
BG