2024-11-22 16:10:05 +00:00
|
|
|
package diagnostic
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
const (
|
2024-11-27 09:08:54 +00:00
|
|
|
defaultCollectorTimeout = time.Second * 10 // This const define the timeout value of a collector operation.
|
|
|
|
collectorField = "collector" // used for logging purposes
|
|
|
|
systemCollectorName = "system" // used for logging purposes
|
|
|
|
tunnelStateCollectorName = "tunnelState" // used for logging purposes
|
|
|
|
configurationCollectorName = "configuration" // used for logging purposes
|
|
|
|
defaultTimeout = 15 * time.Second // timeout for the collectors
|
|
|
|
twoWeeksOffset = -14 * 24 * time.Hour // maximum offset for the logs
|
|
|
|
logFilename = "cloudflared_logs.txt" // name of the output log file
|
|
|
|
configurationKeyUID = "uid" // Key used to set and get the UID value from the configuration map
|
|
|
|
tailMaxNumberOfLines = "10000" // maximum number of log lines from a virtual runtime (docker or kubernetes)
|
2024-11-29 17:08:42 +00:00
|
|
|
|
|
|
|
// Endpoints used by the diagnostic HTTP Client.
|
2024-12-03 09:14:59 +00:00
|
|
|
cliConfigurationEndpoint = "/diag/configuration"
|
|
|
|
tunnelStateEndpoint = "/diag/tunnel"
|
|
|
|
systemInformationEndpoint = "/diag/system"
|
|
|
|
memoryDumpEndpoint = "debug/pprof/heap"
|
|
|
|
goroutineDumpEndpoint = "debug/pprof/goroutine"
|
|
|
|
metricsEndpoint = "metrics"
|
|
|
|
tunnelConfigurationEndpoint = "/config"
|
2024-12-04 11:37:57 +00:00
|
|
|
// Base for filenames of the diagnostic procedure
|
|
|
|
systemInformationBaseName = "systeminformation.json"
|
|
|
|
metricsBaseName = "metrics.txt"
|
|
|
|
zipName = "cloudflared-diag"
|
|
|
|
heapPprofBaseName = "heap.pprof"
|
|
|
|
goroutinePprofBaseName = "goroutine.pprof"
|
|
|
|
networkBaseName = "network.json"
|
2024-12-04 12:40:51 +00:00
|
|
|
rawNetworkBaseName = "raw-network.txt"
|
2024-12-04 11:37:57 +00:00
|
|
|
tunnelStateBaseName = "tunnelstate.json"
|
2024-12-04 13:26:51 +00:00
|
|
|
cliConfigurationBaseName = "cli-configuration.json"
|
|
|
|
configurationBaseName = "configuration.json"
|
2024-12-04 18:32:49 +00:00
|
|
|
taskResultBaseName = "task-result.json"
|
2024-11-22 16:10:05 +00:00
|
|
|
)
|