loki+promtail

This commit is contained in:
Andrei Kartashov 2023-09-25 02:35:30 +07:00
parent 2fba5a6347
commit ef1f8bb440
4 changed files with 102 additions and 0 deletions

View file

@ -36,6 +36,10 @@ Applications & Projects
+------------------------------+----------------------------------------------------------------+-------------------------+
| Local-Path-Provisioner_ | `Rancher Local-Path`_ | |local-path_status| |
+------------------------------+----------------------------------------------------------------+-------------------------+
| Loki_ | | |loki_status| |
+------------------------------+----------------------------------------------------------------+-------------------------+
| Promtail_ | | |promtail_status| |
+------------------------------+----------------------------------------------------------------+-------------------------+
| Prometheus-node-exporter_ | `Node exporter`_ | |pne_status| |
+------------------------------+----------------------------------------------------------------+-------------------------+
| Victoria-Metrics-Operator_ | `Victoria Metrics Operator`_ | |vm-op_status| |
@ -98,6 +102,12 @@ Applications & Projects
.. _Rancher Local-Path: https://github.com/rancher/local-path-provisioner
.. |local-path_status| image:: https://argocd.ioot.xyz/api/badge?name=local-path-provisioner&revision=true
.. _Loki: https://argocd.ioot.xyz/applications/argocd/loki
.. |loki_status| image:: https://argocd.ioot.xyz/api/badge?name=loki&revision=true
.. _Promtail: https://argocd.ioot.xyz/applications/argocd/promtail
.. |promtail_status| image:: https://argocd.ioot.xyz/api/badge?name=promtail&revision=true
.. _Prometheus-node-exporter: https://argocd.ioot.xyz/applications/argocd/prometheus-node-exporter
.. _Node exporter: https://github.com/prometheus/node_exporter
.. |pne_status| image:: https://argocd.ioot.xyz/api/badge?name=prometheus-node-exporter&revision=true

View file

@ -0,0 +1,49 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: loki
labels:
stack: observability
spec:
destination:
server: https://kubernetes.default.svc
namespace: loki
project: system
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
sources:
- repoURL: git@github.com:amkartashov/gf-k8s.git
targetRevision: main
path: state/gullfaxi/system/observability/loki/manifests
- repoURL: https://grafana.github.io/helm-charts
chart: loki
targetRevision: 5.23.0
helm:
values: |
# https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml
# https://grafana.com/docs/loki/latest/setup/install/helm/install-monolithic/
gateway:
enabled: false
singleBinary:
replicas: 1
persistence:
enableStatefulSetAutoDeletePVC: false
loki:
auth_enabled: false
commonConfig:
replication_factor: 1
storage:
type: filesystem
test:
enabled: false
monitoring:
selfMonitoring:
enabled: false
grafanaAgent:
installOperator: false
lokiCanary:
enabled: false

View file

@ -0,0 +1,16 @@
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
name: loki
spec:
allowCrossNamespaceImport: true
instanceSelector:
matchLabels:
instance: grafana
datasource:
name: loki
type: loki
access: proxy
url: http://loki.loki:3100
isDefault: true
editable: false

View file

@ -0,0 +1,27 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: promtail
labels:
stack: observability
spec:
destination:
server: https://kubernetes.default.svc
namespace: promtail
project: system
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
sources:
- repoURL: https://grafana.github.io/helm-charts
chart: promtail
targetRevision: 6.15.2
helm:
values: |
# https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml
config:
clients:
- url: http://loki.loki:3100/loki/api/v1/push