Skip to content

Commit

Permalink
bird 2: allow memory values to be floats
Browse files Browse the repository at this point in the history
  • Loading branch information
liske committed Aug 7, 2023
1 parent d6c0491 commit a749a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bird/lib/check_mk/base/plugins/agent_based/bird.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _bird_strptime(string):

def _bird_si_to_int(value, unit):
_prefix = {'': 1, 'k': 1024, 'M': 1048576, 'G': 1073741824}
return int(value) * _prefix[unit.rstrip('B')]
return int(float(value) * _prefix[unit.rstrip('B')])

def _bird_x_to_key(value):
return "_".join(value).rstrip(':')
Expand Down

0 comments on commit a749a48

Please sign in to comment.