check_mount
Checks the status for a mounted filesystem
Implementation
| Windows | Linux | FreeBSD | MacOSX |
|---|
| ✅ | ✅ | ✅ | ✅ |
Argument Defaults
| Argument | Default Value |
|---|
| warning | issues != '' |
| critical | issues like ’not mounted' |
| empty-state | 3 (UNKNOWN) |
| empty-syntax | check_mount failed to find anything with this filter. |
| top-syntax | %(status) - %(problem_list) |
| ok-syntax | %(status) - %(count) mount(s) found |
| detail-syntax | mount %(mount) %(issues) |
Check Specific Arguments
| Argument | Description |
|---|
| fstype | The fstype to expect |
| mount | The mount point to check |
| options | The mount options to expect |
Attributes
Filter Keywords
these can be used in filters and thresholds (along with the default attributes):
| Attribute | Description |
|---|
| mount | Path of mounted folder |
| options | Mount options |
| device | Device of this mount |
| fstype | FS type for this mount |
| issues | Issues found |
Examples
Default Check
check_mount mount=/ options=rw,relatime fstype=ext4
OK - 1 mount(s) found
check_mount mount=X:
CRITICAL - mount X: not mounted
Example using check_snclient and Naemon
Naemon Config
define command{
command_name check_snclient
command_line $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}
define service {
host_name testhost
service_description check_mount
use generic-service
check_command check_snclient!check_mount!'mount=/' 'options=rw,relatime'
}