php-fpm.sh

This commit is contained in:
netkiller
2016-11-25 10:45:06 +08:00
parent a39dfe1323
commit cc24860a30
7 changed files with 805 additions and 10 deletions

23
php-fpm/php-fpm.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
##################################################
# AUTHOR: Neo <netkiller@msn.com>
# WEBSITE: http://www.netkiller.cn
# Descriptionzabbix 通过 status 模块监控 php-fpm
# NoteZabbix 3.2
# DateTime: 2016-11-22
##################################################
HOST="localhost"
PORT="80"
status="status"
function query() {
curl -s http://${HOST}:${PORT}/${status} | grep "$1" | cut -d : -f 2 | awk '{print $1}'
}
if [ $# == 0 ]; then
echo $"Usage $0 {check|active|accepts|handled|requests|reading|writing|waiting}"
exit
else
query "$1"
fi