-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for using nginx as a reverse proxy for prometheus_proxy (#85
- Loading branch information
Showing
27 changed files
with
206 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION=1.14.2 | ||
VERSION=1.15.0-b1 | ||
|
||
default: versioncheck | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM nginx | ||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
EXPOSE 50440 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
server { | ||
# 50440 is the agent.proxy.port value | ||
listen 50440 http2; | ||
|
||
# Prevent nginx from closing the gRPC connections (not working for me) | ||
# https://stackoverflow.com/questions/67430437/grpc-send-timeout-doesnt-work-nginx-closes-grpc-streams-unexpectedly | ||
client_header_timeout 1d; | ||
client_body_timeout 1d; | ||
|
||
location / { | ||
# The nginx gRPX options: https://nginx.org/en/docs/http/ngx_http_grpc_module.html | ||
# 50051 is the proxy.agent.port value | ||
grpc_pass grpc://alta.lan:50051; | ||
grpc_socket_keepalive on; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker build -t pambrose/nginx2 . | ||
docker run --rm -p 50440:50440 pambrose/nginx2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
proxy { | ||
# Required for use with nginx reverse proxy | ||
transportFilterDisabled = true | ||
} | ||
|
||
agent { | ||
# Required for use with nginx reverse proxy | ||
transportFilterDisabled = true | ||
|
||
proxy { | ||
# nginx http2 port specified in nginx.conf | ||
port = 50440 | ||
} | ||
|
||
pathConfigs: [ | ||
{ | ||
name: "App1 metrics" | ||
path: app1_metrics | ||
url: "http://localhost:8082/metrics" | ||
}, | ||
{ | ||
name: "App2 metrics" | ||
path: app2_metrics | ||
url: "http://app2.local:9100/metrics" | ||
}, | ||
{ | ||
name: "App3 metrics" | ||
path: app3_metrics | ||
url: "http://app3.local:9100/metrics" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.