diff options
Diffstat (limited to 'plugins/check_disk.d/config.h')
| -rw-r--r-- | plugins/check_disk.d/config.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/plugins/check_disk.d/config.h b/plugins/check_disk.d/config.h new file mode 100644 index 00000000..d890fc1a --- /dev/null +++ b/plugins/check_disk.d/config.h | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../config.h" | ||
| 4 | #include <stddef.h> | ||
| 5 | #include <stdint.h> | ||
| 6 | |||
| 7 | typedef struct { | ||
| 8 | // Output options | ||
| 9 | bool erronly; | ||
| 10 | bool display_mntp; | ||
| 11 | /* show only local filesystems. */ | ||
| 12 | bool show_local_fs; | ||
| 13 | /* show only local filesystems but call stat() on remote ones. */ | ||
| 14 | bool stat_remote_fs; | ||
| 15 | bool display_inodes_perfdata; | ||
| 16 | |||
| 17 | bool exact_match; | ||
| 18 | bool ignore_missing; | ||
| 19 | bool path_ignored; | ||
| 20 | bool path_selected; | ||
| 21 | bool freespace_ignore_reserved; | ||
| 22 | |||
| 23 | char *warn_freespace_units; | ||
| 24 | char *crit_freespace_units; | ||
| 25 | char *warn_freespace_percent; | ||
| 26 | char *crit_freespace_percent; | ||
| 27 | char *warn_usedspace_units; | ||
| 28 | char *crit_usedspace_units; | ||
| 29 | char *warn_usedspace_percent; | ||
| 30 | char *crit_usedspace_percent; | ||
| 31 | char *warn_usedinodes_percent; | ||
| 32 | char *crit_usedinodes_percent; | ||
| 33 | char *warn_freeinodes_percent; | ||
| 34 | char *crit_freeinodes_percent; | ||
| 35 | |||
| 36 | /* Linked list of filesystem types to omit. | ||
| 37 | If the list is empty, don't exclude any types. */ | ||
| 38 | struct regex_list *fs_exclude_list; | ||
| 39 | /* Linked list of filesystem types to check. | ||
| 40 | If the list is empty, include all types. */ | ||
| 41 | struct regex_list *fs_include_list; | ||
| 42 | struct name_list *device_path_exclude_list; | ||
| 43 | struct parameter_list *path_select_list; | ||
| 44 | /* Linked list of mounted filesystems. */ | ||
| 45 | struct mount_entry *mount_list; | ||
| 46 | struct name_list *seen; | ||
| 47 | |||
| 48 | char *units; | ||
| 49 | uintmax_t mult; | ||
| 50 | char *group; | ||
| 51 | } check_disk_config; | ||
| 52 | |||
| 53 | check_disk_config check_disk_config_init() { | ||
| 54 | check_disk_config tmp = { | ||
| 55 | .erronly = false, | ||
| 56 | .display_mntp = false, | ||
| 57 | .show_local_fs = false, | ||
| 58 | .stat_remote_fs = false, | ||
| 59 | .display_inodes_perfdata = false, | ||
| 60 | |||
| 61 | .exact_match = false, | ||
| 62 | .ignore_missing = false, | ||
| 63 | .path_ignored = false, | ||
| 64 | .path_selected = false, | ||
| 65 | .freespace_ignore_reserved = false, | ||
| 66 | |||
| 67 | .warn_freespace_units = NULL, | ||
| 68 | .crit_freespace_units = NULL, | ||
| 69 | .warn_freespace_percent = NULL, | ||
| 70 | .crit_freespace_percent = NULL, | ||
| 71 | .warn_usedspace_units = NULL, | ||
| 72 | .crit_usedspace_units = NULL, | ||
| 73 | .warn_usedspace_percent = NULL, | ||
| 74 | .crit_usedspace_percent = NULL, | ||
| 75 | .warn_usedinodes_percent = NULL, | ||
| 76 | .crit_usedinodes_percent = NULL, | ||
| 77 | .warn_freeinodes_percent = NULL, | ||
| 78 | .crit_freeinodes_percent = NULL, | ||
| 79 | |||
| 80 | .fs_exclude_list = NULL, | ||
| 81 | .fs_include_list = NULL, | ||
| 82 | .device_path_exclude_list = NULL, | ||
| 83 | .path_select_list = NULL, | ||
| 84 | .mount_list = NULL, | ||
| 85 | .seen = NULL, | ||
| 86 | |||
| 87 | .units = NULL, | ||
| 88 | .mult = 1024 * 1024, | ||
| 89 | .group = NULL, | ||
| 90 | }; | ||
| 91 | return tmp; | ||
| 92 | } | ||
