Project

General

Profile

Actions

Bug #21904

closed

mgr[zabbix] float division by zero (osd['kb'] = 0)

Added by Ilja Slepnev over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
zabbix module
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Issued ceph osd out 0 and zabbix monitoring stopped.

root@host:~# ceph zabbix send
Error EINVAL: Traceback (most recent call last):
  File "/usr/lib/ceph/mgr/zabbix/module.py", line 234, in handle_command
    self.send()
  File "/usr/lib/ceph/mgr/zabbix/module.py", line 206, in send
    data = self.get_data()
  File "/usr/lib/ceph/mgr/zabbix/module.py", line 174, in get_data
    osd_fill.append((float(osd['kb_used']) / float(osd['kb'])) * 100)
ZeroDivisionError: float division by zero

Fix is trivial, need to check that osd['kb'] is not zero


Related issues 1 (0 open1 closed)

Copied to mgr - Backport #22196: luminous: mgr[zabbix] float division by zero (osd['kb'] = 0)ResolvedShinobu KinjoActions
Actions

Also available in: Atom PDF