conf/fs.conf
author Eric Renfro <psi-jack@gmail.com>
Fri, 28 Jun 2013 13:27:07 -0400
changeset 23 5d95402f2a3a
parent 16 8dd31c2c72a5
child 27 e8cb759c60b4
permissions -rw-r--r--
Adjusted zabbix key item to be parameterized instead of the whole key.

# Filesystem related parameters

# Returns age of last modification time of file $1
UserParameter=file.age[*],expr `date +%s` - `stat -f %m $1`

# Returns file content
UserParameter=file.content[*],cat $1

# Returns count of files in directory $1
UserParameter=dir.files[*],ls $1|wc -l

# Returns 0 if bzip2 test of file $1 passed.
# Note: can't use just return code ($?) as bzip2 is too forgiving to corrupt archives.
UserParameter=bzip2.test[*],bzip2 -q -t $1 2>&1|wc -l