summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-30 22:46:09 +0200
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-30 22:46:09 +0200
commitc4fd34ed7966a197e596f3e766f58423fe9c5ddc (patch)
tree028001ac1c036c64e5064848f00b881743b48b74 /plugins
parent76971dea753d52d3e177aa84605d9b239a3a793e (diff)
downloadmonitoring-plugins-c4fd34ed7966a197e596f3e766f58423fe9c5ddc.tar.gz
Codespell fixes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_disk.c6
-rw-r--r--plugins/t/check_disk.t4
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 3cab816d..ddb9ee49 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -288,7 +288,7 @@ int main(int argc, char **argv) {
288 unit.name = strdup(filesystem->group); 288 unit.name = strdup(filesystem->group);
289 measurements = current = add_measurement_list(NULL, unit); 289 measurements = current = add_measurement_list(NULL, unit);
290 } else { 290 } else {
291 // if this is the first element of a group, the name of the previos entry is different 291 // if this is the first element of a group, the name of the previous entry is different
292 if (strcmp(filesystem->group, current->unit.name) != 0) { 292 if (strcmp(filesystem->group, current->unit.name) != 0) {
293 // so, this must be the first element of a group 293 // so, this must be the first element of a group
294 measurement_unit unit = create_measurement_unit_from_filesystem(*filesystem, config.display_mntp); 294 measurement_unit unit = create_measurement_unit_from_filesystem(*filesystem, config.display_mntp);
@@ -310,7 +310,7 @@ int main(int argc, char **argv) {
310 mp_add_subcheck_to_check(&overall, unit_sc); 310 mp_add_subcheck_to_check(&overall, unit_sc);
311 } 311 }
312 } else { 312 } else {
313 // Aparently no machting fs found 313 // Apparently no machting fs found
314 mp_subcheck none_sc = mp_subcheck_init(); 314 mp_subcheck none_sc = mp_subcheck_init();
315 xasprintf(&none_sc.output, "No filesystems were found for the provided parameters"); 315 xasprintf(&none_sc.output, "No filesystems were found for the provided parameters");
316 316
@@ -833,7 +833,7 @@ check_disk_config_wrapper process_arguments(int argc, char **argv) {
833 warn_freeinodes_percent, crit_freeinodes_percent); 833 warn_freeinodes_percent, crit_freeinodes_percent);
834 } 834 }
835 835
836 // If a list of paths has not been explicitely selected, find entire 836 // If a list of paths has not been explicitly selected, find entire
837 // mount list and create list of paths 837 // mount list and create list of paths
838 if (!path_selected && !result.config.path_ignored) { 838 if (!path_selected && !result.config.path_ignored) {
839 for (struct mount_entry *me = result.config.mount_list; me; me = me->me_next) { 839 for (struct mount_entry *me = result.config.mount_list; me; me = me->me_next) {
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
index 16daee9a..019cc9fe 100644
--- a/plugins/t/check_disk.t
+++ b/plugins/t/check_disk.t
@@ -39,13 +39,13 @@ like($result->{'mp_test_result'}->{'checks'}->[0]->{'state'}, "/OK/", "First sub
39like($result->{'mp_test_result'}->{'checks'}->[1]->{'state'}, "/OK/", "Second sub result is OK"); 39like($result->{'mp_test_result'}->{'checks'}->[1]->{'state'}, "/OK/", "Second sub result is OK");
40 40
41my $absolut_space_mp1 = $result->{'mp_test_result'}->{'checks'}->[1]->{'checks'}->[0]->{'perfdata'}->[0]->{'max'}->{'value'}; 41my $absolut_space_mp1 = $result->{'mp_test_result'}->{'checks'}->[1]->{'checks'}->[0]->{'perfdata'}->[0]->{'max'}->{'value'};
42# print("absolut space on mp1: ". $absolut_space_mp1 . "\n"); 42# print("absolute space on mp1: ". $absolut_space_mp1 . "\n");
43 43
44my $free_percent_on_mp1 = ($result->{'mp_test_result'}->{'checks'}->[1]->{'checks'}->[0]->{'perfdata'}->[0]->{'value'}->{'value'} / ($absolut_space_mp1/100)); 44my $free_percent_on_mp1 = ($result->{'mp_test_result'}->{'checks'}->[1]->{'checks'}->[0]->{'perfdata'}->[0]->{'value'}->{'value'} / ($absolut_space_mp1/100));
45print("free percent on mp1: ". $free_percent_on_mp1 . "\n"); 45print("free percent on mp1: ". $free_percent_on_mp1 . "\n");
46 46
47my $absolut_space_mp2 = $result->{'mp_test_result'}->{'checks'}->[0]->{'checks'}->[0]->{'perfdata'}->[0]->{'max'}->{'value'}; 47my $absolut_space_mp2 = $result->{'mp_test_result'}->{'checks'}->[0]->{'checks'}->[0]->{'perfdata'}->[0]->{'max'}->{'value'};
48# print("absolut space on mp2: ". $absolut_space_mp2 . "\n"); 48# print("absolute space on mp2: ". $absolut_space_mp2 . "\n");
49 49
50my $free_percent_on_mp2 = ($result->{'mp_test_result'}->{'checks'}->[0]->{'checks'}->[0]->{'perfdata'}->[0]->{'value'}->{'value'}/ ($absolut_space_mp2/100)); 50my $free_percent_on_mp2 = ($result->{'mp_test_result'}->{'checks'}->[0]->{'checks'}->[0]->{'perfdata'}->[0]->{'value'}->{'value'}/ ($absolut_space_mp2/100));
51print("free percent on mp2: ". $free_percent_on_mp2 . "\n"); 51print("free percent on mp2: ". $free_percent_on_mp2 . "\n");