From 1af44b07f9e99d43949ddc0e8c2034a55e07a39a Mon Sep 17 00:00:00 2001 From: Marc Guasch Date: Mon, 2 Aug 2021 16:03:56 +0200 Subject: [PATCH] Change default value for server_status_path in nginx module (#26642) --- CHANGELOG.next.asciidoc | 1 + metricbeat/module/nginx/_meta/Dockerfile | 2 +- metricbeat/module/nginx/_meta/config.yml | 4 ++-- metricbeat/module/nginx/_meta/nginx.conf | 2 +- metricbeat/module/nginx/stubstatus/stubstatus.go | 2 +- metricbeat/modules.d/nginx.yml.disabled | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a4294bf27ac..82291885b32 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -515,6 +515,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix aws metric tags with resourcegroupstaggingapi paginator. {issue}26385[26385] {pull}26443[26443] - Fix quoting in GCP billing table name {issue}26855[26855] {pull}26870[26870] - Allow metric prefix override per service in gcp module. {pull}26960[26960] +- Change `server_status_path` default setting to `nginx_status` for the `nginx` module. {pull}26642[26642] *Packetbeat* diff --git a/metricbeat/module/nginx/_meta/Dockerfile b/metricbeat/module/nginx/_meta/Dockerfile index 19a65b1965f..32b4cbc57db 100755 --- a/metricbeat/module/nginx/_meta/Dockerfile +++ b/metricbeat/module/nginx/_meta/Dockerfile @@ -2,5 +2,5 @@ ARG NGINX_VERSION FROM nginx:${NGINX_VERSION} RUN sed -i "/jessie-updates/d" /etc/apt/sources.list RUN apt-get update && apt-get install -y curl -HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost/server-status +HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost/nginx_status COPY ./nginx.conf /etc/nginx/ diff --git a/metricbeat/module/nginx/_meta/config.yml b/metricbeat/module/nginx/_meta/config.yml index 7d28f226e12..e6fb2c0a285 100644 --- a/metricbeat/module/nginx/_meta/config.yml +++ b/metricbeat/module/nginx/_meta/config.yml @@ -6,8 +6,8 @@ # Nginx hosts hosts: ["http://127.0.0.1"] - # Path to server status. Default server-status - #server_status_path: "server-status" + # Path to server status. Default nginx_status + #server_status_path: "nginx_status" #username: "user" #password: "secret" diff --git a/metricbeat/module/nginx/_meta/nginx.conf b/metricbeat/module/nginx/_meta/nginx.conf index d4b87304f2f..6df6637bc91 100755 --- a/metricbeat/module/nginx/_meta/nginx.conf +++ b/metricbeat/module/nginx/_meta/nginx.conf @@ -24,7 +24,7 @@ http { listen 80; server_name localhost; - location /server-status { + location /nginx_status { stub_status on; } } diff --git a/metricbeat/module/nginx/stubstatus/stubstatus.go b/metricbeat/module/nginx/stubstatus/stubstatus.go index e9696b97166..919dd74052e 100644 --- a/metricbeat/module/nginx/stubstatus/stubstatus.go +++ b/metricbeat/module/nginx/stubstatus/stubstatus.go @@ -33,7 +33,7 @@ const ( defaultScheme = "http" // defaultPath is the default path to the ngx_http_stub_status_module endpoint on Nginx. - defaultPath = "/server-status" + defaultPath = "/nginx_status" ) var ( diff --git a/metricbeat/modules.d/nginx.yml.disabled b/metricbeat/modules.d/nginx.yml.disabled index d9833114e65..786cc90edd6 100644 --- a/metricbeat/modules.d/nginx.yml.disabled +++ b/metricbeat/modules.d/nginx.yml.disabled @@ -9,8 +9,8 @@ # Nginx hosts hosts: ["http://127.0.0.1"] - # Path to server status. Default server-status - #server_status_path: "server-status" + # Path to server status. Default nginx_status + #server_status_path: "nginx_status" #username: "user" #password: "secret"