-
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
New PHP-FPM metricbeat module #3415
Merged
+615
−0
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
539f229
Metricbeat php-fpm module
7047806
PR review: refactor data structures
4f87ead
PR review: minor changes
3de7963
PR review: use HostParser.QueryString
a36196f
PR review: no need for "var address"
60bba3a
PR review: remove proc metricset (metrics does not seems really useful)
7294c40
PR review: reduced metric set to a bare minimum
9bc8a1a
Generate artifacts
28352de
Remove uneeded bool flag
f7ea5e6
PR review: add structures
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
PR review: refactor data structures
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package pool | ||
|
||
type poolStats struct { | ||
Pool string `json:"pool"` | ||
ProcessManager string `json:"process manager"` | ||
StartTime int `json:"start time"` | ||
StartSince int `json:"start since"` | ||
AcceptedConn int `json:"accepted conn"` | ||
ListenQueue int `json:"listen queue"` | ||
MaxListQueue int `json:"max list queue"` | ||
ListenQueueLen int `json:"listen queue len"` | ||
IdleProcesses int `json:"idle processes"` | ||
ActiveProcesses int `json:"active processes"` | ||
TotalProcesses int `json:"total processes"` | ||
MaxActiveProcesses int `json:"max active processes"` | ||
MaxChildrenReached int `json:"max children reached"` | ||
SlowRequests int `json:"slow requests"` | ||
} |
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,21 @@ | ||
package proc | ||
|
||
type procStats struct { | ||
Pid int `json:"pid"` | ||
State string `json:"state"` | ||
StartTime int `json:"start time"` | ||
StartSince int `json:"start since"` | ||
Requests int `json:"requests"` | ||
RequestDuration int `json:"request duration"` | ||
RequestMethod string `json:"request method"` | ||
RequestURI string `json:"request uri"` | ||
ContentLength int `json:"content length"` | ||
User string `json:"user"` | ||
Script string `json:"script"` | ||
LastRequestCPU float64 `json:"last request cpu"` | ||
LastRequestMemory int `json:"last request memory"` | ||
} | ||
|
||
type fullStats struct { | ||
Processes []procStats `json:"processes"` | ||
} |
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
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.
To define a config option to change the
defaultPath
you can usePathConfigKey
. See https://github.com/elastic/beats/blob/master/metricbeat/module/prometheus/collector/collector.go#L25 as an example. I would suggest to usepath
orstatus_path
as the config option. All other parts are done automatically by the HostParser.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.
done