Skip to content

Commit

Permalink
Change default value for server_status_path in nginx module (#26642)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1af44b0)
  • Loading branch information
marc-gr authored and mergify-bot committed Aug 2, 2021
1 parent f870bea commit 6e5d1f1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,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*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/nginx/_meta/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
4 changes: 2 additions & 2 deletions metricbeat/module/nginx/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion metricbeat/module/nginx/_meta/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ http {
listen 80;
server_name localhost;

location /server-status {
location /nginx_status {
stub_status on;
}
}
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/nginx/stubstatus/stubstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/modules.d/nginx.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 6e5d1f1

Please sign in to comment.