Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / apache / apache_servers @ 17f78427

Historique | Voir | Annoter | Télécharger (1 ko)

1
#!/bin/sh
2
# -*- sh -*-
3

    
4
: << =cut
5

    
6
=head1 NAME
7

    
8
apache_servers -Indicate the number of apache servers running (child process)
9

    
10
=head1 CONFIGURATION
11

    
12
[apache_*]
13
env.apuser user_runnin_apache
14
env.binname apache_binary_name
15

    
16
=head1 AUTHOR
17

    
18
Ricardo Fraile <rfrail3@yahoo.es>
19

    
20
=head1 LICENSE
21

    
22
GPLv2
23

    
24
=head1 MAGICK MARKERS
25

    
26
 #%# family=auto
27
 #%# capabilities=autoconf
28

    
29
=cut
30

    
31
. $MUNIN_LIBDIR/plugins/plugin.sh
32

    
33
USR=$apuser
34
PROCS=$binname
35

    
36
if [ "$1" = "autoconf" ]; then
37
	echo yes
38
	exit 0
39
fi
40

    
41
if [ "$1" = "config" ]; then
42

    
43
	echo 'graph_title Number of apache servers running.'
44
	echo 'graph_args --base 1000 -l 0 '
45
	echo 'graph_vlabel servers'
46
	echo 'graph_scale no'
47
	echo 'graph_category webserver'
48
	echo 'graph_info Indicate the number of apache servers running (child process).'
49

    
50

    
51

    
52
        echo "servers.label servers"
53
        echo "servers.type GAUGE"
54
        echo "servers.min 0"
55
        echo "servers.info I/O on nfs"
56

    
57
	exit 0
58
fi
59

    
60
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
61

    
62
echo "servers.value $VAL1"
63

    
64