Skip to content
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 support for group process monitoring #38

Merged
merged 15 commits into from
Dec 16, 2024

Conversation

Pratyush8083
Copy link
Collaborator

Description:
Adding support for group process monitoring

Link to tracking Issue:

Testing:

Documentation:

@Pratyush8083 Pratyush8083 marked this pull request as ready for review November 26, 2024 20:12
deploy.yaml Outdated
@@ -101,6 +101,12 @@ spec:
labels:
app: otelcontribcol
spec:
volumes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this volume is not required. Remove it.

| [processes] | Linux, Mac | Process count metrics |
| [process] | Linux, Windows, Mac | Per process CPU, Memory, and Disk I/O metrics |
| [system] | Linux, Windows, Mac | Miscellaneous system metrics |
| [groupprocess] | Linux, Windows, Mac | Per process group CPU, Memory, and Disk I/O metrics |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a keywork aggregated metrics of all processes of group

In this example, the groupprocessscraper is configured to scrape metrics for processes that match the specified comm, exe, and cmdline criteria. The group_name is used to identify the group of processes being monitored.
For `comm` and `exe`, the list of strings is an `OR`, meaning any process matching any of the strings will be added to the process group.
For `cmdline`, the list of regexes is an `AND`, meaning they all must match.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, add a line.
If more than one out of(comm, exe and cmdline) is given all of them has to match.

if a process matches to one group, the same process will not be part of other groups.

config *Config
mb *metadata.MetricsBuilder
scrapeProcessDelay time.Duration
ucals map[int32]*ucal.CPUUtilizationCalculator
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package ucal // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/groupprocessscraper/ucal"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this if its not used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, will test once after removing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested after removing ucal package and everything seems to be working fine. Hence removing this package.

@Pratyush8083 Pratyush8083 merged commit 708cb4c into release/v0.113.x Dec 16, 2024
32 of 72 checks passed
@Pratyush8083 Pratyush8083 deleted the mithun/process_metrics branch December 16, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants