Merge pull request #299 from replicatedhq/ceph-no-name

Ceph collector does not need a name property
This commit is contained in:
emosbaugh
2020-11-13 13:03:05 -08:00
committed by GitHub
2 changed files with 1 additions and 2 deletions

View File

@@ -135,7 +135,6 @@ type Collectd struct {
type Ceph struct {
CollectorMeta `json:",inline" yaml:",inline"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Namespace string `json:"namespace" yaml:"namespace"`
Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
}

View File

@@ -114,7 +114,7 @@ func cephCommandExec(ctx context.Context, c *Collector, cephCollector *troublesh
final := map[string][]byte{}
for filename, result := range results {
pathPrefix := GetCephCollectorFilepath(cephCollector.Name, cephCollector.Namespace)
pathPrefix := GetCephCollectorFilepath(cephCollector.CollectorName, cephCollector.Namespace)
switch {
case strings.HasSuffix(filename, "-stdout.txt"):
final[path.Join(pathPrefix, fmt.Sprintf("%s.%s", command.ID, command.Format))] = result