-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/metrics #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Emil1483
wants to merge
14
commits into
main
Choose a base branch
from
feat/metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/metrics #521
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ffe647d
add grafana
Emil1483 d55d723
add .well-known
Emil1483 e920e15
move .well-known to http block
Emil1483 4daad73
move well known to 443 block
Emil1483 f3029c7
add config files for mimir and postfix
Emil1483 8095665
remove rules directory
Emil1483 eb8af61
disable ruler
Emil1483 b17522e
fix loki
Emil1483 d9732f9
fix loki
Emil1483 49f2cb2
fix loki by making him root
Emil1483 e5cce4c
update nginx config
Emil1483 dbe1ca1
update default.conf
Emil1483 d4b8514
add basic auth
Emil1483 b319e64
Merge branch 'main' into feat/metrics
Emil1483 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,33 @@ | ||
| auth_enabled: false | ||
|
|
||
| server: | ||
| http_listen_port: 3100 | ||
| grpc_listen_port: 9096 | ||
|
|
||
| common: | ||
| instance_addr: 127.0.0.1 | ||
| path_prefix: /data/loki | ||
| storage: | ||
| filesystem: | ||
| chunks_directory: /data/loki/chunks | ||
| replication_factor: 1 | ||
| ring: | ||
| kvstore: | ||
| store: inmemory | ||
|
|
||
| ruler: | ||
| storage: | ||
| type: local | ||
| local: | ||
| directory: /tmp/loki-rules | ||
|
|
||
| schema_config: | ||
| configs: | ||
| - from: 2020-10-24 | ||
| store: tsdb | ||
| object_store: filesystem | ||
| schema: v13 | ||
| index: | ||
| prefix: index_ | ||
| period: 24h | ||
|
|
This file contains hidden or 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,26 @@ | ||
| target: all | ||
|
|
||
| server: | ||
| http_listen_port: 9009 | ||
| grpc_listen_port: 9095 | ||
|
|
||
| ingester: | ||
| ring: | ||
| instance_addr: 127.0.0.1 | ||
| kvstore: | ||
| store: inmemory | ||
| replication_factor: 1 | ||
|
|
||
| blocks_storage: | ||
| backend: filesystem | ||
| filesystem: | ||
| dir: /data/mimir/blocks | ||
| tsdb: | ||
| dir: /data/mimir/tsdb | ||
|
|
||
| compactor: | ||
| data_dir: /data/mimir/compactor | ||
|
|
||
| store_gateway: | ||
| sharding_ring: | ||
| replication_factor: 1 |
This file contains hidden or 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 @@ | ||
| remote_writer:$apr1$baokJMMP$NH1P3Xbin2H9GqtJ8IZL2/ | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -3,6 +3,107 @@ upstream backend { | |
| server ${PROXY_PASS}; | ||
| } | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name grafana.metrics.sctomega.com; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider moving |
||
| return 301 https://$host$request_uri; | ||
| } | ||
|
|
||
| server { | ||
| listen 443 ssl; | ||
| server_name grafana.metrics.sctomega.com; | ||
|
|
||
| ssl_certificate /etc/letsencrypt/live/grafana.metrics.sctomega.com/fullchain.pem; | ||
| ssl_certificate_key /etc/letsencrypt/live/grafana.metrics.sctomega.com/privkey.pem; | ||
|
|
||
| ssl_protocols TLSv1.1 TLSv1.2; | ||
| ssl_prefer_server_ciphers on; | ||
| ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5; | ||
|
|
||
| add_header Strict-Transport-Security "max-age=31536000" always; | ||
|
|
||
| location ^~ /.well-known/acme-challenge/ { | ||
| alias /var/www/certbot/.well-known/acme-challenge/; | ||
| } | ||
|
|
||
| location / { | ||
| proxy_pass http://grafana:3000/; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Connection 'upgrade'; | ||
| proxy_set_header Upgrade $http_upgrade; | ||
| proxy_set_header Host $host; | ||
| proxy_cache_bypass $http_upgrade; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name mimir.metrics.sctomega.com; | ||
| return 301 https://$host$request_uri; | ||
| } | ||
|
|
||
| server { | ||
| listen 443 ssl; | ||
| server_name mimir.metrics.sctomega.com; | ||
|
|
||
| ssl_certificate /etc/letsencrypt/live/mimir.metrics.sctomega.com/fullchain.pem; | ||
| ssl_certificate_key /etc/letsencrypt/live/mimir.metrics.sctomega.com/privkey.pem; | ||
|
|
||
| ssl_protocols TLSv1.1 TLSv1.2; | ||
| ssl_prefer_server_ciphers on; | ||
| ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5; | ||
|
|
||
| add_header Strict-Transport-Security "max-age=31536000" always; | ||
| auth_basic "Restricted"; | ||
| auth_basic_user_file /etc/nginx/auth/metrics.htpasswd; | ||
|
|
||
| location ^~ /.well-known/acme-challenge/ { | ||
| alias /var/www/certbot/.well-known/acme-challenge/; | ||
| } | ||
|
|
||
| location / { | ||
| proxy_pass http://mimir:9009; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto https; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name loki.metrics.sctomega.com; | ||
| return 301 https://$host$request_uri; | ||
| } | ||
|
|
||
| server { | ||
| listen 443 ssl; | ||
| server_name loki.metrics.sctomega.com; | ||
|
|
||
| ssl_certificate /etc/letsencrypt/live/loki.metrics.sctomega.com/fullchain.pem; | ||
| ssl_certificate_key /etc/letsencrypt/live/loki.metrics.sctomega.com/privkey.pem; | ||
|
|
||
| ssl_protocols TLSv1.1 TLSv1.2; | ||
| ssl_prefer_server_ciphers on; | ||
| ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5; | ||
|
|
||
| add_header Strict-Transport-Security "max-age=31536000" always; | ||
| auth_basic "Restricted"; | ||
| auth_basic_user_file /etc/nginx/auth/metrics.htpasswd; | ||
|
|
||
| location ^~ /.well-known/acme-challenge/ { | ||
| alias /var/www/certbot/.well-known/acme-challenge/; | ||
| } | ||
|
|
||
| location / { | ||
| proxy_pass http://loki:3100; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto https; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name ${DOMAIN}; | ||
|
|
||
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
.htpasswdto.gitignoreand document how to generate it in the README.