-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix config storage for file provider * Change default yolo instance name * Fix logic for discovered config * Add configcheck to the flare * Add unresolved templates dump * Add configcheck reno notes
- Loading branch information
Showing
23 changed files
with
409 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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 2018 Datadog, Inc. | ||
|
||
package response | ||
|
||
import "github.com/DataDog/datadog-agent/pkg/collector/check" | ||
|
||
// ConfigCheckResponse holds the config check response | ||
type ConfigCheckResponse struct { | ||
Configs map[string][]check.Config `json:"configs"` | ||
Warnings map[string][]string `json:"warnings"` | ||
Unresolved map[string]check.Config `json:"unresolved"` | ||
} |
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,44 @@ | ||
// 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 2018 Datadog, Inc. | ||
|
||
package app | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/DataDog/datadog-agent/cmd/agent/common" | ||
"github.com/DataDog/datadog-agent/pkg/flare" | ||
|
||
"github.com/fatih/color" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var withDebug bool | ||
|
||
func init() { | ||
AgentCmd.AddCommand(configCheckCommand) | ||
|
||
configCheckCommand.Flags().BoolVarP(&withDebug, "verbose", "v", false, "print additional debug info") | ||
} | ||
|
||
var configCheckCommand = &cobra.Command{ | ||
Use: "configcheck", | ||
Short: "Print all configurations loaded & resolved of a running agent", | ||
Long: ``, | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
err := common.SetupConfig(confFilePath) | ||
if err != nil { | ||
return fmt.Errorf("unable to set up global agent configuration: %v", err) | ||
} | ||
if flagNoColor { | ||
color.NoColor = true | ||
} | ||
err = flare.GetConfigCheck(color.Output, withDebug) | ||
if err != nil { | ||
return err | ||
} | ||
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
instances: | ||
- foo: bar | ||
- {} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
instances: | ||
- foo: bar | ||
- {} |
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
Oops, something went wrong.