-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add hsperfdata Input Plugin #2058
Closed
+777
−0
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# hsperfdata Plugin | ||
|
||
The plugin gathers data from Hotspot JVMs via the hsperfdata files they expose. This plugin won't work if you've disabled their creation using `-XX:-UsePerfData` or `-XX:+PerfDisableSharedMem`! | ||
|
||
### Configuration: | ||
|
||
```toml | ||
[[inputs.hsperfdata]] | ||
# Optional: gather data from processes belonging to a different user. By | ||
# default, the username in the USER environment variable is used to generate | ||
# the hsperfdata directory name (usually "/tmp/hsperfdata_username") | ||
user: "root" | ||
|
||
# use the named keys in the hsperfdata file as tags, not fields. By default, | ||
# every key is exposed as a field. This example shows how to tag by JVM major | ||
# version: | ||
tags: ["java.property.java.vm.specification.version"] | ||
``` | ||
|
||
### Measurements & Fields: | ||
|
||
All metrics are gathered as the "java" measurement. | ||
|
||
All keys in the hsperfdata file are exposed as fields; there's no comprehensive list as they vary by Hotspot version. | ||
|
||
### Tags: | ||
|
||
- All measurements have the following tags: | ||
- pid (the process id of the monitored process) | ||
- procname (the class name containing the `main` function being run) | ||
|
||
### Example Output: | ||
|
||
Most fields abbreviated; there's usually 200-300 of them: | ||
|
||
``` | ||
$ ./telegraf -config telegraf.conf -input-filter example -test | ||
java,host=nwhite91-mac,pid=17427,procname=com.sun.javaws.Main java.ci.totalTime="49874911809",...,sun.zip.zipFiles="28" 1479466710000000000 | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Make sure this matches what is in
sampleConfig