Skip to end of metadata
Go to start of metadata

You can access performance metrics for Sauce Connect Proxy over an HTTP connection to a local expvar server, which will display the metrics as a JSON file.

Configuring Performance Metric Monitoring 

By default the expvar server listens on localhost:8888, but you can change the interface and port with the --metrics-address command.

--metrics-address :8000 # listens on all the interfaces' port 8080
--metrics-address 1.2.3.4:80 # listens on 1.2.3.4 port 80

Viewing Performance Metrics

You can view performance metrics by using an HTTP client or web browser to access http://{SauceConnect IP or Localhost:8888}/debug/vars.

Interpreting Performance Metrics

When you access the peformance metrics, you will typically see something like this:

"cmdline": ["/Users/yaroslav/Downloads/sc-4.4.12-osx/bin/sc","-u","User","-k","xxxxxx-xxxx-xxxx-xxx-18e845f4c9a3"],
 
"http": {
			"BytesReceived":31290,
			"BytesTransmitted":1388944,
			"NumRequests":34,
			"NumResponses":34
		},
"kgp": 	{
			"Connected":true,
			"LastStatusChange":1532052072,
			"RoundTripTimeMs":35,
			"ReconnectCount":0
		},
"memstats": {
			"Alloc":1630808,
			"TotalAlloc":10647440,
			"Sys":9509112,
			"Lookups":55,
			"Mallocs":220719,
			"Frees":204517,
			"HeapAlloc":1630808,
			"HeapSys":5668864,
			"HeapIdle":1753088,
			"HeapInuse":3915776,
			"HeapReleased":270336,
			"HeapObjects":16202,
			"StackInuse":622592,
			"StackSys":622592,
			"MSpanInuse":74024,
			"MSpanSys":98304,
			"MCacheInuse":4800,
			"MCacheSys":16384,
			"BuckHashSys":1446894,
			"GCSys":436224,
			"OtherSys":1219850,
			"NextGC":4194304,
			"LastGC":1532052496921727000,
			"PauseTotalNs":753000,
			"PauseNs":[...]
		}
}

kgp

  • kgp.Connected indicates if the client is connected to the Sauce Connect back-end. This field can be used for monitoring tunnel health.
  • kgp.LastStatusChange is a UNIX timestamp indicating the time of the last connectivity change from the client
  • kgp.ReconnectCount is the number of times the connection to the Sauce Connect backend had to be re-established because of the timeout
  • kgp.RoundTripTimeMs is the application layer latency over the last minute.

http

  • http.BytesReceived and http.BytesTransmitted are the number of bytes going through the Sauce Connect Proxy client
  • http.NumRequests and http.NumResponses indicate how many request and responses are currently in-flight