Skip to content

Commit

Permalink
Merge branch 'main' of github.com:elastic/elastic-agent into test/log…
Browse files Browse the repository at this point in the history
…-error
  • Loading branch information
michalpristas committed Oct 16, 2023
2 parents 0838dad + be04fba commit 3947fc5
Show file tree
Hide file tree
Showing 25 changed files with 733 additions and 514 deletions.
9 changes: 0 additions & 9 deletions .ci/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ targets:
content: '{{ source "latestGoVersion" }}'
file: .golangci.yml
matchpattern: '\d+.\d+.\d+'
update-govulncheck:
name: "Update govulncheck.yml"
sourceid: latestGoVersion
scmid: githubConfig
kind: file
spec:
content: '{{ source "latestGoVersion" }}'
file: .github/workflows/govulncheck.yml
matchpattern: '\d+.\d+.\d+'
update-version.asciidoc:
name: "Update version.asciidoc"
sourceid: latestGoVersion
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/govulncheck.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.8
1.20.9
8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ linters-settings:

gosimple:
# Select the Go version to target. The default is '1.13'.
go: "1.20.8"
go: "1.20.9"

nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
Expand All @@ -136,17 +136,17 @@ linters-settings:

staticcheck:
# Select the Go version to target. The default is '1.13'.
go: "1.20.8"
go: "1.20.9"
checks: ["all"]

stylecheck:
# Select the Go version to target. The default is '1.13'.
go: "1.20.8"
go: "1.20.9"
checks: ["all"]

unused:
# Select the Go version to target. The default is '1.13'.
go: "1.20.8"
go: "1.20.9"

gosec:
excludes:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.20.8
ARG GO_VERSION=1.20.9
FROM circleci/golang:${GO_VERSION}


Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.skaffold
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.20.8
ARG GO_VERSION=1.20.9
ARG crossbuild_image="docker.elastic.co/beats-dev/golang-crossbuild"
ARG AGENT_VERSION=8.9.0-SNAPSHOT
ARG AGENT_IMAGE="docker.elastic.co/beats/elastic-agent"
Expand Down
41 changes: 41 additions & 0 deletions changelog/8.10.3.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// begin 8.10.3 relnotes

[[release-notes-8.10.3]]
== 8.10.3

Review important information about the 8.10.3 release.









[discrete]
[[new-features-8.10.3]]
=== New features

The 8.10.3 release adds the following new and notable features.


elastic-agent::

* Improve Agent Uninstall On Windows By Adding Delay Between Retries When File Removal Is Blocked By Busy Files. {elastic-agent-pull}https://github.com/elastic/elastic-agent/pull/3431[#https://github.com/elastic/elastic-agent/pull/3431] {elastic-agent-issue}https://github.com/elastic/elastic-agent/issues/3221[#https://github.com/elastic/elastic-agent/issues/3221]






[discrete]
[[bug-fixes-8.10.3]]
=== Bug fixes


elastic-agent::

* Resilient Handling Of Air Gapped Pgp Checks. {elastic-agent-pull}https://github.com/elastic/elastic-agent/pull/3427[#https://github.com/elastic/elastic-agent/pull/3427] {elastic-agent-issue}https://github.com/elastic/elastic-agent/issues/3368[#https://github.com/elastic/elastic-agent/issues/3368]

// end 8.10.3 relnotes
26 changes: 26 additions & 0 deletions changelog/8.10.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 8.10.3
entries:
- kind: bug-fix
summary: Resilient handling of air gapped PGP checks
description: Elastic Agent should not fail when remote PGP is specified (or official Elastic fallback PGP used) and remote is not available
component: elastic-agent
pr:
- https://github.com/elastic/elastic-agent/pull/3427
issue:
- https://github.com/elastic/elastic-agent/issues/3368
timestamp: 1695035111
file:
name: 1695035111-Resilient-handling-of-air-gapped-PGP-checks.yaml
checksum: 8741bfa9475a09d5901dc3fab0fed3a06b55d5bb
- kind: feature
summary: Improve Agent uninstall on Windows by adding delay between retries when file removal is blocked by busy files
description: ""
component: elastic-agent
pr:
- https://github.com/elastic/elastic-agent/pull/3431
issue:
- https://github.com/elastic/elastic-agent/issues/3221
timestamp: 1695050880
file:
name: 1695050880-Improve-retry-strategy-when-uninstalling-agent.yaml
checksum: 45eab228dfd89392a0f3685a628f73ccce05d081

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature
kind: enhancement

# Change summary; a 80ish characters long description of the change.
summary: Improve uninstall by adding some pause between retries when removal is blocked by busy files
summary: Increase agent monitoring metrics interval from 10s to 60s to reduce load

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
#description:

# Affected component; a word indicating the component this changeset affects.
component: elastic-agent
component: monitoring

# PR URL; optional; the PR number that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: bug-fix
kind: security

# Change summary; a 80ish characters long description of the change.
summary: Fix gpg verification, if one is successful upgrade should continue.
summary: Upgrade to Go 1.20.9

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
Expand All @@ -25,8 +25,8 @@ component: elastic-agent
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
pr: https://github.com/elastic/elastic-agent/pull/3426
pr: https://github.com/elastic/elastic-agent/pull/3393

# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
issue: https://github.com/elastic/elastic-agent/issues/3368
#issue: https://github.com/owner/repo/1234
19 changes: 13 additions & 6 deletions internal/pkg/agent/application/monitoring/v1_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"path/filepath"
"runtime"
"strings"
"time"
"unicode"

"github.com/elastic/elastic-agent/pkg/component"
Expand Down Expand Up @@ -51,6 +52,10 @@ const (
agentName = "elastic-agent"

windowsOS = "windows"

// metricset execution period used for the monitoring metrics inputs
// we set this to 60s to reduce the load/data volume on the monitoring cluster
metricsCollectionInterval = 60 * time.Second
)

var (
Expand Down Expand Up @@ -517,6 +522,8 @@ func (b *BeatsMonitor) monitoringNamespace() string {
}

func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentIDToBinary map[string]string, monitoringOutputName string, componentList []component.Component) error {

metricsCollectionIntervalString := metricsCollectionInterval.String()
monitoringNamespace := b.monitoringNamespace()
fixedAgentName := strings.ReplaceAll(agentName, "-", "_")
beatsStreams := make([]interface{}, 0, len(componentIDToBinary))
Expand All @@ -532,7 +539,7 @@ func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentI
"path": "/stats",
"hosts": []interface{}{HttpPlusAgentMonitoringEndpoint(b.operatingSystem, b.config.C)},
"namespace": "agent",
"period": "10s",
"period": metricsCollectionIntervalString,
"index": fmt.Sprintf("metrics-elastic_agent.%s-%s", fixedAgentName, monitoringNamespace),
"processors": []interface{}{
map[string]interface{}{
Expand Down Expand Up @@ -608,7 +615,7 @@ func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentI
},
"metricsets": []interface{}{"stats", "state"},
"hosts": endpoints,
"period": "10s",
"period": metricsCollectionIntervalString,
"index": fmt.Sprintf("metrics-elastic_agent.%s-%s", name, monitoringNamespace),
"processors": []interface{}{
map[string]interface{}{
Expand Down Expand Up @@ -663,7 +670,7 @@ func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentI
"hosts": endpoints,
"path": "/stats",
"namespace": "agent",
"period": "10s",
"period": metricsCollectionIntervalString,
"index": fmt.Sprintf("metrics-elastic_agent.%s-%s", fixedAgentName, monitoringNamespace),
"processors": []interface{}{
map[string]interface{}{
Expand Down Expand Up @@ -725,7 +732,7 @@ func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentI
"path": "/inputs/",
"namespace": fbDataStreamName,
"json.is_array": true,
"period": "10s",
"period": metricsCollectionIntervalString,
"index": fmt.Sprintf("metrics-elastic_agent.%s-%s", fbDataStreamName, monitoringNamespace),
"processors": []interface{}{
map[string]interface{}{
Expand Down Expand Up @@ -799,7 +806,7 @@ func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentI
"path": "/shipper",
"hosts": endpoints,
"namespace": "application",
"period": "10s",
"period": metricsCollectionIntervalString,
"processors": createProcessorsForJSONInput(name, monitoringNamespace, b.agentInfo),
},
map[string]interface{}{
Expand All @@ -813,7 +820,7 @@ func (b *BeatsMonitor) injectMetricsInput(cfg map[string]interface{}, componentI
"path": "/stats",
"hosts": endpoints,
"namespace": "agent",
"period": "10s",
"period": metricsCollectionIntervalString,
"processors": createProcessorsForJSONInput(name, monitoringNamespace, b.agentInfo),
})
}
Expand Down
Loading

0 comments on commit 3947fc5

Please sign in to comment.