Skip to content

Commit

Permalink
Fix disk usage size unit from KB to MB
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Seener authored and tobischo committed Oct 15, 2024
1 parent bd199f6 commit 3e64a1b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.5] - 2024-10-15
- fix performance data disk size unit from KB to MB

## [1.1.4] - 2021-09-23
- fix performance data output name to "Usage" to remove whitespaces and make it work again for check_mk

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2021 viafintech GmbH
Copyright (c) 2018-2024 viafintech GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ CRITICAL - Free disk size of Storage Box #123457 (Backup-Box-2) is less than 15.
The check also prints out performance data that can be used to generate some nice graphs in Icinga2 or any other tool. Here is what it looks like (exmaple):

```
OK - The ... |Storage Box #123456=1470452.0KB;1843200.0;1945600.0;0;2048000.0
OK - The ... |Storage Box #123456=1470452.0MB;1843200.0;1945600.0;0;2048000.0
```

## Contribution and License
Expand Down
10 changes: 5 additions & 5 deletions check_hetzner_storage_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@


__author__ = 'Martin Seener'
__copyright__ = 'Copyright 2018-2021, viafintech GmbH'
__copyright__ = 'Copyright 2018-2024, viafintech GmbH'
__license__ = 'MIT'
__version__ = '1.1.4'
__version__ = '1.1.5'
__maintainer__ = 'Martin Seener'
__email__ = '[email protected]'
__status__ = 'Production'
Expand Down Expand Up @@ -63,7 +63,7 @@ def check_storage_box(storage_box, user, password, warning, critical):
if free <= critical:
print('CRITICAL - Free disk size of Storage Box #{} ({}) '
'is less than {}% of the quota!'
'|Usage={}KB;{};{};0;{}'
'|Usage={}MB;{};{};0;{}'
.format(storage_box,
name,
critical,
Expand All @@ -76,7 +76,7 @@ def check_storage_box(storage_box, user, password, warning, critical):
elif free <= warning:
print('WARNING - Free disk size of Storage Box #{} ({}) '
'is less than {}% of the quota!'
'|Usage={}KB;{};{};0;{}'
'|Usage={}MB;{};{};0;{}'
.format(storage_box,
name,
warning,
Expand All @@ -89,7 +89,7 @@ def check_storage_box(storage_box, user, password, warning, critical):
elif warning < free:
print('OK - Free disk size of Storage Box #{} ({}) '
'is currently {}%'
'|Usage={}KB;{};{};0;{}'
'|Usage={}MB;{};{};0;{}'
.format(storage_box,
name,
free,
Expand Down

0 comments on commit 3e64a1b

Please sign in to comment.