Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
492686f
feat: initial support for aix
pgimalac Feb 27, 2026
4c05426
feat: live process monitoring
pgimalac Mar 2, 2026
a01f8fe
chore: revert zstd changes for non-cgo support
pgimalac Mar 3, 2026
5626a9c
chore: remove local replace for gopsutil
pgimalac Mar 3, 2026
cdff6e5
chore: replace gopsutil fork with aix supported branch
pgimalac Mar 3, 2026
2dbd358
feat: first version of build and packaging pipeline, not working yet
pgimalac Mar 3, 2026
9a56102
feat: incremental improvements, in theory working now
pgimalac Mar 4, 2026
d1fc5ac
fix: shellcheck
pgimalac Mar 4, 2026
534adc7
fix: pydantic caching
pgimalac Mar 4, 2026
3cf245d
feat: native libs caching
pgimalac Mar 4, 2026
a981be8
fix: package, build
pgimalac Mar 5, 2026
edadeb1
fix: various host data collection issues
pgimalac Mar 5, 2026
4eee36a
fix: some more package issues
pgimalac Mar 6, 2026
ccbb163
Merge branch 'main' of https://github.com/DataDog/datadog-agent into …
pgimalac Mar 11, 2026
332a943
fix: use latest ogpsutil
pgimalac Mar 12, 2026
9009054
chore: use invoke tasks to build go binaries
pgimalac Mar 12, 2026
455d197
chore: update pinned upstream gopsutil
pgimalac Mar 19, 2026
8118f41
feat: add default config files for default system checks
pgimalac Mar 19, 2026
3d871a6
fix: default checks configs, rm scripts
pgimalac Mar 19, 2026
88d5d78
fix: libpath
pgimalac Mar 19, 2026
d588217
fix: dd-agent user no home
pgimalac Mar 20, 2026
002affc
fix: no hardcode user id
pgimalac Mar 20, 2026
130f551
fix: dd-agent user home
pgimalac Mar 20, 2026
b744f00
chore: factor out references to python version
pgimalac Apr 13, 2026
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
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,14 @@
/internal/third_party/kubernetes @DataDog/container-integrations
/internal/third_party/golang/ @DataDog/container-integrations

# AIX
/packaging/aix/ @DataDog/agent-delivery @pgimalac
/packaging/aix/stages/ @DataDog/agent-build @pgimalac
/packaging/aix/build.sh @DataDog/agent-build @pgimalac
/packaging/aix/clean.sh @DataDog/agent-build @pgimalac
/**/*_aix.go @DataDog/agent-runtimes @pgimalac
/**/*_aix_test.go @DataDog/agent-runtimes @pgimalac

# Temporary during Bazel migration
# This needs to go after all other rules that may include BUILD.bazel files, it otherwise gets overridden
/**/BUILD.bazel @DataDog/agent-build
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/subcommands/launchgui/open_browser_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build freebsd || netbsd || openbsd || solaris || dragonfly || linux
//go:build freebsd || netbsd || openbsd || solaris || dragonfly || linux || aix

package launchgui

Expand Down
5 changes: 2 additions & 3 deletions comp/core/agenttelemetry/impl/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import (
"strings"
"time"

dto "github.com/prometheus/client_model/go"

"github.com/DataDog/zstd"
dto "github.com/prometheus/client_model/go"

"github.com/DataDog/datadog-agent/comp/core/config"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
Expand Down Expand Up @@ -438,7 +437,7 @@ func (s *senderImpl) flushSession(ss *senderSession) error {
compressed = true
reqBody = reqBodyCompressed
} else {
s.logComp.Errorf("Failed to compress agent telemetry payload: %v", errTemp)
s.logComp.Warnf("Failed to compress agent telemetry payload: %v", errTemp)
}
}

Expand Down
2 changes: 1 addition & 1 deletion comp/core/config/params_nix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build netbsd || openbsd || solaris || dragonfly || linux
//go:build netbsd || openbsd || solaris || dragonfly || linux || aix

package config

Expand Down
2 changes: 1 addition & 1 deletion comp/core/gui/guiimpl/platform_nix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build freebsd || netbsd || openbsd || solaris || dragonfly || linux
//go:build freebsd || netbsd || openbsd || solaris || dragonfly || linux || aix

package guiimpl

Expand Down
1 change: 0 additions & 1 deletion comp/dogstatsd/replay/impl/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"sync"
"time"

// Refactor relevant bits
"github.com/DataDog/zstd"
"github.com/spf13/afero"

Expand Down
35 changes: 35 additions & 0 deletions comp/metadata/host/hostimpl/payload_aix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build aix

package hostimpl

import (
"context"
"encoding/json"

"github.com/DataDog/datadog-agent/comp/metadata/host/hostimpl/utils"
)

// Payload handles the JSON unmarshalling of the metadata payload
type Payload struct {
utils.CommonPayload
utils.Payload
}

// MarshalJSON serializes a Payload to JSON
func (p *Payload) MarshalJSON() ([]byte, error) {
type PayloadAlias Payload
return json.Marshal((*PayloadAlias)(p))
}

// getPayload returns the complete metadata payload as seen in Agent v5. Note: gohai can't be used on AIX.
func (h *host) getPayload(ctx context.Context) *Payload {
return &Payload{
CommonPayload: *utils.GetCommonPayload(h.hostname, h.config),
Payload: *utils.GetPayload(ctx, h.config, h.hostnameComp),
}
}
36 changes: 23 additions & 13 deletions comp/metadata/inventoryhost/inventoryhostimpl/inventoryhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,22 +216,32 @@ func (ih *invHost) fillData() {

networkInfo, err := networkGet()
if err == nil {
_, warnings, err = networkInfo.AsJSON()
}
if err != nil {
ih.log.Errorf("failed to retrieve host network metadata from gohai: %s", err) //nolint:errcheck
} else {
logWarnings(warnings)

ih.data.IPAddress = networkInfo.IPAddress
ih.data.IPv6Address = networkInfo.IPAddressV6.ValueOrDefault()
ih.data.MacAddress = networkInfo.MacAddress
jsonInterfaces, err := json.Marshal(networkInfo.Interfaces)
var netJSON interface{}
var warnings []string
netJSON, warnings, err = networkInfo.AsJSON()
if err != nil {
ih.log.Errorf("failed to marshal network interfaces: %s", err) //nolint:errcheck
ih.log.Errorf("failed to retrieve host network metadata from gohai: %s", err) //nolint:errcheck
} else {
ih.data.Interfaces = string(jsonInterfaces)
logWarnings(warnings)

ih.data.IPAddress = networkInfo.IPAddress
ih.data.IPv6Address = networkInfo.IPAddressV6.ValueOrDefault()
ih.data.MacAddress = networkInfo.MacAddress
// Use the interfaces from AsJSON() which correctly handles utils.Value[string]
// fields (omitting error-valued fields rather than serializing them as {}).
if netData, ok := netJSON.(map[string]interface{}); ok {
if ifaces, ok := netData["interfaces"]; ok {
jsonInterfaces, jsonErr := json.Marshal(ifaces)
if jsonErr != nil {
ih.log.Errorf("failed to marshal network interfaces: %s", jsonErr) //nolint:errcheck
} else {
ih.data.Interfaces = string(jsonInterfaces)
}
}
}
}
} else {
ih.log.Errorf("failed to retrieve host network metadata from gohai: %s", err) //nolint:errcheck
}

if ih.conf.GetBool("metadata_ip_resolution_from_hostname") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build windows || freebsd || netbsd || openbsd || solaris || dragonfly
//go:build windows || freebsd || netbsd || openbsd || solaris || dragonfly || aix

package resourcesimpl

Expand Down
70 changes: 70 additions & 0 deletions comp/process/agent/agent_aix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2024-present Datadog, Inc.

//go:build aix

package agent

import (
"slices"
"sync"

"github.com/DataDog/datadog-agent/comp/core/config"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/DataDog/datadog-agent/comp/process/types"
"github.com/DataDog/datadog-agent/pkg/config/setup"
"github.com/DataDog/datadog-agent/pkg/process/checks"
"github.com/DataDog/datadog-agent/pkg/util/flavor"
)

var (
enabled bool
Once sync.Once

processCheckNames = []string{
checks.ProcessCheckName,
checks.ContainerCheckName,
checks.DiscoveryCheckName,
}
)

func enabledHelper(config config.Component, checkComponents []types.CheckComponent, l log.Component) bool {
if setup.IsCLCRunner(config) {
return false
}

runInCoreAgent := config.GetBool("process_config.run_in_core_agent.enabled")

var processEnabled bool
for _, check := range checkComponents {
if slices.Contains(processCheckNames, check.Object().Name()) && check.Object().IsEnabled() {
processEnabled = true
}
}

switch flavor.GetFlavor() {
case flavor.ProcessAgent:
if runInCoreAgent {
l.Info("The process checks will run in the core agent via the process-component")
} else if processEnabled {
l.Info("Process/Container Collection in the Process Agent will be deprecated in a future release " +
"and will instead be run in the Core Agent.")
}
return !runInCoreAgent
case flavor.DefaultAgent:
return runInCoreAgent
default:
return false
}
}

// Enabled determines whether the process agent is enabled based on the configuration.
// On AIX, process checks run in the core agent when process_config.run_in_core_agent.enabled is true.
func Enabled(config config.Component, checkComponents []types.CheckComponent, l log.Component) bool {
Once.Do(func() {
enabled = enabledHelper(config, checkComponents, l)
})
return enabled
}
2 changes: 1 addition & 1 deletion comp/process/agent/agent_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2024-present Datadog, Inc.

//go:build !linux
//go:build !linux && !aix

package agent

Expand Down
6 changes: 6 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ replace (
go.opentelemetry.io/ebpf-profiler => github.com/DataDog/opentelemetry-ebpf-profiler v0.0.202610
)

// AIX: patched gopsutil with AIX process monitoring support
replace github.com/DataDog/gopsutil => github.com/DataDog/gopsutil v1.2.5-0.20260303142149-85b991b13594

// AIX: upstream gopsutil with unreleased AIX fixes
replace github.com/shirou/gopsutil/v4 => github.com/shirou/gopsutil/v4 v4.26.3-0.20260314122645-1ec4f5030b7e

require (
code.cloudfoundry.org/bbs v0.0.0-20200403215808-d7bc971db0db
code.cloudfoundry.org/garden v0.0.0-20210208153517-580cadd489d2
Expand Down
8 changes: 4 additions & 4 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading