-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
247 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
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,46 @@ | ||
version: "3.8" | ||
|
||
networks: | ||
loki: | ||
|
||
services: | ||
loki-test: | ||
image: grafana/loki:2.9.0 | ||
container_name: loki-test | ||
ports: | ||
- "3100:3100" | ||
volumes: | ||
- '$PWD/loki-config-test.yml:/etc/loki/loki-config.yml' | ||
command: -config.file=/etc/loki/loki-config.yml | ||
networks: | ||
- loki | ||
|
||
loki-stage: | ||
image: grafana/loki:2.9.0 | ||
container_name: loki-stage | ||
ports: | ||
- "3200:3100" | ||
volumes: | ||
- '$PWD/loki-config-stage.yml:/etc/loki/loki-config.yml' | ||
command: -config.file=/etc/loki/loki-config.yml | ||
networks: | ||
- loki | ||
|
||
grafana: | ||
image: grafana/grafana:latest | ||
env_file: | ||
- .env | ||
container_name: grafana | ||
restart: unless-stopped | ||
# environment: | ||
# - TERM=linux | ||
# - GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-polystat-panel | ||
ports: | ||
- '3000:3000' | ||
volumes: | ||
- 'grafana_storage:/var/lib/grafana' | ||
- '$PWD/grafana.ini:/etc/grafana/grafana.ini' | ||
networks: | ||
- loki | ||
volumes: | ||
grafana_storage: {} |
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,100 @@ | ||
##################### Grafana Configuration Example ##################### | ||
# | ||
# Everything has defaults so you only need to uncomment things you want to | ||
# change | ||
|
||
# possible values : production, development | ||
;app_mode = production | ||
|
||
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty | ||
;instance_name = ${HOSTNAME} | ||
|
||
# force migration will run migrations that might cause dataloss | ||
# Deprecated, use clean_upgrade option in [unified_alerting.upgrade] instead. | ||
;force_migration = false | ||
;#################################### Server #################################### | ||
[server] | ||
;# Protocol (http, https, h2, socket) | ||
protocol = http | ||
; | ||
;# This is the minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.2, TLS1.3. If nothing is set TLS1.2 would be taken | ||
;;min_tls_version = "" | ||
; | ||
;# The ip address to bind to, empty will bind to all interfaces | ||
;;http_addr = | ||
; | ||
;# The http port to use | ||
;http_port = 443 | ||
; | ||
;# The public facing domain name used to access grafana from a browser | ||
domain = grafana.codedang.com | ||
; | ||
;# Redirect to correct domain if host header does not match domain | ||
;# Prevents DNS rebinding attacks | ||
;enforce_domain = true | ||
; | ||
;# The full public facing url you use in browser, used for redirects and emails | ||
;# If you use reverse proxy and sub path specify full url (with sub path) | ||
root_url = %(protocol)s://%(domain)s | ||
; | ||
;# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. | ||
serve_from_sub_path = true | ||
; | ||
;# Log web requests | ||
;;router_logging = false | ||
; | ||
;# the path relative working path | ||
;;static_root_path = public | ||
; | ||
;# enable gzip | ||
;;enable_gzip = false | ||
; | ||
;# https certs & key file | ||
;;cert_file = | ||
;;cert_key = | ||
; | ||
;# Unix socket gid | ||
;# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner | ||
;# It is recommended to set the gid as http server user gid | ||
;# Not set when the value is -1 | ||
;;socket_gid = | ||
; | ||
;# Unix socket mode | ||
;;socket_mode = | ||
; | ||
;# Unix socket path | ||
;;socket = | ||
; | ||
;# CDN Url | ||
;;cdn_url = | ||
; | ||
;# Sets the maximum time using a duration format (5s/5m/5ms) before timing out read of an incoming request and closing idle connections. | ||
;# `0` means there is no timeout for reading the request. | ||
;;read_timeout = 0 | ||
; | ||
;# This setting enables you to specify additional headers that the server adds to HTTP(S) responses. | ||
;[server.custom_response_headers] | ||
;#exampleHeader1 = exampleValue1 | ||
;#exampleHeader2 = exampleValue2 | ||
; | ||
#################################### SMTP / Emailing ########################## | ||
[smtp] | ||
enabled = true | ||
host = ${GF_STMP_HOST} | ||
user = ${GF_STMP_USER} | ||
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" | ||
password = ${GF_SMTP_PASSWORD} | ||
;cert_file = | ||
;key_file = | ||
;skip_verify = true | ||
from_address = [email protected] | ||
from_name = Grafana | ||
# EHLO identity in SMTP dialog (defaults to instance_name) | ||
;ehlo_identity = dashboard.example.com | ||
# SMTP startTLS policy (defaults to 'OpportunisticStartTLS') | ||
startTLS_policy = MandatoryStartTLS | ||
|
||
;[emails] | ||
;welcome_email_on_sign_up = false | ||
;templates_pattern = emails/*.html, emails/*.txt | ||
;content_types = text/html |
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,50 @@ | ||
auth_enabled: false | ||
|
||
server: | ||
http_listen_port: 3100 | ||
grpc_listen_port: 9096 | ||
|
||
common: | ||
instance_addr: 127.0.0.1 | ||
path_prefix: /tmp/loki | ||
storage: | ||
filesystem: | ||
chunks_directory: /tmp/loki/chunks | ||
rules_directory: /tmp/loki/rules | ||
replication_factor: 1 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
|
||
query_range: | ||
results_cache: | ||
cache: | ||
embedded_cache: | ||
enabled: true | ||
max_size_mb: 100 | ||
|
||
schema_config: | ||
configs: | ||
- from: 2020-10-24 | ||
store: boltdb-shipper | ||
object_store: filesystem | ||
schema: v11 | ||
index: | ||
prefix: index_ | ||
period: 24h | ||
|
||
ruler: | ||
alertmanager_url: http://localhost:9093 | ||
|
||
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration | ||
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ | ||
# | ||
# Statistics help us better understand how Loki is used, and they show us performance | ||
# levels for most users. This helps us prioritize features and documentation. | ||
# For more information on what's sent, look at | ||
# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go | ||
# Refer to the buildReport method to see what goes into a report. | ||
# | ||
# If you would like to disable reporting, uncomment the following lines: | ||
#analytics: | ||
# reporting_enabled: false |
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,50 @@ | ||
auth_enabled: false | ||
|
||
server: | ||
http_listen_port: 3100 | ||
grpc_listen_port: 9096 | ||
|
||
common: | ||
instance_addr: 127.0.0.1 | ||
path_prefix: /tmp/loki | ||
storage: | ||
filesystem: | ||
chunks_directory: /tmp/loki/chunks | ||
rules_directory: /tmp/loki/rules | ||
replication_factor: 1 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
|
||
query_range: | ||
results_cache: | ||
cache: | ||
embedded_cache: | ||
enabled: true | ||
max_size_mb: 100 | ||
|
||
schema_config: | ||
configs: | ||
- from: 2020-10-24 | ||
store: boltdb-shipper | ||
object_store: filesystem | ||
schema: v11 | ||
index: | ||
prefix: index_ | ||
period: 24h | ||
|
||
ruler: | ||
alertmanager_url: http://localhost:9093 | ||
|
||
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration | ||
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ | ||
# | ||
# Statistics help us better understand how Loki is used, and they show us performance | ||
# levels for most users. This helps us prioritize features and documentation. | ||
# For more information on what's sent, look at | ||
# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go | ||
# Refer to the buildReport method to see what goes into a report. | ||
# | ||
# If you would like to disable reporting, uncomment the following lines: | ||
#analytics: | ||
# reporting_enabled: false |