Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #137 from SumoLogic/ssong-service-deployment-etc
Browse files Browse the repository at this point in the history
Attach enhanced metadata
  • Loading branch information
samjsong authored Jul 26, 2019
2 parents 8d00440 + e0c3892 commit 689ebce
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/fluent/plugin/filter_kubernetes_sumologic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,9 @@ def filter(tag, time, record)
log_fields["container"] = kubernetes["container_name"] unless kubernetes["container_name"].nil?
log_fields["namespace"] = kubernetes["namespace_name"] unless kubernetes["namespace_name"].nil?
log_fields["pod"] = kubernetes["pod_name"] unless kubernetes["pod_name"].nil?
log_fields["pod_id"] = kubernetes["pod_id"] unless kubernetes["pod_id"].nil?
log_fields["host"] = kubernetes["host"] unless kubernetes["host"].nil?
log_fields["master_url"] = kubernetes["master_url"] unless kubernetes["master_url"].nil?
log_fields["namespace_id"] = kubernetes["namespace_id"] unless kubernetes["namespace_id"].nil?
["pod_id", "host", "master_url", "namespace_id", "service", "deployment", "daemonset", "replicaset", "statefulset"].each do |key|
log_fields[key] = kubernetes[key] unless kubernetes[key].nil?
end
end
end

Expand Down

0 comments on commit 689ebce

Please sign in to comment.