cmd/scollector: Track process PIDs. #1964

Merged
merged 2 commits into from Nov 18, 2016

Conversation

Projects
None yet
3 participants
@alienth
Contributor

alienth commented Nov 18, 2016

As requested by @kylebrandt .

馃憮 @gbrayut @captncraig

@kylebrandt

This comment has been minimized.

Show comment
Hide comment
@kylebrandt

kylebrandt Nov 18, 2016

Member

From Bosun chat for reference:

stianovrevage [6:28 AM]
Hi guys, I'm looking at https://github.com/bosun-monitor/bosun/blob/master/cmd/scollector/collectors/processes_windows.go but cannot figure out why the ID reported is not the correct PID...

kylebrandt [7:48 AM]
PID is not submitted, just ids are generated from a bucket for numbers

stianovrevage [8:58 AM]
Why?

dima.medvedev [9:14 AM]
Mainly because opentsdb has a hard limit on tag values

[9:15]
I don't remember how it's done in windows, but linux process collector tries to make process ids unique for one running scollector instance.

[9:16]
Also, it's still possible to identify process via their process start time.

stianovrevage [9:24 AM]
Ok, thanks for a good answer 馃槃

kylebrandt [9:24 AM]
Also some services might recycle processes frequently

stianovrevage [9:36 AM]
True, but would be nice to have the option of including PID, for us who don't run into high cardinality issues

[9:36]
image-name + pid should be pretty safe I would think

kylebrandt [9:38 AM]
Could send it as a metric

[9:38]
Never really thought about that before, it would be strange, but functional

[9:40]
linux.proc.id_pid or something. Where you host,id,name are tags and the value is the corresponding pid at the time (edited)

[9:43]
I think perfmon has that actually (WMI)

[9:43]
A metric like that

stianovrevage [9:43 AM]
Yep, and just reference that when you actually need to find the process

[9:43]
Yes, it has CurrentID I think

[9:43]
Which is the current PID

Member

kylebrandt commented Nov 18, 2016

From Bosun chat for reference:

stianovrevage [6:28 AM]
Hi guys, I'm looking at https://github.com/bosun-monitor/bosun/blob/master/cmd/scollector/collectors/processes_windows.go but cannot figure out why the ID reported is not the correct PID...

kylebrandt [7:48 AM]
PID is not submitted, just ids are generated from a bucket for numbers

stianovrevage [8:58 AM]
Why?

dima.medvedev [9:14 AM]
Mainly because opentsdb has a hard limit on tag values

[9:15]
I don't remember how it's done in windows, but linux process collector tries to make process ids unique for one running scollector instance.

[9:16]
Also, it's still possible to identify process via their process start time.

stianovrevage [9:24 AM]
Ok, thanks for a good answer 馃槃

kylebrandt [9:24 AM]
Also some services might recycle processes frequently

stianovrevage [9:36 AM]
True, but would be nice to have the option of including PID, for us who don't run into high cardinality issues

[9:36]
image-name + pid should be pretty safe I would think

kylebrandt [9:38 AM]
Could send it as a metric

[9:38]
Never really thought about that before, it would be strange, but functional

[9:40]
linux.proc.id_pid or something. Where you host,id,name are tags and the value is the corresponding pid at the time (edited)

[9:43]
I think perfmon has that actually (WMI)

[9:43]
A metric like that

stianovrevage [9:43 AM]
Yep, and just reference that when you actually need to find the process

[9:43]
Yes, it has CurrentID I think

[9:43]
Which is the current PID

@gbrayut

This comment has been minimized.

Show comment
Hide comment
@gbrayut

gbrayut Nov 18, 2016

Contributor

Tested locally... LGTM

Contributor

gbrayut commented Nov 18, 2016

Tested locally... LGTM

@alienth alienth merged commit e7aa749 into bosun-monitor:master Nov 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment