flare

package
v0.81.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package flare provides helpers for testing the agent flare subcommand.

Index

Constants

This section is empty.

Variables

View Source
var AllConfigFiles = []string{
	"etc/datadog.yaml",
	"etc/security-agent.yaml",
	"etc/system-probe.yaml",
}

AllConfigFiles contains all the config files we can create to configure the Agents

View Source
var AllLogFiles = []string{
	"logs/agent.log",
	"logs/process-agent.log",
	"logs/security-agent.log",
	"logs/system-probe.log",
	"logs/trace-agent.log",
}

AllLogFiles contains all the log files that are created when enabling all products TODO: add these files

  • "logs/dogstatsd_info/dogstatsd-stats.log", // need to enable DSD
  • "logs/jmxfetch.log", // need to enable JMX Fetch
View Source
var DefaultConfigFiles = []string{"etc/datadog.yaml"}

DefaultConfigFiles contains the config file created with a default installation

View Source
var DefaultFlareFiles = []string{
	"config-check.log",
	"diagnose.log",
	"docker_ps.log",
	"envvars.log",
	"go-routine-dump.log",
	"install_info.log",
	"permissions.log",
	"process_agent_runtime_config_dump.yaml",
	"runtime_config_dump.yaml",
	"secrets.log",
	"status.log",
	"system_probe_runtime_config_dump.yaml",
	"version-history.json",
}

DefaultFlareFiles contains all the files that are included in the flare archive by default (no need for a specific configuration option)

View Source
var DefaultFlareFolders = []string{
	"etc/confd/",
	"expvar",
	"logs",
}

DefaultFlareFolders contains all the folders included by default in the flare

View Source
var DefaultLogFiles = []string{
	"logs/agent.log",
	"logs/process-agent.log",
	"logs/trace-agent.log",
}

DefaultLogFiles contains all the log files that are created with a default installation

View Source
var DefaultMetadataFlareFiles = []string{
	"metadata/host.json",
	"metadata/inventory/host.json",
	"metadata/inventory/agent.json",
}

DefaultMetadataFlareFiles contains the metadata files included by default

View Source
var LinuxFiles = []string{}

LinuxFiles contains files that are specific to Linux

View Source
var NonLocalFlareFiles = []string{
	"health.yaml",
	"tagger-list.json",
	"workload-list.log",
	"agent_open_files.txt",
}

NonLocalFlareFiles contains files only available in non-local flare mode

View Source
var NonLocalMetadataFlareFiles = []string{
	"metadata/inventory/checks.json",
}

NonLocalMetadataFlareFiles contains metadata files only available in non-local flare mode

View Source
var ProfilingFiles = []string{
	"profiles/core-1st-heap.pprof",
	"profiles/core-2nd-heap.pprof",
	"profiles/core-block.pprof",
	"profiles/core-cpu.pprof",
	"profiles/core-mutex.pprof",
	"profiles/trace-1st-heap.pprof",
	"profiles/trace-2nd-heap.pprof",
	"profiles/trace-block.pprof",
	"profiles/trace-cpu.pprof",
	"profiles/trace-mutex.pprof",
}

ProfilingFiles contains the profiling files included in a flare with profiling enabled

View Source
var ProfilingNonLinuxFiles = []string{
	"profiles/process-1st-heap.pprof",
	"profiles/process-2nd-heap.pprof",
	"profiles/process-block.pprof",
	"profiles/process-cpu.pprof",
	"profiles/process-mutex.pprof",
}

ProfilingNonLinuxFiles contains profiling files only available on non-Linux platforms

View Source
var UntestedFiles = []string{
	"docker_inspect.log",
	"local",
	"profiles/*",
	"remote-config-state.log",
}

UntestedFiles contains some untested files that needs specific scenario which should be added later.

View Source
var WindowsFiles = []string{
	"typeperf.txt",
	"lodctr.txt",
	"counter_strings.txt",
	"servicestatus.json",
	"datadog.reg",
}

WindowsFiles contains files that are specific to Windows

Functions

func AssertEtcFolderOnlyContainsConfigFile

func AssertEtcFolderOnlyContainsConfigFile(t *testing.T, flare flare.Flare)

AssertEtcFolderOnlyContainsConfigFile verifies that all files in "etc" folder are configuration file (filename containing ".yaml" / ".yml") or folders

func AssertEventlogFolderOnlyContainsWindowsEventLog

func AssertEventlogFolderOnlyContainsWindowsEventLog(t *testing.T, flare flare.Flare)

AssertEventlogFolderOnlyContainsWindowsEventLog verifies that all files in "eventlog" (windows) folder are Windows Event log file (name ends with .evtx) or folders

func AssertFileContains

func AssertFileContains(t *testing.T, flare flare.Flare, filename string, expectedContents ...string)

AssertFileContains verifies that `filename` contains every string in `expectedContents`

func AssertFileNotContains

func AssertFileNotContains(t *testing.T, flare flare.Flare, filename string, expectedContents ...string)

AssertFileNotContains verifies that `filename` does not contain any string in `expectedContents`

func AssertFilesExist

func AssertFilesExist(t *testing.T, flare flare.Flare, filenames []string)

AssertFilesExist verifies that all files in filenames exist in the flare archive

func AssertFoldersExist

func AssertFoldersExist(t *testing.T, flare flare.Flare, filenames []string)

AssertFoldersExist verifies that all files in filenames exist in the flare archive and are folders

func AssertLogsFolderOnlyContainsLogFile

func AssertLogsFolderOnlyContainsLogFile(t *testing.T, flare flare.Flare)

AssertLogsFolderOnlyContainsLogFile verifies that all files in "logs" folder are logs file (filename containing ".log") or folders

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL