Merge pull request 'alloy_implementation' (#13) from alloy_implementation into development
Reviewed-on: #13 Reviewed-by: Christopher.Hase <Christopher.Hase@telekom.de>
This commit is contained in:
commit
5d2df3db8e
6 changed files with 103 additions and 51 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/.history
|
18
template/stacks/core/ingress-apps/alloy.yaml
Normal file
18
template/stacks/core/ingress-apps/alloy.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: alloy
|
||||
namespace: monitoring
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: {{{ .Env.DOMAIN }}}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: alloy
|
||||
port:
|
||||
number: 12345
|
||||
path: /alloy
|
||||
pathType: Prefix
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: promtail
|
||||
name: alloy
|
||||
namespace: argocd
|
||||
labels:
|
||||
env: dev
|
||||
|
@ -18,12 +18,12 @@ spec:
|
|||
name: in-cluster
|
||||
namespace: monitoring
|
||||
sources:
|
||||
- repoURL: https://github.com/grafana/helm-charts
|
||||
path: charts/promtail
|
||||
- repoURL: https://github.com/grafana/alloy.git
|
||||
path: operations/helm/charts/alloy
|
||||
targetRevision: HEAD
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/stacks/monitoring/promtail/values.yaml
|
||||
- $values/stacks/monitoring/alloy/values.yaml
|
||||
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||
targetRevision: HEAD
|
||||
ref: values
|
78
template/stacks/monitoring/alloy/values.yaml
Normal file
78
template/stacks/monitoring/alloy/values.yaml
Normal file
|
@ -0,0 +1,78 @@
|
|||
alloy:
|
||||
create: false
|
||||
name: alloy-config
|
||||
key: config.alloy
|
||||
|
||||
uiPathPrefix: "/alloy"
|
||||
|
||||
configMap:
|
||||
content: |-
|
||||
|
||||
logging {
|
||||
level = "info"
|
||||
format = "logfmt"
|
||||
}
|
||||
|
||||
loki.write "local_loki" {
|
||||
endpoint {
|
||||
url = "http://loki-loki-distributed-gateway/loki/api/v1/push"
|
||||
}
|
||||
}
|
||||
|
||||
discovery.kubernetes "pod" {
|
||||
role = "pod"
|
||||
}
|
||||
|
||||
discovery.kubernetes "nodes" {
|
||||
role = "node"
|
||||
}
|
||||
|
||||
discovery.kubernetes "services" {
|
||||
role = "service"
|
||||
}
|
||||
|
||||
discovery.kubernetes "endpoints" {
|
||||
role = "endpoints"
|
||||
}
|
||||
|
||||
discovery.kubernetes "endpointslices" {
|
||||
role = "endpointslice"
|
||||
}
|
||||
|
||||
discovery.kubernetes "ingresses" {
|
||||
role = "ingress"
|
||||
}
|
||||
|
||||
discovery.relabel "pod_logs" {
|
||||
targets = discovery.kubernetes.pod.targets
|
||||
|
||||
rule {
|
||||
source_labels = ["__meta_kubernetes_namespace"]
|
||||
action = "replace"
|
||||
target_label = "namespace"
|
||||
}
|
||||
|
||||
rule {
|
||||
source_labels = ["__meta_kubernetes_pod_name"]
|
||||
action = "replace"
|
||||
target_label = "pod"
|
||||
}
|
||||
|
||||
rule {
|
||||
source_labels = ["__meta_kubernetes_pod_node_name"]
|
||||
action = "replace"
|
||||
target_label = "node"
|
||||
}
|
||||
|
||||
rule {
|
||||
source_labels = ["__meta_kubernetes_pod_container_name"]
|
||||
action = "replace"
|
||||
target_label = "container"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
loki.source.kubernetes "all_pod_logs" {
|
||||
targets = discovery.relabel.pod_logs.output
|
||||
forward_to = [loki.write.local_loki.receiver]
|
||||
}
|
|
@ -110,12 +110,12 @@ data:
|
|||
"uid": "P8E80F9AEF21F6940"
|
||||
},
|
||||
"editorMode": "builder",
|
||||
"expr": "{container=\"promtail\"} |= ``",
|
||||
"expr": "{container=\"alloy\"} |= ``",
|
||||
"queryType": "range",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Logs: Container promtail",
|
||||
"title": "Logs: Container alloy",
|
||||
"type": "logs"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
# -- Overrides the chart's name
|
||||
nameOverride: null
|
||||
|
||||
# -- Overrides the chart's computed fullname
|
||||
fullnameOverride: null
|
||||
|
||||
global:
|
||||
# -- Allow parent charts to override registry hostname
|
||||
imageRegistry: ""
|
||||
# -- Allow parent charts to override registry credentials
|
||||
imagePullSecrets: []
|
||||
|
||||
daemonset:
|
||||
# -- Deploys Promtail as a DaemonSet
|
||||
enabled: true
|
||||
autoscaling:
|
||||
# -- Creates a VerticalPodAutoscaler for the daemonset
|
||||
enabled: false
|
||||
|
||||
deployment:
|
||||
# -- Deploys Promtail as a Deployment
|
||||
enabled: false
|
||||
|
||||
config:
|
||||
enabled: true
|
||||
logLevel: info
|
||||
logFormat: logfmt
|
||||
serverPort: 3101
|
||||
clients:
|
||||
- url: http://loki-loki-distributed-gateway/loki/api/v1/push
|
||||
scrape_configs:
|
||||
- job_name: authlog
|
||||
static_configs:
|
||||
- targets:
|
||||
- authlog
|
||||
labels:
|
||||
job: authlog
|
||||
__path__: /logs/auth.log
|
||||
- job_name: syslog
|
||||
static_configs:
|
||||
- targets:
|
||||
- syslog
|
||||
labels:
|
||||
job: syslog
|
||||
__path__: /logs/syslog
|
Loading…
Reference in a new issue