mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 09:57:09 +00:00
Initial version
This commit is contained in:
parent
a455494981
commit
f6fb7233ed
1 changed files with 36 additions and 0 deletions
36
plugins/other/php-cgi
Executable file
36
plugins/other/php-cgi
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# -*- sh -*-
|
||||||
|
#
|
||||||
|
# Plugin to monitor the number of PHP processes on the machine.
|
||||||
|
#
|
||||||
|
# Copyright Khalid Baheyeldin 2009 http://2bits.com
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
#
|
||||||
|
# config (required)
|
||||||
|
# autoconf (optional - used by munin-config)
|
||||||
|
#
|
||||||
|
# Magick markers (optional - used by munin-config and som installation
|
||||||
|
# scripts):
|
||||||
|
#%# family=manual
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
echo yes
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Number of php-cgi processes'
|
||||||
|
echo 'graph_args --base 1000 -l 0 '
|
||||||
|
echo 'graph_vlabel number of php-cgi processes'
|
||||||
|
echo 'graph_category apache'
|
||||||
|
echo 'graph_info This graph shows the number of php-cgi processes in the system.'
|
||||||
|
echo 'php_processes.label php-cgi'
|
||||||
|
echo 'php_processes.draw LINE2'
|
||||||
|
echo 'php_processes.info The current number of php-cgi processes.'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "php_processes.value "
|
||||||
|
/bin/ps ax | /usr/bin/grep -i php-cgi | /usr/bin/grep -v grep | /usr/bin/wc -l | /usr/bin/sed 's/\t +//' | /usr/bin/sed 's/ *//'
|
Loading…
Add table
Add a link
Reference in a new issue