Projet

Général

Profil

Révision deefb86c

IDdeefb86c60034589a6ff08ec8c69573555409122
Parent 8f0e3e45
Enfant 47f443a1

Ajouté par Jon Higgs il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/samba_users
1
#!/bin/sh
2
#
3
# Plugin to monitor the number of Samba users on the machine.
4
#
5
# Parameters:
6
#
7
# 	config   (required)
8
# 	autoconf (optional - used by munin-config)
9
#
10
# $Log$
11
# Revision 1.0  2007/04/16  Jon Higgs 
12
# Initial Release - Adapated from jimmyo's processses plugin. 
13
#
14
# Magick markers (optional - used by munin-config and som installation
15
# scripts):
16
#%# family=auto
17
#%# capabilities=autoconf
18

  
19
if [ "$1" = "autoconf" ]; then
20
	echo yes 
21
	exit 0
22
fi
23

  
24
if [ "$1" = "config" ]; then
25

  
26
	echo 'graph_title Samba Users'
27
	echo 'graph_args --base 1000 -l 0 '
28
	echo 'graph_vlabel number of Samba users.' 
29
	echo 'graph_category Samba'
30
	echo 'graph_info This graph shows the number Samba users.'
31
	echo 'samba_users.label Samba Users'
32
	echo 'samba_users.draw LINE2'
33
	echo 'samba_users.info The current number of Samba users.'
34
	exit 0
35
fi
36

  
37
echo -n "samba_users.value "
38
smbstatus -b 2> /dev/null | grep -c -v -e "^Samba" -e "^---" -e "^PID" -e ^$

Formats disponibles : Unified diff