Skip to content

Commit

Permalink
Adjusted perfData output so Icinga2 can show an icon as well
Browse files Browse the repository at this point in the history
  • Loading branch information
martinseener committed Dec 20, 2018
1 parent 78b1a45 commit 126b96c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 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.2] - 2018-12-20
- made another perfData adjustment so Icinga shows the green/grey usage cake icon

## [1.1.1] - 2018-12-20
- fixed performance data and made it compatible to Icinga2 (see https://www.monitoring-plugins.org/doc/guidelines.html#AEN201)

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;;2048000.0
OK - The ... |Storage Box #123456=1470452.0KB;1843200.0;1945600.0;0;2048000.0
```

## Contribution and License
Expand Down
8 changes: 4 additions & 4 deletions check_hetzner_storage_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__author__ = 'Martin Seener'
__copyright__ = 'Copyright 2018, Martin Seener'
__license__ = 'MIT'
__version__ = '1.1.1'
__version__ = '1.1.2'
__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!'
'|Storage Box #{}={}KB;{};{};;{}'
'|Storage Box #{}={}KB;{};{};0;{}'
.format(storage_box,
name,
critical,
Expand All @@ -77,7 +77,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!'
'|Storage Box #{}={}KB;{};{};;{}'
'|Storage Box #{}={}KB;{};{};0;{}'
.format(storage_box,
name,
warning,
Expand All @@ -91,7 +91,7 @@ def check_storage_box(storage_box, user, password, warning, critical):
elif warning < free:
print('OK - Free disk size of Storage Box #{} ({}) '
'is currently {}%'
'|Storage Box #{}={}KB;{};{};;{}'
'|Storage Box #{}={}KB;{};{};0;{}'
.format(storage_box,
name,
free,
Expand Down

0 comments on commit 126b96c

Please sign in to comment.