Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/fluent/plugin/in_kubernetes_metrics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,8 @@ def emit_system_container_metrics(node_name, container)

def emit_stats_breakdown(stats)
stats_latest = stats[-1]
tag = 'stats'
stats_timestamp = stats_latest['timestamp']
labels = { 'stats' => 'stats' }
tag = 'node'
stats_timestamp = parse_time stats_latest['timestamp']
unless stats_latest['cpu'].nil?
emit_cpu_metrics_stats tag: tag, metrics: stats_latest['cpu'], labels: labels, time: stats_timestamp
end
Expand Down Expand Up @@ -450,7 +449,7 @@ def emit_filesystem_metrics_stats(tag:, metrics:, labels:, time:)
type = file_system['type']
file_system.each do | file_metric |
file_key , file_value = file_metric
router.emit generate_tag("#{tag}.filesystem.".concat(".").concat(file_key)), time, labels.merge('device' => device, 'type' => type, 'value' => file_value)
router.emit generate_tag("#{tag}.filesystem.".concat(file_key)), time, labels.merge('device' => device, 'type' => type, 'value' => file_value)
end
end
end
Expand Down