Skip to content
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

Do not attach empty 'node' metadata #54

Merged
merged 2 commits into from
Dec 28, 2020
Merged

Conversation

andrzej-stencel
Copy link
Contributor

After attaching node=nil metadata to a metrics record, the other plugin prometheus_format fails with "undefined method `gsub' for nil:NilClass":

long-collection-sumologic-fluentd-metrics-8 fluentd 2020-12-23 11:18:21 +0000 [warn]: #0 dump an error event: error_class=NoMethodError error="undefined method `gsub' for nil:NilClass" location="/usr/local/bundle/gems/fluent-plugin-prometheus-format-1.3.2/lib/fluent/plugin/filter_prometheus_format.rb:127:in `escape'" tag="prometheus.metrics.state" time=2020-12-23 11:18:14.000000000 +0000 record={"@metric"=>"kube_pod_container_resource_limits", "app"=>"collections", "container"=>"forge-metrics", "endpoint"=>"http", "instance"=>"10.3.71.116:8080", "job"=>"kube-state-metrics", "namespace"=>"long-distributed-systems", "pod"=>"forge-pod1-fd7c8b6d4-gtvdw", "prometheus"=>"long-collections/long-collection-prometheus", "prometheus_replica"=>"prometheus-long-collection-prometheus-0", "resource"=>"cpu", "unit"=>"core", "@timestamp"=>1608722294978, "@value"=>0.1, "cluster"=>"long", "prometheus_service"=>"long-prometheus-kube-state-metrics", "node"=>nil, "pod_labels"=>{"assembly"=>"forge", "assemblyVersion"=>"21.0-1606248095-4476-165371dae6bb", "chart"=>"sumo-assembly", "chartVersion"=>"1.0.1", "heritage"=>"Helm", "pod-template-hash"=>"fd7c8b6d4", "release"=>"long-forge", "sumoPod"=>"1", "sumoPodGroup"=>"ingestion", "team"=>"distributed-systems"}, "replicaset"=>"forge-pod1-fd7c8b6d4", "deployment"=>"forge-pod1"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants