mirror of
https://github.com/aljazceru/zabbix.git
synced 2025-12-17 14:24:22 +01:00
23 lines
724 B
Bash
23 lines
724 B
Bash
#!/bin/bash
|
||
##################################################
|
||
# AUTHOR: Neo <netkiller@msn.com>
|
||
# WEBSITE: http://www.netkiller.cn
|
||
# Description:zabbix 通过 status 模块监控 php-fpm
|
||
# Note:Zabbix 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 \"{pool|process manager|start time|start since|accepted conn|listen queue|max listen queue|listen queue len|idle processes|active processes|total processes|max active processes|max children reached|slow requests}\""
|
||
exit
|
||
else
|
||
query "$1"
|
||
fi |