feat: migrated to k3s
This commit is contained in:
1
monitoring/promtail/.gitignore
vendored
Normal file
1
monitoring/promtail/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
**.local.**
|
||||
12
monitoring/promtail/README.md
Normal file
12
monitoring/promtail/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Promtail
|
||||
|
||||
``` bash
|
||||
kubectl get namespace monitoring || kubectl create namespace monitoring
|
||||
|
||||
# add repo
|
||||
helm repo add grafana https://grafana.github.io/helm-charts
|
||||
# Install & Upgrade
|
||||
helm upgrade --install promtail grafana/promtail --namespace monitoring \
|
||||
--values=./values.yaml \
|
||||
--values=./values.local.yaml
|
||||
```
|
||||
46
monitoring/promtail/values.yaml
Normal file
46
monitoring/promtail/values.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
config:
|
||||
clients:
|
||||
- url: "????" #replaced values.local.yaml. Example: https://lokiserver/loki/api/v1/push
|
||||
# by default all scrap configs had node_name
|
||||
snippets:
|
||||
|
||||
extraScrapeConfigs: |
|
||||
#scrape config for syslog
|
||||
- job_name: host-journald
|
||||
journal:
|
||||
json: true
|
||||
max_age: 24h
|
||||
path: /var/log/host/journal
|
||||
labels:
|
||||
job: journald
|
||||
relabel_configs:
|
||||
- source_labels: ['__journal__systemd_unit']
|
||||
target_label: 'journal_systemd_unit'
|
||||
- source_labels: ['__journal_syslog_identifier']
|
||||
target_label: 'journal_syslog_identifier'
|
||||
- source_labels: ['__journal__hostname']
|
||||
target_label: 'journal_hostname'
|
||||
- target_label: 'host'
|
||||
replacement: '${HOSTNAME}'
|
||||
- target_label: 'cluster'
|
||||
replacement: 'casa'
|
||||
extraArgs:
|
||||
- --config.expand-env=true
|
||||
extraVolumes:
|
||||
- name: node-logs
|
||||
hostPath:
|
||||
path: /var/log
|
||||
|
||||
extraVolumeMounts:
|
||||
- name: node-logs
|
||||
mountPath: /var/log/host
|
||||
readOnly: true
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
|
||||
Reference in New Issue
Block a user