-
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
Monitor process by pidfile or exe name #240
Conversation
@ranjib looks like a godep dependency issue with the build, try this:
|
@ranjib this looks good, thank you for the contribution! 👍, two things:
|
@sparrc im getting the following error with |
} else { | ||
return strconv.Atoi(strings.TrimSpace(string(pidString))) | ||
} | ||
} |
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.
I was wondering how this would behave should pgrep return multiple PIDs. I tend to run multiple Python interpreters on our servers, and setting "python" as the executable makes pgrep return the PID for each one.
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.
@arnimarj it will error out in that case. an strconv.Atoi call. this is as expected. i'll prefer pid file or master process' name for such scenarios.
@ranjib try this:
Or, if you could give me write access to your fork, I can push a change to this PR to fix it. Let me know what you prefer. |
Could you also please write a README for this plugin? See #177 |
|
@ranjib fixed, although... I'm sorry, but I made some force pushes, I was in the zone and using my regular workflow on personal branches! Hope it doesn't mess you up too much, let me know if I can lend a hand |
Conflicts: plugins/procstat/procstat.go
@sparrc done. |
@ranjib can you please make the README more detailed? You can use the CPU plugin as an example: Primarily I'd like to see documentation of the metrics that it will output. |
@sparrc sure. i took the example from exec plugin. |
@sparrc updated readme with measurement names. |
thank you @ranjib for updating the README, is this ready to merge? |
@sparrc i think so, i am hoping i dont have to rebase for the gopsutil changes. |
No I don't think so, the influxdb repo doesn't use godep in fact. You may want to file an issue in the godep project: https://github.com/tools/godep |
Process plugin allows monitoring individual processes specified by pid file or exe name. It will report back memory, cpu, context switch and io stats.
name
is used to prefix measurements.@sparrc this was my exact requirement for #215 . After going through the nagios and collectd plugins i have realized this is bit different than the overall processes plugin, where a different type of metrics. I am planning to add global process metrics by a separate PR (still need some more details, i'll continue the discussion on the ticket)