vectordotdev / vector

A high-performance observability data pipeline.
https://vector.dev
Mozilla Public License 2.0
18.11k stars 1.6k forks source link

Collect process metrics #9626

Open jszwedko opened 3 years ago

jszwedko commented 3 years ago

A user requested the ability to record metrics by process (like CPU, memory, etc.).

I think this could be a separate source or incorporated into the host_metrics source.

LeeTeng2001 commented 4 weeks ago

I would love to see this

LeeTeng2001 commented 4 weeks ago

Currently I rely on vector host metrics to scrape details about host machine, it's awesome as I don't need another agent like node scrapper to provide this information

LeeTeng2001 commented 4 weeks ago

can i get my hands on this?

jszwedko commented 4 weeks ago

can i get my hands on this?

Sure!

LeeTeng2001 commented 1 week ago

Hi, since heim wouldn't be replaced in a short while, I cannot implement process metrics using heim crates. can we use both dependencies and only sysinfo for process metrics?

LeeTeng2001 commented 1 week ago

In other word, should I make a PR that only uses sysinfo for process metrics or a PR with heim completely replaced?

LeeTeng2001 commented 1 week ago

I already got a working sample, thanks for the kind & quick response! Vector is a great software, would love to contribute

pront commented 1 week ago

Hi @LeeTeng2001, first of all, thank you for your interest in contributing!

Hi, since heim wouldn't be replaced in a short while, I cannot implement process metrics using heim crates. can we use both dependencies and only sysinfo for process metrics?

I think it is fine using sysinfo to implement things that heim doesn't support.

Regarding the heim vs sysinfo debate, the only concern IMO if sysinfo can satisfy all metrics produced by the host_metrics source.

It is obvious that sysinfo is significantly more popular now and generally I would be in favor of using it going forward. But that will require some extra work and validation.

And yes, ideally we should only use one dependency.

LeeTeng2001 commented 1 day ago

I would like to remove heim but I fell like it would be too much of a PR & out of this issue scope, I'd like to keep the PR small and only implement process metrics for now.