We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey,
thanks for your scripts, very usefull :)
On the php-fpm-check.sh I've got several issues, the command line and the pipe using awk does not resolve. Here is how I manage to quickly solve it :
removed : RESULT=$(echo "$NGINX_STATS" | awk 'match($0, "^'"$ZBX_REQ_DATA"':[[:space:]]+(.*)", a) { print a[1] }') if [ $? -ne 0 -o -z "$RESULT" ]; then echo $ERROR_WRONG_PARAM exit 1 fi
echo $RESULT
added: case $ZBX_REQ_DATA in 'accepted conn') echo "$NGINX_STATS" | grep '^accepted conn:' | cut -f2 -d ':' | sed 's/\s//g';; 'active processes') echo "$NGINX_STATS" | grep '^active processes:' | cut -f2 -d ':' | sed 's/\s//g';; 'idle processes') echo "$NGINX_STATS" | grep '^idle processes:' | cut -f2 -d ':' | sed 's/\s//g';; 'listen queue len') echo "$NGINX_STATS" | grep '^listen queue len:' | cut -f2 -d ':' | sed 's/\s//g';; 'listen queue') echo "$NGINX_STATS" | grep '^listen queue:' | cut -f2 -d ':' | sed 's/\s//g';; 'max active processes') echo "$NGINX_STATS" | grep '^max active processes:' | cut -f2 -d ':' | sed 's/\s//g';; 'max children reached') echo "$NGINX_STATS" | grep '^max children reached:' | cut -f2 -d ':' | sed 's/\s//g';; 'max listen queue') echo "$NGINX_STATS" | grep '^max listen queue:' | cut -f2 -d ':' | sed 's/\s//g';; 'total processes') echo "$NGINX_STATS" | grep '^active processes:' | cut -f2 -d ':' | sed 's/\s//g';; *) echo $ERROR_WRONG_PARAM; exit 1;; esac
on the template there is also a trace of slow-queries in the php-fpm template from mysql I think :)
The text was updated successfully, but these errors were encountered:
Got this error too, I tried to fix the awk but I came across this approach (https://github.com/zbal/zabbix/blob/master/scripts/zabbix_nginx_check.sh).
Thanks
Sorry, something went wrong.
(for debian/ubuntu) apt-get install gawk
and change the line S" | awk 'match( to S" | gawk 'match(
No branches or pull requests
Hey,
thanks for your scripts, very usefull :)
On the php-fpm-check.sh I've got several issues, the command line and the pipe using awk does not resolve. Here is how I manage to quickly solve it :
removed :
RESULT=$(echo "$NGINX_STATS" | awk 'match($0, "^'"$ZBX_REQ_DATA"':[[:space:]]+(.*)", a) { print a[1] }')
if [ $? -ne 0 -o -z "$RESULT" ]; then
echo $ERROR_WRONG_PARAM
exit 1
fi
echo $RESULT
added:
case $ZBX_REQ_DATA in
'accepted conn') echo "$NGINX_STATS" | grep '^accepted conn:' | cut -f2 -d ':' | sed 's/\s//g';;
'active processes') echo "$NGINX_STATS" | grep '^active processes:' | cut -f2 -d ':' | sed 's/\s//g';;
'idle processes') echo "$NGINX_STATS" | grep '^idle processes:' | cut -f2 -d ':' | sed 's/\s//g';;
'listen queue len') echo "$NGINX_STATS" | grep '^listen queue len:' | cut -f2 -d ':' | sed 's/\s//g';;
'listen queue') echo "$NGINX_STATS" | grep '^listen queue:' | cut -f2 -d ':' | sed 's/\s//g';;
'max active processes') echo "$NGINX_STATS" | grep '^max active processes:' | cut -f2 -d ':' | sed 's/\s//g';;
'max children reached') echo "$NGINX_STATS" | grep '^max children reached:' | cut -f2 -d ':' | sed 's/\s//g';;
'max listen queue') echo "$NGINX_STATS" | grep '^max listen queue:' | cut -f2 -d ':' | sed 's/\s//g';;
'total processes') echo "$NGINX_STATS" | grep '^active processes:' | cut -f2 -d ':' | sed 's/\s//g';;
*) echo $ERROR_WRONG_PARAM; exit 1;;
esac
on the template there is also a trace of slow-queries in the php-fpm template from mysql I think :)
The text was updated successfully, but these errors were encountered: