2014-10-04 19:05:06 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Plugin to monitor the number of Samba locked files on the machine.
|
|
|
|
#
|
|
|
|
# Parameters:
|
|
|
|
#
|
|
|
|
# config (required)
|
|
|
|
# autoconf (optional - used by munin-config)
|
|
|
|
#
|
|
|
|
# $Log$
|
2018-08-02 02:03:42 +02:00
|
|
|
# Revision 1.0 2007/04/16 Jon Higgs
|
|
|
|
# Initial Release - Adapted from jimmyo's processses plugin.
|
2014-10-04 19:05:06 +02:00
|
|
|
#
|
|
|
|
# Magick markers (optional - used by munin-config and som installation
|
|
|
|
# scripts):
|
|
|
|
#%# family=auto
|
|
|
|
#%# capabilities=autoconf
|
|
|
|
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
2018-08-02 02:03:42 +02:00
|
|
|
echo yes
|
2014-10-04 19:05:06 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
|
|
|
|
echo 'graph_title Samba Locked Files'
|
|
|
|
echo 'graph_args --base 1000 -l 0 '
|
2018-08-02 02:03:42 +02:00
|
|
|
echo 'graph_vlabel number of locked files'
|
2017-02-21 22:15:07 +01:00
|
|
|
echo 'graph_category fs'
|
2014-10-04 19:05:06 +02:00
|
|
|
echo 'graph_info This graph shows the number locked Samba Files.'
|
|
|
|
echo 'samba_locked.label Locked Files'
|
|
|
|
echo 'samba_locked.draw LINE2'
|
|
|
|
echo 'samba_locked.info The current number of locked files.'
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "samba_locked.value $(smbstatus -L 2> /dev/null | grep -c DENY_)"
|
|
|
|
|
|
|
|
# If here, always return OK
|
|
|
|
exit 0
|