Skip to content

Commit 6e2b5e6

Browse files
committed
valid json for system probe
1 parent 4c71351 commit 6e2b5e6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

comp/core/remoteagent/impl-systemprobe/remoteagent.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package systemprobeimpl
88

99
import (
1010
"context"
11+
"encoding/json"
1112
"net"
1213

1314
"github.com/DataDog/datadog-agent/comp/core/config"
@@ -129,7 +130,15 @@ func (r *remoteagentImpl) GetStatusDetails(_ context.Context, _ *pbcore.GetStatu
129130

130131
// GetFlareFiles returns files for the system-probe flare
131132
func (r *remoteagentImpl) GetFlareFiles(_ context.Context, _ *pbcore.GetFlareFilesRequest) (*pbcore.GetFlareFilesResponse, error) {
132-
files := helper.DefaultFlareFiles(r.cfg.AllSettings(), "system_probe")
133+
files := make(map[string][]byte)
134+
135+
if data, err := json.MarshalIndent(helper.ExpvarData(), "", " "); err == nil {
136+
files["system_probe_stats.json"] = data
137+
}
138+
139+
if data, err := json.MarshalIndent(r.cfg.AllSettings(), "", " "); err == nil {
140+
files["system_probe_runtime_config_dump.json"] = data
141+
}
133142

134143
if prometheusText, err := r.telemetry.GatherText(false, telemetry.NoFilter); err == nil {
135144
files["system_probe_telemetry.log"] = []byte(prometheusText)

0 commit comments

Comments
 (0)