diff options
| author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-10-12 14:14:48 +0000 |
|---|---|---|
| committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-10-12 14:14:48 +0000 |
| commit | f9baef7ed0d40745a46ea82d08d85949bb48b8c9 (patch) | |
| tree | d858e615fd886974b9c4ad8a270e2dc92fb0d08f /plugins/check_disk.c | |
| parent | bd9a612f6c18fcc9b17e5abf58def18b19521d82 (diff) | |
| download | monitoring-plugins-f9baef7ed0d40745a46ea82d08d85949bb48b8c9.tar.gz | |
Remove the "- free space" if status is OK
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1491 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_disk.c')
| -rw-r--r-- | plugins/check_disk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index b9787c89..3c7b0ecf 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
| @@ -153,6 +153,7 @@ main (int argc, char **argv) | |||
| 153 | char *output; | 153 | char *output; |
| 154 | char *details; | 154 | char *details; |
| 155 | char *perf; | 155 | char *perf; |
| 156 | char *preamble; | ||
| 156 | double inode_space_pct; | 157 | double inode_space_pct; |
| 157 | uintmax_t total, available, available_to_root, used; | 158 | uintmax_t total, available, available_to_root, used; |
| 158 | double dfree_pct = -1, dused_pct = -1; | 159 | double dfree_pct = -1, dused_pct = -1; |
| @@ -165,7 +166,8 @@ main (int argc, char **argv) | |||
| 165 | struct parameter_list *temp_list, *path; | 166 | struct parameter_list *temp_list, *path; |
| 166 | struct name_list *seen = NULL; | 167 | struct name_list *seen = NULL; |
| 167 | 168 | ||
| 168 | output = strdup (" - free space:"); | 169 | preamble = strdup (" - free space:"); |
| 170 | output = strdup (""); | ||
| 169 | details = strdup (""); | 171 | details = strdup (""); |
| 170 | perf = strdup (""); | 172 | perf = strdup (""); |
| 171 | 173 | ||
| @@ -323,7 +325,7 @@ main (int argc, char **argv) | |||
| 323 | asprintf (&output, "%s%s", output, details); | 325 | asprintf (&output, "%s%s", output, details); |
| 324 | 326 | ||
| 325 | 327 | ||
| 326 | printf ("DISK %s%s|%s\n", state_text (result), output, perf); | 328 | printf ("DISK %s%s%s|%s\n", state_text (result), (erronly && result==STATE_OK) ? "" : preamble, output, perf); |
| 327 | return result; | 329 | return result; |
| 328 | } | 330 | } |
| 329 | 331 | ||
