-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add OtelCol as alternative logs metadata provider #1697
Conversation
e8bc01a
to
57433c1
Compare
5a151fe
to
afad9f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logs are coming to Sumo, hpa works.
I think that only description of new parameters in values.yaml needs to be added to documentation.
Test with following values.yaml:
sumologic:
accessId: *******
accessKey: ****************
endpoint: ""
clusterName: "kubernetesvagrant"
logs:
provider: otelcol
logs:
## Option to turn autoscaling on for logs and specify params for HPA.
## Autoscaling needs metrics-server to access cpu metrics.
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 10
targetCPUUtilizationPercentage: 50
# targetMemoryUtilizationPercentage: 50
metrics-server:
## Set the enabled flag to true for enabling metrics-server.
## This is required before enabling fluentd autoscaling unless you have an existing metrics-server in the cluster.
enabled: true
Add change analogic to 55793c6 |
deploy/helm/sumologic/values.yaml
Outdated
actions: | ||
- action: extract | ||
key: fluent.tag | ||
pattern: ^containers\.var\.log\.pods\.(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]{36})\.(?P<container_name>[^\._]+)\.(?P<run_id>\d+)\.log$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to support /var/log/containers to avoid changing fluent-bit config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and update metadata enrichment to enrich using pod name and namespace name
deploy/helm/sumologic/values.yaml
Outdated
pod_association: | ||
- from: resource_attribute | ||
name: k8s.pod.uid ## Source processor adds Sumo Logic related metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to
sumologic-kubernetes-collection/deploy/helm/sumologic/values.yaml
Lines 2583 to 2584 in 48492ff
pod_association: | |
- from: build_hostname |
k8s.pod.name and k8s.namespace.name resource attributes are required
Update |
Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
…lpers Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
Signed-off-by: Dominik Rosiek <[email protected]>
0823d19
to
ac2127d
Compare
It is not going to be used, as the OtelCol metadata provider will be using the same `sumologic.endpoint` property as Fluentd.
It is not going to be used. OtelCol will be using the same endpoint as Fluentd is using now, as opposed to the new open endpoint, so the extension is not needed.
{{ toYaml .Values.logs.statefulset.podAnnotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sumologic.labels.app.logs.pod" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to be changed to take into account the provider. As of now I'm seeing
Name: collection-sumologic-otelcol-logs-0
Namespace: sumologic
Priority: 0
Node: sumologic-kubernetes-collection/10.0.2.15
Start Time: Wed, 08 Sep 2021 12:08:51 +0200
Labels: app=collection-sumologic-fluentd-logs
chart=sumologic-2.2.0-dev.0
controller-revision-hash=collection-sumologic-otelcol-logs-56cf654b8
heritage=Helm
release=collection
statefulset.kubernetes.io/pod-name=collection-sumologic-otelcol-logs-0
...
0089ada
to
56bc8f9
Compare
56bc8f9
to
75bd207
Compare
These templates are currently only used by OtelCol and not by Fluentd, so the additional logic is not needed at the moment.
b0da9e5
to
eda1093
Compare
Description
Add otelcol support for logs pipeline
Testing performed