Table of Contents
Check writable filesystem
Script: check_fs_writable
check_fs_writebale checks in the given directories a file can be touched. The response is critical of one of the directory is not writable for the icinga client user.
Requirements
(none)
Standalone installation
From this repository ypu need next to this script:
-
inc_pluginfunctions
shared function for all IML checks written in bash
Syntax
./check_fs_writable -h
______________________________________________________________________
CHECK_FS_WRITABLE
v1.2
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Check if a filesystem is readonly in given directories.
In each of the given directories a random file will be touched.
The response is critical of one of the directory is not writable
for the icinga client user.
SYNTAX:
check_fs_writable [directory [more directories]]
OPTIONS:
-h or --help show this help.
PARAMETERS:
DIRECTORY where to touch a temporary file
default directories:
/tmp /var/tmp
EXAMPLE:
check_fs_writable /tmp /root /var/www
Parameters
Add directories to check. Set a directory that is writable for world or prepared to be accessible for the icinga user.
Examples
$ check_fs_writable
returns
OK: check if filesystem is writable in /tmp /var/tmp
--- touching something into /tmp
-rw-r--r-- 1 axel axel 0 27. Jul 16:00 /tmp/icinga_touch_testfile__7749_15502
--- touching something into /var/tmp
-rw-r--r-- 1 axel axel 0 27. Jul 16:00 /var/tmp/icinga_touch_testfile__30551_11189