File: stats-file.vtc

package info (click to toggle)
haproxy 3.2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,928 kB
  • sloc: ansic: 268,119; sh: 3,466; xml: 1,756; python: 1,345; makefile: 1,155; perl: 168; cpp: 21
file content (40 lines) | stat: -rw-r--r-- 850 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
varnishtest "Preload counters via stats-file"

feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(3.0-dev9)'"
feature ignore_unknown_macro

haproxy h1 -conf {
	global
		stats-file ${testdir}/sample-stats-file

	defaults
		timeout client 30s
		timeout server 30s
		timeout connect 30s

	frontend fe
		guid guid-fe
		bind "fd@${feS}" guid-prefix guid-feS

	frontend fe2
		guid guid-fe2
		option socket-stats
		bind "fd@${fe2S}" guid-prefix guid-fe2S

	backend be
		guid guid-be
		server srv ${s1_addr}:${s1_port} guid guid-srv
} -start

haproxy h1 -cli {
	send "show stat fe 15 -1 typed"
	expect ~ "F.*.*.*.stot.1:MCP:u64:1024"

	send "show stat fe2 15 -1 typed"
	expect ~ "L.*.*.*.stot.1:MCP:u64:1024"

	send "show stat be 15 -1 typed"
	expect ~ "B.*.*.*.stot.1:MCP:u64:1024"
	send "show stat be 15 -1 typed"
	expect ~ "S.*.*.*.stot.1:MCP:u64:1024"
}