Hey all.
I am currently setting up Nginx monitoring on Zabbix and have almost got it working after a few hours.
There is only one problem left. It seems that zabbix is receiving incorrect values from the agent:
Here are my UserParameters:
As you can see, it seems like the userparamterer command is not parsed completely. It seems to be missing the last part: "awk '{print $3}'" which basically is the part filtering the output. (example: 17 17 17 => 17)
I am currently looking for a different command to filter the output, possiby regex or something similar. Will update post if I find a solution.
If you are familiar with this problem or know a quick fix for it, please let me know.
Thank you,
Alcheemy
I am currently setting up Nginx monitoring on Zabbix and have almost got it working after a few hours.
There is only one problem left. It seems that zabbix is receiving incorrect values from the agent:

Here are my UserParameters:
# NginX Keys
UserParameter=nginx.active[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Active' | awk '{print $NF}'
UserParameter=nginx.reading[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Reading' | awk '{print $2}'
UserParameter=nginx.writing[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Writing' | awk '{print $4}'
UserParameter=nginx.waiting[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Waiting' | awk '{print $6}'
UserParameter=nginx.accepted[*],wget -O- -q "http://localhost:80/nginx_status" | awk NR==3 | awk '{print $1}'
UserParameter=nginx.handled[*],wget -O- -q "http://localhost:80/nginx_status" | awk NR==3 | awk '{print $2}'
UserParameter=nginx.requests[*],wget -O- -q "http://localhost:80/nginx_status" | awk NR==3 | awk '{print $3}'
UserParameter=nginx.active[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Active' | awk '{print $NF}'
UserParameter=nginx.reading[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Reading' | awk '{print $2}'
UserParameter=nginx.writing[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Writing' | awk '{print $4}'
UserParameter=nginx.waiting[*],wget -O- -q "http://localhost:80/nginx_status" | grep 'Waiting' | awk '{print $6}'
UserParameter=nginx.accepted[*],wget -O- -q "http://localhost:80/nginx_status" | awk NR==3 | awk '{print $1}'
UserParameter=nginx.handled[*],wget -O- -q "http://localhost:80/nginx_status" | awk NR==3 | awk '{print $2}'
UserParameter=nginx.requests[*],wget -O- -q "http://localhost:80/nginx_status" | awk NR==3 | awk '{print $3}'
As you can see, it seems like the userparamterer command is not parsed completely. It seems to be missing the last part: "awk '{print $3}'" which basically is the part filtering the output. (example: 17 17 17 => 17)
I am currently looking for a different command to filter the output, possiby regex or something similar. Will update post if I find a solution.
If you are familiar with this problem or know a quick fix for it, please let me know.
Thank you,
Alcheemy
Comment