Compare commits
2 Commits
main
...
0222103642
Author | SHA1 | Date | |
---|---|---|---|
0222103642
|
|||
2334fe1ece
|
@@ -4,29 +4,11 @@ alloy:
|
|||||||
content: |-
|
content: |-
|
||||||
loki.write "default" {
|
loki.write "default" {
|
||||||
endpoint {
|
endpoint {
|
||||||
url = "http://loki-gateway.loki.svc.cluster.local/loki/api/v1/push"
|
url = "http://loki.loki.svc.cluster.local:3100/loki/api/v1/push"
|
||||||
tenant_id = "luna"
|
tenant_id = "luna"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// local.file_match discovers files on the local filesystem using glob patterns and the doublestar library. It returns an array of file paths.
|
|
||||||
local.file_match "node_logs" {
|
|
||||||
path_targets = [{
|
|
||||||
// Monitor syslog to scrape node-logs
|
|
||||||
__path__ = "/var/log/messages",
|
|
||||||
job = "node/syslog",
|
|
||||||
node_name = sys.env("HOSTNAME"),
|
|
||||||
cluster = "development",
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
// loki.source.file reads log entries from files and forwards them to other loki.* components.
|
|
||||||
// You can specify multiple loki.source.file components by giving them different labels.
|
|
||||||
loki.source.file "node_logs" {
|
|
||||||
targets = local.file_match.node_logs.targets
|
|
||||||
forward_to = [loki.write.default.receiver]
|
|
||||||
}
|
|
||||||
|
|
||||||
// discovery.kubernetes allows you to find scrape targets from Kubernetes resources.
|
// discovery.kubernetes allows you to find scrape targets from Kubernetes resources.
|
||||||
// It watches cluster state and ensures targets are continually synced with what is currently running in your cluster.
|
// It watches cluster state and ensures targets are continually synced with what is currently running in your cluster.
|
||||||
discovery.kubernetes "pod" {
|
discovery.kubernetes "pod" {
|
||||||
@@ -113,31 +95,3 @@ alloy:
|
|||||||
|
|
||||||
forward_to = [loki.write.default.receiver]
|
forward_to = [loki.write.default.receiver]
|
||||||
}
|
}
|
||||||
|
|
||||||
// loki.source.kubernetes_events tails events from the Kubernetes API and converts them
|
|
||||||
// into log lines to forward to other Loki components.
|
|
||||||
loki.source.kubernetes_events "cluster_events" {
|
|
||||||
job_name = "integrations/kubernetes/eventhandler"
|
|
||||||
log_format = "logfmt"
|
|
||||||
forward_to = [
|
|
||||||
loki.process.cluster_events.receiver,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
// loki.process receives log entries from other loki components, applies one or more processing stages,
|
|
||||||
// and forwards the results to the list of receivers in the component's arguments.
|
|
||||||
loki.process "cluster_events" {
|
|
||||||
forward_to = [loki.write.default.receiver]
|
|
||||||
|
|
||||||
stage.static_labels {
|
|
||||||
values = {
|
|
||||||
cluster = "development",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage.labels {
|
|
||||||
values = {
|
|
||||||
kubernetes_cluster_events = "job",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -38,4 +38,3 @@ spec:
|
|||||||
selfHeal: true
|
selfHeal: true
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
- ServerSideApply=true
|
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
kube-prometheus-stack:
|
grafana:
|
||||||
grafana:
|
service:
|
||||||
service:
|
type: LoadBalancer
|
||||||
type: LoadBalancer
|
|
||||||
|
@@ -6,4 +6,3 @@ metadata:
|
|||||||
namespace: kubernaut
|
namespace: kubernaut
|
||||||
data:
|
data:
|
||||||
KUBERNAUT_CAT: kilwin
|
KUBERNAUT_CAT: kilwin
|
||||||
WEB_CONCURRENCY: "4"
|
|
||||||
|
@@ -51,3 +51,10 @@ spec:
|
|||||||
port: 4567
|
port: 4567
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 64Mi
|
||||||
|
cpu: 100m
|
||||||
|
limits:
|
||||||
|
memory: 128Mi
|
||||||
|
cpu: 200m
|
||||||
|
Reference in New Issue
Block a user