-
Notifications
You must be signed in to change notification settings - Fork 0
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
9 changed files
with
149 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
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,12 @@ | ||
FROM grafana/grafana:latest | ||
|
||
# 设置时区 | ||
ENV TZ=Asia/Shanghai | ||
|
||
# 设置默认管理员账号密码 | ||
ENV GF_SECURITY_ADMIN_USER=admin \ | ||
Check warning on line 7 in compose/production/grafana/Dockerfile GitHub Actions / build-and-push (grafana, ., ./compose/production/grafana/Dockerfile, linux/amd64,linux/arm64, ./c...Sensitive data should not be used in the ARG or ENV commands
Check warning on line 7 in compose/production/grafana/Dockerfile GitHub Actions / build-and-push (grafana, ., ./compose/production/grafana/Dockerfile, linux/amd64,linux/arm64, ./c...Sensitive data should not be used in the ARG or ENV commands
|
||
GF_SECURITY_ADMIN_PASSWORD=123456 | ||
|
||
# 健康检查 | ||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | ||
CMD wget --quiet --tries=1 --spider http://localhost:3000/api/health || exit 1 |
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,8 @@ | ||
FROM grafana/loki:2.9.0 | ||
|
||
COPY ./compose/production/loki/loki-config.yml /etc/loki/ | ||
|
||
USER root | ||
|
||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | ||
CMD wget --quiet --tries=1 --spider http://localhost:3100/ready || exit 1 |
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,52 @@ | ||
auth_enabled: false | ||
|
||
server: | ||
http_listen_port: 3100 | ||
|
||
ingester: | ||
lifecycler: | ||
address: 127.0.0.1 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
replication_factor: 1 | ||
final_sleep: 0s | ||
chunk_idle_period: 5m | ||
chunk_retain_period: 30s | ||
|
||
schema_config: | ||
configs: | ||
- from: 2020-05-15 | ||
store: boltdb-shipper | ||
object_store: filesystem | ||
schema: v11 | ||
index: | ||
prefix: index_ | ||
period: 24h | ||
|
||
storage_config: | ||
boltdb_shipper: | ||
active_index_directory: /tmp/loki/boltdb-shipper-active | ||
cache_location: /tmp/loki/boltdb-shipper-cache | ||
cache_ttl: 24h | ||
shared_store: filesystem | ||
filesystem: | ||
directory: /tmp/loki/chunks | ||
|
||
limits_config: | ||
retention_period: 744h | ||
max_query_length: 744h | ||
|
||
ruler: | ||
storage: | ||
type: local | ||
local: | ||
directory: /tmp/loki/rules | ||
rule_path: /tmp/loki/rules-temp | ||
alertmanager_url: http://localhost:9093 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
|
||
compactor: | ||
working_directory: /tmp/loki/boltdb-shipper-compactor |
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,10 @@ | ||
FROM prom/node-exporter:latest | ||
|
||
# 设置默认参数 | ||
ENV PATH_SYSFS=/host/sys \ | ||
PATH_PROCFS=/host/proc \ | ||
PATH_ROOTFS=/rootfs | ||
|
||
# 健康检查 | ||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | ||
CMD wget --quiet --tries=1 --spider http://localhost:9100/metrics || exit 1 |
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,3 @@ | ||
FROM prom/prometheus:latest | ||
|
||
COPY ./compose/production/prometheus/prometheus.yml /etc/prometheus/ |
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,15 @@ | ||
global: | ||
scrape_interval: 15s # 全局抓取间隔 | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
static_configs: | ||
- targets: ['prometheus:9090'] | ||
|
||
- job_name: 'django' | ||
static_configs: | ||
- targets: ['django:8000'] | ||
|
||
- job_name: 'node_exporter' | ||
static_configs: | ||
- targets: ['node_exporter:9100'] |
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,6 @@ | ||
FROM grafana/promtail:latest | ||
|
||
COPY ./compose/production/promtail/promtail-config.yml /etc/promtail/ | ||
|
||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | ||
CMD wget --quiet --tries=1 --spider http://localhost:9080/ready || exit 1 |
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,18 @@ | ||
server: | ||
http_listen_port: 9080 | ||
grpc_listen_port: 0 | ||
|
||
positions: | ||
filename: /tmp/positions.yaml | ||
|
||
clients: | ||
- url: http://loki:3100/loki/api/v1/push | ||
|
||
scrape_configs: | ||
- job_name: system | ||
static_configs: | ||
- targets: | ||
- localhost | ||
labels: | ||
job: varlogs | ||
__path__: /app/logs/*.log |