Nginx-status page

Hi ,
I try grab nginx-status page for metricbeat .
here my nginx config

[spoiler]cat /etc/nginx/conf.d/xxxxxxxx.conf
server {
listen 80 default_server;
server_name xxxxxx;

if ($http_x_forwarded_proto = 'http') {

return 301 https://$server_name$request_uri;


real_ip_header X-Forwarded-For;
set_real_ip_from 172.xx.0.0/16;

root /home/fedora/webserver/deploy;

index index.html;

location / {

try_files $uri $uri/ =404;

  proxy_pass http://localhost:3001;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection 'upgrade';
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_cache_bypass $http_upgrade;

server {
location /nginx_status {
stub_status on;
access_log off;
deny all;

cat /etc/metricbeat/modules.d/nginx.yml

  • module: nginx
    enabled: true
    metricsets: ["stubstatus"]
    period: 10s

    Nginx hosts

    hosts: [""]

    Path to server status. Default server-status

    server_status_path: "nginx-status"

I try grab with curl
#curl localhost/nginx-status
#cat /var/log/nginx/access.log
# - - [26/Jul/2018:10:32:05 +0000] "GET /nginx-status HTTP/1.1" 200 790 "-" "Go-http-client/1.1"
#nginx -V 2>&1 | grep -o with-http_stub_status_module

so where I can check the error

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.