You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/04/21 19:41:37 UTC

[GitHub] [trafficcontrol] rawlinp commented on a diff in pull request #6769: Document Traffic Monitor configuration files

rawlinp commented on code in PR #6769:
URL: https://github.com/apache/trafficcontrol/pull/6769#discussion_r855534203


##########
traffic_monitor/config/config.go:
##########
@@ -149,33 +191,33 @@ func GetAccessLogWriter(cfg Config) (io.WriteCloser, error) {
 
 // DefaultConfig is the default configuration for the application, if no configuration file is given, or if a given config setting doesn't exist in the config file.
 var DefaultConfig = Config{
-	MonitorConfigPollingInterval: 5 * time.Second,
-	HTTPTimeout:                  2 * time.Second,
-	PeerOptimistic:               true,
-	PeerOptimisticQuorumMin:      0,
-	StatPolling:                  true,
-	MaxEvents:                    200,
+	CachePollingProtocol:         Both,
+	CRConfigBackupFile:           CRConfigBackupFile,
+	CRConfigHistoryCount:         20000,

Review Comment:
   we should make this like...100? I can't imagine needing more than like 10 in reality, but 20,000 seems ridiculous



##########
traffic_monitor/config/config.go:
##########
@@ -97,37 +97,79 @@ func (t *PollingProtocol) UnmarshalJSON(b []byte) error {
 	return nil
 }
 
-// Config is the configuration for the application. It includes myriad data, such as polling intervals and log locations.
+// Config is the configuration for the application. It includes myriad data,
+// such as polling intervals and log locations.
 type Config struct {
-	MonitorConfigPollingInterval time.Duration   `json:"-"`
-	HTTPTimeout                  time.Duration   `json:"-"`
-	PeerOptimistic               bool            `json:"peer_optimistic"`
-	PeerOptimisticQuorumMin      int             `json:"peer_optimistic_quorum_min"`
-	DistributedPolling           bool            `json:"distributed_polling"`
-	StatPolling                  bool            `json:"stat_polling"`
-	MaxEvents                    uint64          `json:"max_events"`
-	HealthFlushInterval          time.Duration   `json:"-"`
-	StatFlushInterval            time.Duration   `json:"-"`
-	StatBufferInterval           time.Duration   `json:"-"`
-	LogLocationError             string          `json:"log_location_error"`
-	LogLocationWarning           string          `json:"log_location_warning"`
-	LogLocationInfo              string          `json:"log_location_info"`
-	LogLocationDebug             string          `json:"log_location_debug"`
-	LogLocationEvent             string          `json:"log_location_event"`
-	LogLocationAccess            string          `json:"log_location_access"`
-	ServeReadTimeout             time.Duration   `json:"-"`
-	ServeWriteTimeout            time.Duration   `json:"-"`
-	StaticFileDir                string          `json:"static_file_dir"`
-	CRConfigHistoryCount         uint64          `json:"crconfig_history_count"`
-	TrafficOpsMinRetryInterval   time.Duration   `json:"-"`
-	TrafficOpsMaxRetryInterval   time.Duration   `json:"-"`
-	CRConfigBackupFile           string          `json:"crconfig_backup_file"`
-	TMConfigBackupFile           string          `json:"tmconfig_backup_file"`
-	TrafficOpsDiskRetryMax       uint64          `json:"traffic_ops_disk_retry_max"`
-	CachePollingProtocol         PollingProtocol `json:"cache_polling_protocol"`
-	HTTPPollingFormat            string          `json:"http_polling_format"`
+	// Sets the Internet Protocol version used for polling cache servers.
+	CachePollingProtocol PollingProtocol `json:"cache_polling_protocol"`
+	// A path to a file where CDN Snapshot backups are written.
+	CRConfigBackupFile string `json:"crconfig_backup_file"`
+	// The number of historical CDN Snapshots to store.
+	CRConfigHistoryCount uint64 `json:"crconfig_history_count"`
+	// Controls whether Distributed Polling is enabled.
+	DistributedPolling bool `json:"distributed_polling"`
+	// Defines an interval on which Traffic Monitor will flush its collected
+	// health data such that it is made available through the API.
+	HealthFlushInterval time.Duration `json:"-"`
+	// A MIME-Type that will be sent in the Accept HTTP header in requests to
+	// cache servers for health and stats data.
+	HTTPPollingFormat string `json:"http_polling_format"`
+	// Sets the timeout duration for all HTTP operations - peer-polling and
+	// health data polling.
+	HTTPTimeout time.Duration `json:"-"`
+	// A "lib/go-log"-compliant string defining the logging of Access-level
+	// logs.
+	LogLocationAccess string `json:"log_location_access"`
+	// A "lib/go-log"-compliant string defining the logging of Debug-level logs.
+	LogLocationDebug string `json:"log_location_debug"`
+	// A "lib/go-log"-compliant string defining the logging of Error-level logs.
+	LogLocationError string `json:"log_location_error"`
+	// A "lib/go-log"-compliant string defining the logging of Event-level logs.
+	LogLocationEvent string `json:"log_location_event"`
+	// A "lib/go-log"-compliant string defining the logging of Info-level logs.
+	LogLocationInfo string `json:"log_location_info"`
+	// A "lib/go-log"-compliant string defining the logging of Warning-level
+	// logs.
+	LogLocationWarning string `json:"log_location_warning"`
+	// The maximum number of events to keep in TM's buffer to be served via its
+	// API.
+	MaxEvents uint64 `json:"max_events"`
+	// The interval on which to poll for this TM's CDN's "monitoring config".
+	MonitorConfigPollingInterval time.Duration `json:"-"`
+	// This appears to do nothing.
+	//
+	// Deprecated: This serves no purpose and will be removed in the future.
+	PeerOptimistic bool `json:"peer_optimistic"`

Review Comment:
   We should just remove it, no need to deprecate first. Existing configs that still add it won't be broken, it would just remain unused (as it already is). 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org