Created
January 28, 2022 18:18
-
-
Save trevorwhitney/2cb36627e7b4e939b80c6c3c9bd12a75 to your computer and use it in GitHub Desktop.
nginx conf for loki simple scalable deployment
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
server { | |
listen 8080; | |
location = / { | |
return 200 'OK'; | |
auth_basic off; | |
} | |
location = /api/prom/push { | |
proxy_pass http://<WRITE_IP>:3100$request_uri; | |
} | |
location = /api/prom/tail { | |
proxy_pass http://<READ_IP>:3100$request_uri; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
location ~ /api/prom/.* { | |
proxy_pass http://<READ_IP>:3100$request_uri; | |
} | |
location = /loki/api/v1/push { | |
proxy_pass http://<WRITE_IP>:3100$request_uri; | |
} | |
location = /loki/api/v1/tail { | |
proxy_pass http://<READ_IP>:3100$request_uri; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
location ~ /loki/api/.* { | |
proxy_pass http://<READ_IP>:3100$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment