diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-01-29 14:14:05 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-01-29 14:14:05 +0000 |
commit | a69aa93a2c0305cb2168daba66b219c7de3bebde (patch) | |
tree | 54da622de315cf16a53550daa9bb469352bbf637 /plugins/t/check_disk.t | |
parent | ab24bcc0974057bb0960f5778c34ab397957bb4f (diff) | |
download | monitoring-plugins-a69aa93a2c0305cb2168daba66b219c7de3bebde.tar.gz |
Revert 1643463 (reversed disk thresholds) keeping the thresholds checks.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1594 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t/check_disk.t')
-rw-r--r-- | plugins/t/check_disk.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index 7235d70e..dd13ce58 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t | |||
@@ -82,9 +82,9 @@ $result = NPTest->testCmd( | |||
82 | "./check_disk -w 20 -c 10 -p $mountpoint_valid" | 82 | "./check_disk -w 20 -c 10 -p $mountpoint_valid" |
83 | ); | 83 | ); |
84 | $_ = $result->perf_output; | 84 | $_ = $result->perf_output; |
85 | my ($warn_absth_data, $crit_absth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;\d+/); | 85 | my ($warn_absth_data, $crit_absth_data, $total_absth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;(\d+)/); |
86 | is ($warn_absth_data, 20, "Wrong warning in perf data using absolute thresholds"); | 86 | is ($warn_absth_data, $total_absth_data - 20, "Wrong warning in perf data using absolute thresholds"); |
87 | is ($crit_absth_data, 10, "Wrong critical in perf data using absolute thresholds"); | 87 | is ($crit_absth_data, $total_absth_data - 10, "Wrong critical in perf data using absolute thresholds"); |
88 | 88 | ||
89 | # Then check percent thresholds. | 89 | # Then check percent thresholds. |
90 | $result = NPTest->testCmd( | 90 | $result = NPTest->testCmd( |
@@ -92,8 +92,8 @@ $result = NPTest->testCmd( | |||
92 | ); | 92 | ); |
93 | $_ = $result->perf_output; | 93 | $_ = $result->perf_output; |
94 | my ($warn_percth_data, $crit_percth_data, $total_percth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;(\d+)/); | 94 | my ($warn_percth_data, $crit_percth_data, $total_percth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;(\d+)/); |
95 | is ($warn_percth_data, int($total_percth_data/100*20), "Wrong warning in perf data using percent thresholds"); | 95 | is ($warn_percth_data, int((1-20/100)*$total_percth_data), "Wrong warning in perf data using percent thresholds"); |
96 | is ($crit_percth_data, int($total_percth_data/100*10), "Wrong critical in perf data using percent thresholds"); | 96 | is ($crit_percth_data, int((1-10/100)*$total_percth_data), "Wrong critical in perf data using percent thresholds"); |
97 | 97 | ||
98 | 98 | ||
99 | # Check when order of mount points are reversed, that perf data remains same | 99 | # Check when order of mount points are reversed, that perf data remains same |