-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade telegraf version to aws version of 1.23.0, bump go version to 1.17, make necessary changes to fix building errors. * Bump Go version to 1.17 and make adjustments accordingly * Bump github yaml go versions to 1.17.8 * WIP: dep fix * Fix Cadvisor and Remove Cadvisor For Darwin (#454) Update Cadvisor, Runc, GOPSUtil * Create separate RegisterEventLogger for non-windows and windows * Lumberjack logger fix * Use Empty Context For K8 Endpoints * Add k8 Logging (#466) * Fix K8 namespace_number_of_running_pods * Make Opts Empty Instead Of Var * Echo TOML Output * Upload To Public Test ECR * Use Public Test ECR * Add Log Line For Checking EC2 Metadata * Remove Not Needed Log Line * Add Back {{cluster_name}} From Hard Coded Cluster * Mount Containerd Sock * Update scraper code in start.go * Use https://github.com/aws-samples/amazon-cloudwatch-container-insights/blob/master/k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks.yaml For Prometheus EKS Yaml * Update Prometheus Version * Init Prometheus Discovery * Add Go Mod Caching To Dockerfile * Fix Haproxy Missing haproxy_backend_http_responses_total$ * Post rebasing go mod tidy and vender sync * Resolve Some Comments * resolving comments Co-authored-by: Seth L <[email protected]> Co-authored-by: Seth Levine <[email protected]>
- Loading branch information
1 parent
5d7e322
commit 5335531
Showing
63 changed files
with
4,284 additions
and
893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
cmd/amazon-cloudwatch-agent/register_event_logger_notwindows.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
//go:build !windows | ||
// +build !windows | ||
|
||
package main | ||
|
||
// RegisterEventLogger is for supporting Windows Event, it should only be created when running on Windows | ||
// To minimize duplicate code for Windows vs non-Windows build amazon-cloudwatch-agent.go main class, | ||
// create this dummy method so amazon-cloudwatch-agent.go can be build independent to the OS. Because of this method is | ||
// invoked inside the if statement of "if runtime.GOOS == "windows" && windowsRunAsService() {" effectively it | ||
// is unreachable, but Go compiler needs to see this exits to build. | ||
func RegisterEventLogger() error { | ||
// Unreachable code, do nothing. | ||
return nil | ||
} |
24 changes: 24 additions & 0 deletions
24
cmd/amazon-cloudwatch-agent/register_event_logger_windows.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
//go:build windows | ||
// +build windows | ||
|
||
package main | ||
|
||
import ( | ||
lumberjack "github.com/aws/amazon-cloudwatch-agent/logger" | ||
"github.com/influxdata/telegraf/logger" | ||
) | ||
|
||
// RegisterEventLogger is for supporting Windows Event | ||
func RegisterEventLogger() error { | ||
// When in service mode, register eventlog target and setup default logging to eventlog | ||
|
||
e := logger.RegisterEventLogger(LogTargetEventLog) | ||
if e != nil { | ||
return e | ||
} | ||
logger.SetupLogging(logger.LogConfig{LogTarget: lumberjack.LogTargetLumberjack}) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.