feat(observability): added vector as logshipper in the core stack
This commit is contained in:
parent
1f7b8e962e
commit
654daa1743
2 changed files with 83 additions and 0 deletions
29
template/stacks/core/vector.yaml
Normal file
29
template/stacks/core/vector.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: argocd
|
||||
namespace: argocd
|
||||
labels:
|
||||
env: dev
|
||||
spec:
|
||||
project: default
|
||||
syncPolicy:
|
||||
automated:
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
retry:
|
||||
limit: -1
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: observability
|
||||
sources:
|
||||
- chart: vector
|
||||
repoURL: https://helm.vector.dev
|
||||
targetRevision: 0.43.0
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/{{{ .Env.CLIENT_REPO_ID }}}/{{{ .Env.DOMAIN }}}/stacks/core/vector/values.yaml
|
||||
- repoURL: https://{{{ .Env.CLIENT_REPO_DOMAIN }}}/{{{ .Env.CLIENT_REPO_ORG_NAME }}}
|
||||
targetRevision: HEAD
|
||||
ref: values
|
54
template/stacks/core/vector/values.yaml
Normal file
54
template/stacks/core/vector/values.yaml
Normal file
|
@ -0,0 +1,54 @@
|
|||
# -- Enable deployment of vector
|
||||
role: Agent
|
||||
dataDir: /vector-data-dir
|
||||
resources: {}
|
||||
args:
|
||||
- -w
|
||||
- --config-dir
|
||||
- /etc/vector/
|
||||
containerPorts:
|
||||
- name: prom-exporter
|
||||
containerPort: 9090
|
||||
protocol: TCP
|
||||
service:
|
||||
enabled: false
|
||||
customConfig:
|
||||
data_dir: /vector-data-dir
|
||||
api:
|
||||
enabled: false
|
||||
address: 0.0.0.0:8686
|
||||
playground: true
|
||||
sources:
|
||||
k8s:
|
||||
type: kubernetes_logs
|
||||
internal_metrics:
|
||||
type: internal_metrics
|
||||
transforms:
|
||||
parser:
|
||||
type: remap
|
||||
inputs: [k8s]
|
||||
source: |
|
||||
.log = parse_json(.message) ?? .message
|
||||
del(.message)
|
||||
sinks:
|
||||
exporter:
|
||||
type: prometheus_exporter
|
||||
address: 0.0.0.0:9090
|
||||
inputs: [internal_metrics]
|
||||
vlogs:
|
||||
type: elasticsearch
|
||||
inputs: [parser]
|
||||
endpoints:
|
||||
- http://vlogs-victorialogs:9428/insert/elasticsearch/
|
||||
mode: bulk
|
||||
api_version: v8
|
||||
compression: gzip
|
||||
healthcheck:
|
||||
enabled: false
|
||||
request:
|
||||
headers:
|
||||
VL-Time-Field: timestamp
|
||||
VL-Stream-Fields: stream,kubernetes.pod_name,kubernetes.container_name,kubernetes.pod_namespace
|
||||
VL-Msg-Field: message,msg,_msg,log.msg,log.message,log
|
||||
AccountID: "0"
|
||||
ProjectID: "0"
|
Loading…
Reference in a new issue