• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Resolved How to monitor NGINX stats with Zabbix on Plesk?

dengolius

New Pleskian
Last edited:
It is 3:30am for me and still have to go to sleep...
The answer to you question is quite easy, it's this:

cat /etc/nginx/conf.d/ww010_zabbix.conf
Code:
server {
    listen localhost:61709;

    location / {
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        deny all;
    }
}

I prefer to have it listening only on localhost as it's only needed there.

But putting it through some tests I noticed some flaws
The userparameters for most are incorrect (maybe they were correct 5 years ago). The first one is correct.
Not that difficult to sort out, but will do that tomorrow.

I see no need to pass the address and portnumber, just have it fixed in the zabbix_agentd.conf

The "double-dollar" is incorrect. It would mean the 2nd parameter and you want its literal value there. Also rewrote the cryptic awk (may well have been correct beside the double dollar)

Code:
# NginX Keys
UserParameter=nginx.active,wget -O- -q localhost:61709 | awk '/^Active/ {print $NF}'
UserParameter=nginx.reading,wget -O- -q localhost:61709 | awk '/^Reading/ {print $2}'
UserParameter=nginx.writing,wget -O- -q localhost:61709 | awk '/^Reading/ {print $4}'
UserParameter=nginx.waiting,wget -O- -q localhost:61709 | awk '/^Reading/ {print $6}'
UserParameter=nginx.accepted,wget -O- -q localhost:61709 | grep -A1 '^server' | tail -n1 | awk '{print $1}'
UserParameter=nginx.handled,wget -O- -q localhost:61709 | grep -A1 '^server' | tail -n1 | awk '{print $2}'
UserParameter=nginx.requests,wget -O- -q localhost:61709 | grep -A1 '^server' | tail -n1 | awk '{print $3}'

I have an XML as well and it's working...
Having more trouble uploading it than creating it...
Do that tomorrow
 
Last edited:
Back
Top