Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion api/grpc/mpi/v1/command_grpc.pb.go

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

2 changes: 1 addition & 1 deletion api/grpc/mpi/v1/files_grpc.pb.go

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

4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ github.com/foxboron/go-tpm-keyfiles v0.0.0-20251226215517-609e4778396f/go.mod h1
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho=
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ=
Expand Down Expand Up @@ -1083,8 +1081,6 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
12 changes: 9 additions & 3 deletions test/helpers/test_containers_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
const configFilePermissions = 0o600

type Parameters struct {
NginxConfigPath string
NginxAgentConfigPath string
LogMessage string
NginxConfigPath string
NginxAgentConfigPath string
NginxAgentOTELConfigPath string
LogMessage string
}

type MockCollectorContainers struct {
Expand Down Expand Up @@ -106,6 +107,11 @@ func StartContainer(
ContainerFilePath: "/etc/nginx/mime.types",
FileMode: configFilePermissions,
},
{
HostFilePath: parameters.NginxAgentOTELConfigPath,
ContainerFilePath: "/etc/nginx-agent/my_config.yaml",
FileMode: configFilePermissions,
},
},
Env: env,
}
Expand Down
Empty file.
52 changes: 52 additions & 0 deletions test/integration/upgrade/configs/default/otel-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
receivers:
containermetrics:
collection_interval: 1m0s
hostmetrics:
collection_interval: 1m0s
initial_delay: 1s
scrapers:
network:

processors:
batch/default_logs:
send_batch_size: 100
timeout: 1m0s
send_batch_max_size: 100
batch/default_metrics:
send_batch_size: 1000
timeout: 30s
send_batch_max_size: 1000
securityviolationsfilter/default: {}

exporters:
otlp_grpc/default:
endpoint: "managementPlane:9092"
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 10s
max_interval: 60s
max_elapsed_time: 10m
tls:
insecure: true
extensions:

service:
telemetry:
metrics:
level: none
logs:
level: DEBUG
output_paths: ["/var/log/nginx-agent/opentelemetry-collector-agent.log"]
error_output_paths: ["/var/log/nginx-agent/opentelemetry-collector-agent.log"]
extensions:

pipelines:
metrics/default:
receivers:
- containermetrics
- hostmetrics
processors:
- batch/default_metrics
exporters:
- otlp_grpc/default
15 changes: 15 additions & 0 deletions test/integration/upgrade/configs/otel/my_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
receivers:
hostmetrics:
collection_interval: 10s
scrapers:
cpu:

exporters:
debug:
verbosity: detailed

service:
pipelines:
metrics:
receivers: [hostmetrics]
exporters: [debug]
28 changes: 28 additions & 0 deletions test/integration/upgrade/configs/otel/nginx-agent.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# /etc/nginx-agent/nginx-agent.conf
#
# Configuration file for NGINX Agent.
#

log:
# set log level (error, warn, info, debug; default "info")
level: debug
# set log path. if empty, don't log to file.
path: /var/log/nginx-agent/

allowed_directories:
- /etc/nginx
- /usr/local/etc/nginx
- /usr/share/nginx/modules
- /var/run/nginx
- /var/log/nginx

command:
server:
host: managementPlane
port: 9092
type: grpc

collector:
additional_config_paths:
- "/etc/nginx-agent/my_config.yaml"
52 changes: 52 additions & 0 deletions test/integration/upgrade/configs/otel/otel-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
receivers:
containermetrics:
collection_interval: 1m0s
hostmetrics:
collection_interval: 1m0s
initial_delay: 1s
scrapers:
network:

processors:
batch/default_logs:
send_batch_size: 100
timeout: 1m0s
send_batch_max_size: 100
batch/default_metrics:
send_batch_size: 1000
timeout: 30s
send_batch_max_size: 1000
securityviolationsfilter/default: {}

exporters:
otlp_grpc/default:
endpoint: "managementPlane:9092"
timeout: 10s
retry_on_failure:
enabled: true
initial_interval: 10s
max_interval: 60s
max_elapsed_time: 10m
tls:
insecure: true
extensions:

service:
telemetry:
metrics:
level: none
logs:
level: DEBUG
output_paths: ["/var/log/nginx-agent/opentelemetry-collector-agent.log"]
error_output_paths: ["/var/log/nginx-agent/opentelemetry-collector-agent.log"]
extensions:

pipelines:
metrics/default:
receivers:
- containermetrics
- hostmetrics
processors:
- batch/default_metrics
exporters:
- otlp_grpc/default
Loading
Loading