Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9f3367e

Browse files
vmetrics+grafana+traefik initial commit
1 parent 3b92c28 commit 9f3367e

File tree

11 files changed

+433
-0
lines changed

11 files changed

+433
-0
lines changed

‎traefik-vmetrics-grafana/conf/acme.json

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: 1
3+
4+
datasources:
5+
- name: 'VMetrics'
6+
type: 'prometheus'
7+
id: 'vmetrics'
8+
access: proxy
9+
org_id: 1
10+
url: 'http://vmetrics:8428'
11+
is_default: true
12+
version: 1
13+
editable: true
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
auth_enabled: false
3+
4+
server:
5+
http_listen_port: 3100
6+
grpc_listen_port: 9096
7+
8+
ingester:
9+
wal:
10+
enabled: true
11+
dir: /tmp/wal
12+
lifecycler:
13+
address: 127.0.0.1
14+
ring:
15+
kvstore:
16+
store: inmemory
17+
replication_factor: 1
18+
final_sleep: 0s
19+
chunk_idle_period: 1h # Any chunk not receiving new logs in this time will be flushed
20+
max_chunk_age: 1h # All chunks will be flushed when they hit this age, default is 1h
21+
chunk_target_size: 1048576 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
22+
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
23+
max_transfer_retries: 0 # Chunk transfers disabled
24+
25+
schema_config:
26+
configs:
27+
- from: 2020年10月24日
28+
store: boltdb-shipper
29+
object_store: filesystem
30+
schema: v11
31+
index:
32+
prefix: index_
33+
period: 24h
34+
35+
storage_config:
36+
boltdb_shipper:
37+
active_index_directory: /tmp/loki/boltdb-shipper-active
38+
cache_location: /tmp/loki/boltdb-shipper-cache
39+
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
40+
shared_store: filesystem
41+
filesystem:
42+
directory: /tmp/loki/chunks
43+
44+
compactor:
45+
working_directory: /tmp/loki/boltdb-shipper-compactor
46+
shared_store: filesystem
47+
48+
limits_config:
49+
enforce_metric_name: false
50+
reject_old_samples: true
51+
reject_old_samples_max_age: 168h
52+
ingestion_rate_mb: 8
53+
54+
chunk_store_config:
55+
max_look_back_period: 0s
56+
57+
table_manager:
58+
retention_deletes_enabled: false
59+
retention_period: 0s
60+
61+
ruler:
62+
storage:
63+
type: local
64+
local:
65+
directory: /tmp/loki/rules
66+
rule_path: /tmp/loki/rules-temp
67+
# alertmanager_url: http://alertmanager:9093
68+
ring:
69+
kvstore:
70+
store: inmemory
71+
enable_api: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
server:
3+
http_listen_port: 9080
4+
grpc_listen_port: 0
5+
6+
positions:
7+
filename: /tmp/positions.yaml
8+
9+
clients:
10+
- url: http://loki:3100/loki/api/v1/push
11+
12+
scrape_configs:
13+
- job_name: system
14+
static_configs:
15+
- targets:
16+
- host
17+
labels:
18+
job: "varlogs"
19+
__path__: "/var/log/*log"
20+
21+
- job_name: traefik
22+
static_configs:
23+
- targets:
24+
- traefik
25+
labels:
26+
job: traefiklogs
27+
__path__: /logs/traefik/*log
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
global:
3+
scrape_interval: 30s
4+
5+
scrape_configs:
6+
- job_name: "traefik"
7+
static_configs:
8+
- targets: ["traefik:9090"]
9+
10+
- job_name: 'vmetrics'
11+
static_configs:
12+
- targets: ['vmetrics:8428']
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
global:
3+
sendAnonymousUsage: true
4+
checkNewVersion: false
5+
6+
api:
7+
# insecure: true
8+
dashboard: true
9+
# debug: true
10+
11+
log:
12+
filePath: "/etc/traefik/applog.log"
13+
format: json
14+
level: "ERROR"
15+
16+
providers:
17+
docker:
18+
endpoint: unix:///var/run/docker.sock
19+
exposedByDefault: false
20+
watch: true
21+
swarmMode: false
22+
file:
23+
directory: "/etc/traefik/dynamic"
24+
watch: true
25+
26+
entryPoints:
27+
web:
28+
address: ":80"
29+
http:
30+
redirections:
31+
entryPoint:
32+
to: websecure
33+
scheme: https
34+
websecure:
35+
address: ":443"
36+
metrics:
37+
address: ":9090"
38+
ping:
39+
address: ":8082"
40+
41+
ping:
42+
entryPoint: "ping"
43+
44+
certificatesResolvers:
45+
letsencrypt:
46+
acme:
47+
email: mail@domain.name
48+
# caServer: https://acme-staging-v02.api.letsencrypt.org/directory
49+
caServer: https://acme-v02.api.letsencrypt.org/directory
50+
storage: acme.json
51+
keyType: EC256
52+
httpChallenge:
53+
entryPoint: web
54+
55+
metrics:
56+
prometheus:
57+
entryPoint: metrics
58+
addEntryPointsLabels: true
59+
addRoutersLabels: true
60+
addServicesLabels: true
61+
buckets:
62+
- 0.1
63+
- 0.3
64+
- 1.2
65+
- 5.0
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
tls:
3+
options:
4+
default:
5+
minVersion: VersionTLS12
6+
sniStrict: true
7+
cipherSuites:
8+
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
9+
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
10+
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
11+
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
12+
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
13+
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
14+
- TLS_AES_128_GCM_SHA256
15+
- TLS_AES_256_GCM_SHA384
16+
- TLS_CHACHA20_POLY1305_SHA256
17+
curvePreferences:
18+
- CurveP521
19+
- CurveP384
20+
alpnProtocols:
21+
- h2
22+
- http/1.1
23+
mintls13:
24+
minVersion: VersionTLS13
25+
26+
http:
27+
middlewares:
28+
compression:
29+
compress:
30+
excludedContentTypes:
31+
- text/event-stream
32+
33+
security:
34+
headers:
35+
accessControlAllowMethods:
36+
- GET
37+
- OPTIONS
38+
- PUT
39+
accessControlMaxAge: 100
40+
addVaryHeader: true
41+
browserXssFilter: true
42+
contentTypeNosniff: true
43+
forceSTSHeader: true
44+
frameDeny: true
45+
sslRedirect: true
46+
sslForceHost: true
47+
stsPreload: true
48+
customFrameOptionsValue: SAMEORIGIN
49+
referrerPolicy: "same-origin"
50+
featurePolicy: "camera 'none'; microphone 'none'; payment 'none'; usb 'none'; vr 'none'; vibrate 'self';"
51+
stsSeconds: 315360000
52+
hostsProxyHeaders:
53+
- "X-Forwarded-Host"
54+
55+
authentification:
56+
basicAuth:
57+
users:
58+
- admin:2ドルy10ドル$byzmasKak2LLmvY86KcnGO0pX8UaaNDxQZMJW.wMmaoHRhjNXqOwG # admin/admin, use "https://bcrypt.fr" to encrypt your password
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
http:
3+
routers:
4+
rt-traefik:
5+
entryPoints:
6+
- websecure
7+
middlewares:
8+
- authentification
9+
service: api@internal
10+
rule: Host (`traefik.yourhome.local`)
11+
tls:
12+
certResolver: letsencrypt
13+
14+
rt-grafana:
15+
entryPoints:
16+
- websecure
17+
middlewares:
18+
- security
19+
service: sc-grafana
20+
rule: Host (`grafana.yourhome.local`)
21+
tls:
22+
certResolver: letsencrypt
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
http:
3+
services:
4+
sc-grafana:
5+
loadBalancer:
6+
servers:
7+
- url: "http://grafana:3000"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /