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 ddprocmon service status to flare #33086

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions pkg/flare/service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func getDDServices(manager *mgr.Mgr) ([]serviceInfo, error) {
}

for _, serviceName := range list {
if strings.HasPrefix(serviceName, "datadog") {
if strings.HasPrefix(strings.ToLower(serviceName), "datadog") {
srvc, err := winutil.OpenService(manager, serviceName, windows.GENERIC_READ)
if err != nil {
log.Warnf("Error Opening Service %s: %v", serviceName, err)
Expand All @@ -312,16 +312,19 @@ func getDDServices(manager *mgr.Mgr) ([]serviceInfo, error) {
}
}

// Getting ddnpm service info separately
ddnpm, err := winutil.OpenService(manager, "ddnpm", windows.GENERIC_READ)
if err != nil {
log.Warnf("Error Opening Service ddnpm %v", err)
} else {
ddnpmConf, err := getServiceInfo(ddnpm)
// Getting driver service info separately, since it's not included in the list of running services
drivers := []string{"ddnpm", "ddprocmon"}
for _, driverName := range drivers {
service, err := winutil.OpenService(manager, driverName, windows.GENERIC_READ)
if err != nil {
log.Warnf("Error getting info for ddnpm: %v", err)
log.Warnf("Error Opening Service %s %v", driverName, err)
} else {
serviceInfo, err := getServiceInfo(service)
if err != nil {
log.Warnf("Error getting info for %s: %v", driverName, err)
}
ddServices = append(ddServices, serviceInfo)
}
ddServices = append(ddServices, ddnpmConf)
}

return ddServices, nil
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
enhancements:
- |
Include Datadog Process Monitor (``ddprocmon``) service status in flare on Windows
fixes:
- |
Agent flare service status search for ``datadog`` services is now case insensitive on Windows
Loading