-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat][Kubernetes Volume] Add pvc reference to distinguish ephemeral from persistent volumes #38839
[Metricbeat][Kubernetes Volume] Add pvc reference to distinguish ephemeral from persistent volumes #38839
Changes from 5 commits
5b4a487
ede64ae
5026f50
375e742
b0dd8a4
d5cfb1f
e1ba07b
0f78c41
9a0cf91
698eb17
39d255e
8a6eeff
a8b3092
d206ac5
9e9a600
cec10b2
14cff40
ef19ff0
835d991
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,9 @@ func eventMapping(content []byte, logger *logp.Logger) ([]mapstr.M, error) { | |
if volume.Inodes > 0 { | ||
kubernetes2.ShouldPut(volumeEvent, "fs.inodes.pct", float64(volume.InodesUsed)/float64(volume.Inodes), logger) | ||
} | ||
if volume.PvcRef.Name != "" { | ||
kubernetes2.ShouldPut(volumeEvent, "persistentvolumeclaim.name", volume.PvcRef.Name, logger) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have the feeling that this way the field that will be generated will be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, great static analysis :D.. Indeed, its creating the field you mention. I actually want to reuse the field After some thinking I tried with:
But it does not seem to work 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, the line I wrote in the comment is correct. For some reasons I were still using the old binary 🤦 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had the feeling 😂 |
||
events = append(events, volumeEvent) | ||
} | ||
|
||
|
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.
can you please add a separate sample with the
pvcRef
to keep in the test file both examples - one for persistentvolumeclaim and one for the ephemeral volume?