I suppose some of you have ever considered an alternative to samba user
management using simpler, plain samba share approach under pptp secured
networking to provide control...
This is something quite usual here... so I have had to put such scenario
on, just to find the lack of munin plugins to monitor all this...
So I have first dealt with pptpd munin plugin, and now, on samba side, I
see we do already have nice user and lock plugins.... but we do not have
a shares connections control plugin
So, since the same shell command `smbstatus` used on existing plugins do
provide enough power to perform the task just by issuing different
parameters, I modified samba_users plugin to summon a new samba_shares
As allways, being a coding grunt, I suppose it has to be somewhere
polished... for me, it simply works... so I share.
Here we go!
# Plugin to monitor the number of Samba connections on Shares on the
# config (required)
# autoconf (optional - used by munin-config)
# Revision 1.0 2007/04/16 Jon Higgs
# Initial Release - Adapated from jimmyo's processses plugin.
# Magick markers (optional - used by munin-config and som installation
if [ "$1" = "autoconf" ]; then
if [ "$1" = "config" ]; then
echo 'graph_title Samba Share connections'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel number of Samba Shares connections.'
echo 'graph_category Samba'
echo 'graph_info This graph shows the number Samba Shares connections.'
echo 'samba_shares.label Samba Shares'
echo 'samba_shares.draw LINE2'
echo 'samba_shares.info The current number of Samba Shares
echo -n "samba_shares.value "
smbstatus -S 2> /dev/null | grep -c -v -e "^Service" -e "^---" -e ^$
Get latest updates about Open Source Projects, Conferences and News.