diff -Nru prometheus-varnish-exporter-1.5/CHANGELOG.md prometheus-varnish-exporter-1.5.2/CHANGELOG.md --- prometheus-varnish-exporter-1.5/CHANGELOG.md 2019-06-24 08:40:06.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/CHANGELOG.md 2019-10-27 11:45:46.000000000 +0000 @@ -1,7 +1,20 @@ +1.5.2 +===== +* Fix metric names and missing labels for file cache metrics ([#55](https://github.com/jonnenauha/prometheus_varnish_exporter/pull/55) @thedustin) +* Fix scraping for Varnish 3.x. Removes the `main_n_ban` grouping. Metrics will now have individual `bans_` metrics instad of the grouped metric that had `type` as a label. ([#51](https://github.com/jonnenauha/prometheus_varnish_exporter/pull/51) @glennslaven) + * If you previously updated to 1.5 your exports would have already been broken as the grouping tries to combine gauge and counter metrics, which is not allowed by Prometheus. + * This is breaking change if you are using Varnish 3.x and use ban metrics in your dashboards, you'll need to update them to the new ones. +* Clean exported backend name if beginning with reload_ ([#56](https://github.com/jonnenauha/prometheus_varnish_exporter/pull/56) @stromnet) + +1.5.1 +===== +* Fix incorrectly typing Varnish 4.0.x stat flag `a` metrics as gauges instead of counters. ([#48](https://github.com/jonnenauha/prometheus_varnish_exporter/pull/48) @glennslaven) +* Fix `-test` mode to wait for full metrics scrape before continuing. + 1.5 === -* Deprecate `-no-exit`. Default behavior is not to exit on scrape errors as it should be for a long running HTTP server. - * This was design misstep. You will not get a deprecation warning if you pass `-no-exit` but the process behaves as before. +* Deprecate `-no-exit`. Default behavior is now not to exit on scrape errors as it should be for a long running HTTP server. + * This was design misstep. You will now get a deprecation warning if you pass `-no-exit` but the process behaves as before. * New explicit `-exit-on-errors` has been added for users who want the old default behavior back. * Correctly export gauge and counter types from `varnishstat` output `type` property. * Add go module support. diff -Nru prometheus-varnish-exporter-1.5/debian/changelog prometheus-varnish-exporter-1.5.2/debian/changelog --- prometheus-varnish-exporter-1.5/debian/changelog 2019-07-28 17:48:19.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/debian/changelog 2020-03-15 12:21:57.000000000 +0000 @@ -1,3 +1,11 @@ +prometheus-varnish-exporter (1.5.2-1) unstable; urgency=high + + * New upstream version + * Add debian/patches/go-issue-31859.patch to fix FTBFS with go >= 1.13 + (Closes: #946215) + + -- Emanuele Rocca Sun, 15 Mar 2020 13:21:57 +0100 + prometheus-varnish-exporter (1.5-1) unstable; urgency=medium * New upstream version diff -Nru prometheus-varnish-exporter-1.5/debian/patches/go-issue-31859.patch prometheus-varnish-exporter-1.5.2/debian/patches/go-issue-31859.patch --- prometheus-varnish-exporter-1.5/debian/patches/go-issue-31859.patch 1970-01-01 00:00:00.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/debian/patches/go-issue-31859.patch 2020-03-15 12:21:57.000000000 +0000 @@ -0,0 +1,32 @@ +Description: fix FTBFS with go 1.13 + Workaround for issue https://github.com/golang/go/issues/31859 + . +Author: Emanuele Rocca + +--- +Bug: https://github.com/golang/go/issues/31859 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946215 +Last-Update: 2020-03-15 + +--- prometheus-varnish-exporter-1.5.2.orig/main.go ++++ prometheus-varnish-exporter-1.5.2/main.go +@@ -9,6 +9,7 @@ import ( + "os" + "sync" + "time" ++ "testing" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" +@@ -71,6 +72,11 @@ func (p *varnishstatParams) make() (para + return params + } + ++var _ = func() bool { ++ testing.Init() ++ return true ++}() ++ + func init() { + // prometheus conventions + flag.StringVar(&StartParams.ListenAddress, "web.listen-address", StartParams.ListenAddress, "Address on which to expose metrics and web interface.") diff -Nru prometheus-varnish-exporter-1.5/debian/patches/series prometheus-varnish-exporter-1.5.2/debian/patches/series --- prometheus-varnish-exporter-1.5/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/debian/patches/series 2020-03-15 12:21:57.000000000 +0000 @@ -0,0 +1 @@ +go-issue-31859.patch diff -Nru prometheus-varnish-exporter-1.5/main.go prometheus-varnish-exporter-1.5.2/main.go --- prometheus-varnish-exporter-1.5/main.go 2019-06-24 08:40:06.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/main.go 2019-10-27 11:45:46.000000000 +0000 @@ -145,6 +145,7 @@ // Test to verify everything is ok before starting the server { + done := make(chan bool) metrics := make(chan prometheus.Metric) go func() { for m := range metrics { @@ -152,10 +153,13 @@ logInfo("%s", m.Desc()) } } + done <- true }() tStart := time.Now() buf, err := ScrapeVarnish(metrics) close(metrics) + <-done + if err == nil { logInfo("Test scrape done in %s", time.Now().Sub(tStart)) logRaw("") diff -Nru prometheus-varnish-exporter-1.5/prometheus.go prometheus-varnish-exporter-1.5.2/prometheus.go --- prometheus-varnish-exporter-1.5/prometheus.go 2019-06-24 08:40:06.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/prometheus.go 2019-10-27 11:45:46.000000000 +0000 @@ -126,6 +126,9 @@ group{name: "sma", prefixes: []string{ "sma.", }}, + group{name: "smf", prefixes: []string{ + "smf.", + }}, group{name: "mgt", prefixes: []string{ "mgt.", }}, @@ -162,13 +165,6 @@ total: "main_n_wrk", desc: "Number of worker threads", }, - &grouping{ - newPrefix: "main_bans", - prefix: "main_n_ban", - total: "main_n_ban", - desc: "Number of bans", - labelKey: "action", - }, } fqNames = map[string]string{ "varnish_lck_colls": "varnish_lock_collisions", @@ -188,6 +184,16 @@ "varnish_sma_g_alloc": "type", "varnish_sma_g_bytes": "type", "varnish_sma_g_space": "type", + "varnish_smf_c_bytes": "type", + "varnish_smf_c_fail": "type", + "varnish_smf_c_freed": "type", + "varnish_smf_c_req": "type", + "varnish_smf_g_alloc": "type", + "varnish_smf_g_bytes": "type", + "varnish_smf_g_smf_frag": "type", + "varnish_smf_g_smf_large": "type", + "varnish_smf_g_smf": "type", + "varnish_smf_g_space": "type", } ) @@ -217,6 +223,16 @@ name = name[len(prefix):] } } + + // reload_2019-08-29T100458. as by varnish_reload_vcl in 4.x + // reload_20191014_091124_78599. as by varnishreload in 6+ + if strings.HasPrefix(name, "reload_") { + dot := strings.Index(name, ".") + if dot != -1 { + name = name[dot + 1:] + } + } + return name } diff -Nru prometheus-varnish-exporter-1.5/README.md prometheus-varnish-exporter-1.5.2/README.md --- prometheus-varnish-exporter-1.5/README.md 2019-06-24 08:40:06.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/README.md 2019-10-27 11:45:46.000000000 +0000 @@ -16,9 +16,9 @@ # Installing and running -You can find the latest binary releases for linux, darwin, windows, freebsd, openbsd and netbsd from the [github releases page](https://github.com/jonnenauha/prometheus_varnish_exporter/releases). +You can find the latest binary releases for linux, darwin, windows, freebsd, openbsd and netbsd from the [github releases page](https://github.com/jonnenauha/prometheus_varnish_exporter/releases). -By default the exporter listens on port 9131. See `prometheus_varnish_exporter -h` for available options. It is recommended to use `-no-exit` in production to not exit the process on failed scrapes. Note that if Varnish is not running, `varnishstat` will still produce a successful scrape. +By default the exporter listens on port 9131. See `prometheus_varnish_exporter -h` for available options. To test that `varnishstat` is found on the host machine and to preview all exported metrics run @@ -26,9 +26,11 @@ # Docker -Scraping metrics from Varnish running in a docker container is possible since 1.4.1. I still don't have a easy, clear and user friendly way of running this exporter in a docker container, if you have any ideas open a issue. Resolve your Varnish container name with `docker ps` and run the following. This will use `docker exec ` to execute varnishstat inside the spesified container. +Scraping metrics from Varnish running in a docker container is possible since 1.4.1. Resolve your Varnish container name with `docker ps` and run the following. This will use `docker exec ` to execute varnishstat inside the spesified container. - prometheus_varnish_exporter -no-exit -docker-container-name + prometheus_varnish_exporter -docker-container-name + +I still don't have a easy, clear and user friendly way of running this exporter in a docker container. For community efforts and solutions see [this issue](https://github.com/jonnenauha/prometheus_varnish_exporter/issues/25#issuecomment-492546458). # Grafana dashboards @@ -54,23 +56,22 @@ # Build **One time setup** -1. [Install go](https://golang.org/doc/install) or use OS repos `golang` package. -2. Make a directory e.g. `~/go-workspace` for go development and set it to env variable `GOPATH`. + +This repot support go modules so out of `GOPATH` builds are supported. This makes development and buildings easier for go "novices". + +You need go 1.11 or higher, otherwise you can keep using `GOPATH` based development ([see old README](https://github.com/jonnenauha/prometheus_varnish_exporter/blob/1.4.1/README.md#build)). + +1. [Install latest go](https://golang.org/doc/install) or use OS repos `golang` package. **Development** ```bash # clone -mkdir -p $GOPATH/src/github.com/jonnenauha -cd $GOPATH/src/github.com/jonnenauha git clone git@github.com:jonnenauha/prometheus_varnish_exporter.git cd prometheus_varnish_exporter -# build -go get -v # get deps -go build # build binary to current directory +# build binary to current directory +go build # release with cross compilation ./build.sh ``` - -You can fork this repo and replace the working dir with `$GOPATH/src/github.com/` and sent PRs from your development fork. Other git providers than github will also work just fine, just adapt your package dir path. diff -Nru prometheus-varnish-exporter-1.5/test/scrape/3.0.5.json prometheus-varnish-exporter-1.5.2/test/scrape/3.0.5.json --- prometheus-varnish-exporter-1.5/test/scrape/3.0.5.json 1970-01-01 00:00:00.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/test/scrape/3.0.5.json 2019-10-27 11:45:46.000000000 +0000 @@ -0,0 +1,1214 @@ +{ + "timestamp": "2019-08-20T00:03:35", + "client_conn": { + "value": 216, + "flag": "a", + "description": "Client connections accepted" + }, + "client_drop": { + "value": 0, + "flag": "a", + "description": "Connection dropped, no sess/wrk" + }, + "client_req": { + "value": 0, + "flag": "a", + "description": "Client requests received" + }, + "cache_hit": { + "value": 0, + "flag": "a", + "description": "Cache hits" + }, + "cache_hitpass": { + "value": 0, + "flag": "a", + "description": "Cache hits for pass" + }, + "cache_miss": { + "value": 0, + "flag": "a", + "description": "Cache misses" + }, + "backend_conn": { + "value": 0, + "flag": "a", + "description": "Backend conn. success" + }, + "backend_unhealthy": { + "value": 0, + "flag": "a", + "description": "Backend conn. not attempted" + }, + "backend_busy": { + "value": 0, + "flag": "a", + "description": "Backend conn. too many" + }, + "backend_fail": { + "value": 0, + "flag": "a", + "description": "Backend conn. failures" + }, + "backend_reuse": { + "value": 0, + "flag": "a", + "description": "Backend conn. reuses" + }, + "backend_toolate": { + "value": 0, + "flag": "a", + "description": "Backend conn. was closed" + }, + "backend_recycle": { + "value": 0, + "flag": "a", + "description": "Backend conn. recycles" + }, + "backend_retry": { + "value": 0, + "flag": "a", + "description": "Backend conn. retry" + }, + "fetch_head": { + "value": 0, + "flag": "a", + "description": "Fetch head" + }, + "fetch_length": { + "value": 0, + "flag": "a", + "description": "Fetch with Length" + }, + "fetch_chunked": { + "value": 0, + "flag": "a", + "description": "Fetch chunked" + }, + "fetch_eof": { + "value": 0, + "flag": "a", + "description": "Fetch EOF" + }, + "fetch_bad": { + "value": 0, + "flag": "a", + "description": "Fetch had bad headers" + }, + "fetch_close": { + "value": 0, + "flag": "a", + "description": "Fetch wanted close" + }, + "fetch_oldhttp": { + "value": 0, + "flag": "a", + "description": "Fetch pre HTTP/1.1 closed" + }, + "fetch_zero": { + "value": 0, + "flag": "a", + "description": "Fetch zero len" + }, + "fetch_failed": { + "value": 0, + "flag": "a", + "description": "Fetch failed" + }, + "fetch_1xx": { + "value": 0, + "flag": "a", + "description": "Fetch no body (1xx)" + }, + "fetch_204": { + "value": 0, + "flag": "a", + "description": "Fetch no body (204)" + }, + "fetch_304": { + "value": 0, + "flag": "a", + "description": "Fetch no body (304)" + }, + "n_sess_mem": { + "value": 10, + "flag": "i", + "description": "N struct sess_mem" + }, + "n_sess": { + "value": 0, + "flag": "i", + "description": "N struct sess" + }, + "n_object": { + "value": 0, + "flag": "i", + "description": "N struct object" + }, + "n_vampireobject": { + "value": 0, + "flag": "i", + "description": "N unresurrected objects" + }, + "n_objectcore": { + "value": 0, + "flag": "i", + "description": "N struct objectcore" + }, + "n_objecthead": { + "value": 0, + "flag": "i", + "description": "N struct objecthead" + }, + "n_waitinglist": { + "value": 0, + "flag": "i", + "description": "N struct waitinglist" + }, + "n_vbc": { + "value": 0, + "flag": "i", + "description": "N struct vbc" + }, + "n_wrk": { + "value": 10, + "flag": "i", + "description": "N worker threads" + }, + "n_wrk_create": { + "value": 10, + "flag": "a", + "description": "N worker threads created" + }, + "n_wrk_failed": { + "value": 0, + "flag": "a", + "description": "N worker threads not created" + }, + "n_wrk_max": { + "value": 0, + "flag": "a", + "description": "N worker threads limited" + }, + "n_wrk_lqueue": { + "value": 0, + "flag": "a", + "description": "work request queue length" + }, + "n_wrk_queued": { + "value": 0, + "flag": "a", + "description": "N queued work requests" + }, + "n_wrk_drop": { + "value": 0, + "flag": "a", + "description": "N dropped work requests" + }, + "n_backend": { + "value": 1, + "flag": "i", + "description": "N backends" + }, + "n_expired": { + "value": 0, + "flag": "i", + "description": "N expired objects" + }, + "n_lru_nuked": { + "value": 0, + "flag": "i", + "description": "N LRU nuked objects" + }, + "n_lru_moved": { + "value": 0, + "flag": "i", + "description": "N LRU moved objects" + }, + "losthdr": { + "value": 0, + "flag": "a", + "description": "HTTP header overflows" + }, + "n_objsendfile": { + "value": 0, + "flag": "a", + "description": "Objects sent with sendfile" + }, + "n_objwrite": { + "value": 0, + "flag": "a", + "description": "Objects sent with write" + }, + "n_objoverflow": { + "value": 0, + "flag": "a", + "description": "Objects overflowing workspace" + }, + "s_sess": { + "value": 216, + "flag": "a", + "description": "Total Sessions" + }, + "s_req": { + "value": 0, + "flag": "a", + "description": "Total Requests" + }, + "s_pipe": { + "value": 0, + "flag": "a", + "description": "Total pipe" + }, + "s_pass": { + "value": 0, + "flag": "a", + "description": "Total pass" + }, + "s_fetch": { + "value": 0, + "flag": "a", + "description": "Total fetch" + }, + "s_hdrbytes": { + "value": 0, + "flag": "a", + "description": "Total header bytes" + }, + "s_bodybytes": { + "value": 0, + "flag": "a", + "description": "Total body bytes" + }, + "sess_closed": { + "value": 216, + "flag": "a", + "description": "Session Closed" + }, + "sess_pipeline": { + "value": 0, + "flag": "a", + "description": "Session Pipeline" + }, + "sess_readahead": { + "value": 0, + "flag": "a", + "description": "Session Read Ahead" + }, + "sess_linger": { + "value": 0, + "flag": "a", + "description": "Session Linger" + }, + "sess_herd": { + "value": 0, + "flag": "a", + "description": "Session herd" + }, + "shm_records": { + "value": 673, + "flag": "a", + "description": "SHM records" + }, + "shm_writes": { + "value": 673, + "flag": "a", + "description": "SHM writes" + }, + "shm_flushes": { + "value": 0, + "flag": "a", + "description": "SHM flushes due to overflow" + }, + "shm_cont": { + "value": 0, + "flag": "a", + "description": "SHM MTX contention" + }, + "shm_cycles": { + "value": 0, + "flag": "a", + "description": "SHM cycles through buffer" + }, + "sms_nreq": { + "value": 0, + "flag": "a", + "description": "SMS allocator requests" + }, + "sms_nobj": { + "value": 0, + "flag": "i", + "description": "SMS outstanding allocations" + }, + "sms_nbytes": { + "value": 0, + "flag": "i", + "description": "SMS outstanding bytes" + }, + "sms_balloc": { + "value": 0, + "flag": "i", + "description": "SMS bytes allocated" + }, + "sms_bfree": { + "value": 0, + "flag": "i", + "description": "SMS bytes freed" + }, + "backend_req": { + "value": 0, + "flag": "a", + "description": "Backend requests made" + }, + "n_vcl": { + "value": 1, + "flag": "a", + "description": "N vcl total" + }, + "n_vcl_avail": { + "value": 1, + "flag": "a", + "description": "N vcl available" + }, + "n_vcl_discard": { + "value": 0, + "flag": "a", + "description": "N vcl discarded" + }, + "n_ban": { + "value": 1, + "flag": "i", + "description": "N total active bans" + }, + "n_ban_gone": { + "value": 1, + "flag": "i", + "description": "N total gone bans" + }, + "n_ban_add": { + "value": 1, + "flag": "a", + "description": "N new bans added" + }, + "n_ban_retire": { + "value": 0, + "flag": "a", + "description": "N old bans deleted" + }, + "n_ban_obj_test": { + "value": 0, + "flag": "a", + "description": "N objects tested" + }, + "n_ban_re_test": { + "value": 0, + "flag": "a", + "description": "N regexps tested against" + }, + "n_ban_dups": { + "value": 0, + "flag": "a", + "description": "N duplicate bans removed" + }, + "hcb_nolock": { + "value": 0, + "flag": "a", + "description": "HCB Lookups without lock" + }, + "hcb_lock": { + "value": 0, + "flag": "a", + "description": "HCB Lookups with lock" + }, + "hcb_insert": { + "value": 0, + "flag": "a", + "description": "HCB Inserts" + }, + "esi_errors": { + "value": 0, + "flag": "a", + "description": "ESI parse errors (unlock)" + }, + "esi_warnings": { + "value": 0, + "flag": "a", + "description": "ESI parse warnings (unlock)" + }, + "accept_fail": { + "value": 0, + "flag": "a", + "description": "Accept failures" + }, + "client_drop_late": { + "value": 0, + "flag": "a", + "description": "Connection dropped late" + }, + "uptime": { + "value": 561, + "flag": "a", + "description": "Client uptime" + }, + "dir_dns_lookups": { + "value": 0, + "flag": "a", + "description": "DNS director lookups" + }, + "dir_dns_failed": { + "value": 0, + "flag": "a", + "description": "DNS director failed lookups" + }, + "dir_dns_hit": { + "value": 0, + "flag": "a", + "description": "DNS director cached lookups hit" + }, + "dir_dns_cache_full": { + "value": 0, + "flag": "a", + "description": "DNS director full dnscache" + }, + "vmods": { + "value": 0, + "flag": "i", + "description": "Loaded VMODs" + }, + "n_gzip": { + "value": 0, + "flag": "a", + "description": "Gzip operations" + }, + "n_gunzip": { + "value": 0, + "flag": "a", + "description": "Gunzip operations" + }, + "sess_pipe_overflow": { + "value": 0, + "flag": "c", + "description": "Dropped sessions due to session pipe overflow" + }, + "LCK.sms.creat": { + "type": "LCK", + "ident": "sms", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.sms.destroy": { + "type": "LCK", + "ident": "sms", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sms.locks": { + "type": "LCK", + "ident": "sms", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.sms.colls": { + "type": "LCK", + "ident": "sms", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.smp.creat": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.smp.destroy": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.smp.locks": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.smp.colls": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.sma.creat": { + "type": "LCK", + "ident": "sma", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.sma.destroy": { + "type": "LCK", + "ident": "sma", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sma.locks": { + "type": "LCK", + "ident": "sma", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.sma.colls": { + "type": "LCK", + "ident": "sma", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.smf.creat": { + "type": "LCK", + "ident": "smf", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.smf.destroy": { + "type": "LCK", + "ident": "smf", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.smf.locks": { + "type": "LCK", + "ident": "smf", + "value": 1, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.smf.colls": { + "type": "LCK", + "ident": "smf", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.hsl.creat": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.hsl.destroy": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.hsl.locks": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.hsl.colls": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.hcb.creat": { + "type": "LCK", + "ident": "hcb", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.hcb.destroy": { + "type": "LCK", + "ident": "hcb", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.hcb.locks": { + "type": "LCK", + "ident": "hcb", + "value": 4, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.hcb.colls": { + "type": "LCK", + "ident": "hcb", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.hcl.creat": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.hcl.destroy": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.hcl.locks": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.hcl.colls": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.vcl.creat": { + "type": "LCK", + "ident": "vcl", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vcl.destroy": { + "type": "LCK", + "ident": "vcl", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vcl.locks": { + "type": "LCK", + "ident": "vcl", + "value": 5, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vcl.colls": { + "type": "LCK", + "ident": "vcl", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.stat.creat": { + "type": "LCK", + "ident": "stat", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.stat.destroy": { + "type": "LCK", + "ident": "stat", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.stat.locks": { + "type": "LCK", + "ident": "stat", + "value": 226, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.stat.colls": { + "type": "LCK", + "ident": "stat", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.sessmem.creat": { + "type": "LCK", + "ident": "sessmem", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.sessmem.destroy": { + "type": "LCK", + "ident": "sessmem", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sessmem.locks": { + "type": "LCK", + "ident": "sessmem", + "value": 253, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.sessmem.colls": { + "type": "LCK", + "ident": "sessmem", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.wstat.creat": { + "type": "LCK", + "ident": "wstat", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.wstat.destroy": { + "type": "LCK", + "ident": "wstat", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.wstat.locks": { + "type": "LCK", + "ident": "wstat", + "value": 1129, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.wstat.colls": { + "type": "LCK", + "ident": "wstat", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.herder.creat": { + "type": "LCK", + "ident": "herder", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.herder.destroy": { + "type": "LCK", + "ident": "herder", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.herder.locks": { + "type": "LCK", + "ident": "herder", + "value": 1, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.herder.colls": { + "type": "LCK", + "ident": "herder", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.wq.creat": { + "type": "LCK", + "ident": "wq", + "value": 2, + "flag": "a", + "description": "Created locks" + }, + "LCK.wq.destroy": { + "type": "LCK", + "ident": "wq", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.wq.locks": { + "type": "LCK", + "ident": "wq", + "value": 1566, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.wq.colls": { + "type": "LCK", + "ident": "wq", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.objhdr.creat": { + "type": "LCK", + "ident": "objhdr", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.objhdr.destroy": { + "type": "LCK", + "ident": "objhdr", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.objhdr.locks": { + "type": "LCK", + "ident": "objhdr", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.objhdr.colls": { + "type": "LCK", + "ident": "objhdr", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.exp.creat": { + "type": "LCK", + "ident": "exp", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.exp.destroy": { + "type": "LCK", + "ident": "exp", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.exp.locks": { + "type": "LCK", + "ident": "exp", + "value": 561, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.exp.colls": { + "type": "LCK", + "ident": "exp", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.lru.creat": { + "type": "LCK", + "ident": "lru", + "value": 2, + "flag": "a", + "description": "Created locks" + }, + "LCK.lru.destroy": { + "type": "LCK", + "ident": "lru", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.lru.locks": { + "type": "LCK", + "ident": "lru", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.lru.colls": { + "type": "LCK", + "ident": "lru", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.cli.creat": { + "type": "LCK", + "ident": "cli", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.cli.destroy": { + "type": "LCK", + "ident": "cli", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.cli.locks": { + "type": "LCK", + "ident": "cli", + "value": 18, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.cli.colls": { + "type": "LCK", + "ident": "cli", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.ban.creat": { + "type": "LCK", + "ident": "ban", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.ban.destroy": { + "type": "LCK", + "ident": "ban", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.ban.locks": { + "type": "LCK", + "ident": "ban", + "value": 564, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.ban.colls": { + "type": "LCK", + "ident": "ban", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.vbp.creat": { + "type": "LCK", + "ident": "vbp", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vbp.destroy": { + "type": "LCK", + "ident": "vbp", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vbp.locks": { + "type": "LCK", + "ident": "vbp", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vbp.colls": { + "type": "LCK", + "ident": "vbp", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.vbe.creat": { + "type": "LCK", + "ident": "vbe", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vbe.destroy": { + "type": "LCK", + "ident": "vbe", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vbe.locks": { + "type": "LCK", + "ident": "vbe", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vbe.colls": { + "type": "LCK", + "ident": "vbe", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "LCK.backend.creat": { + "type": "LCK", + "ident": "backend", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.backend.destroy": { + "type": "LCK", + "ident": "backend", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.backend.locks": { + "type": "LCK", + "ident": "backend", + "value": 1, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.backend.colls": { + "type": "LCK", + "ident": "backend", + "value": 0, + "flag": "a", + "description": "Collisions" + }, + "SMF.s0.c_req": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Allocator requests" + }, + "SMF.s0.c_fail": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Allocator failures" + }, + "SMF.s0.c_bytes": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Bytes allocated" + }, + "SMF.s0.c_freed": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Bytes freed" + }, + "SMF.s0.g_alloc": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "i", + "description": "Allocations outstanding" + }, + "SMF.s0.g_bytes": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "i", + "description": "Bytes outstanding" + }, + "SMF.s0.g_space": { + "type": "SMF", + "ident": "s0", + "value": 2220228608, + "flag": "i", + "description": "Bytes available" + }, + "SMF.s0.g_smf": { + "type": "SMF", + "ident": "s0", + "value": 4, + "flag": "i", + "description": "N struct smf" + }, + "SMF.s0.g_smf_frag": { + "type": "SMF", + "ident": "s0", + "value": 0, + "flag": "i", + "description": "N small free smf" + }, + "SMF.s0.g_smf_large": { + "type": "SMF", + "ident": "s0", + "value": 4, + "flag": "i", + "description": "N large free smf" + }, + "SMA.Transient.c_req": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Allocator requests" + }, + "SMA.Transient.c_fail": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Allocator failures" + }, + "SMA.Transient.c_bytes": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Bytes allocated" + }, + "SMA.Transient.c_freed": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Bytes freed" + }, + "SMA.Transient.g_alloc": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "i", + "description": "Allocations outstanding" + }, + "SMA.Transient.g_bytes": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "i", + "description": "Bytes outstanding" + }, + "SMA.Transient.g_space": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "i", + "description": "Bytes available" + }, + "VBE.default(10.100.225.15,,80).vcls": { + "type": "VBE", + "ident": "default(10.100.225.15,,80)", + "value": 1, + "flag": "i", + "description": "VCL references" + }, + "VBE.default(10.100.225.15,,80).happy": { + "type": "VBE", + "ident": "default(10.100.225.15,,80)", + "value": 0, + "flag": "b", + "description": "Happy health probes" + } +} \ No newline at end of file diff -Nru prometheus-varnish-exporter-1.5/test/scrape/4.0.5.json prometheus-varnish-exporter-1.5.2/test/scrape/4.0.5.json --- prometheus-varnish-exporter-1.5/test/scrape/4.0.5.json 1970-01-01 00:00:00.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/test/scrape/4.0.5.json 2019-10-27 11:45:46.000000000 +0000 @@ -0,0 +1,1928 @@ +{ + "timestamp": "2019-07-31T23:56:36", + "MAIN.uptime": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Child process uptime" + }, + "MAIN.sess_conn": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Sessions accepted" + }, + "MAIN.sess_drop": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Sessions dropped" + }, + "MAIN.sess_fail": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Session accept failures" + }, + "MAIN.sess_pipe_overflow": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Session pipe overflow" + }, + "MAIN.client_req_400": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Client requests received, subject to 400 errors" + }, + "MAIN.client_req_411": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Client requests received, subject to 411 errors" + }, + "MAIN.client_req_413": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Client requests received, subject to 413 errors" + }, + "MAIN.client_req_417": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Client requests received, subject to 417 errors" + }, + "MAIN.client_req": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Good client requests received" + }, + "MAIN.cache_hit": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Cache hits" + }, + "MAIN.cache_hitpass": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Cache hits for pass" + }, + "MAIN.cache_miss": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Cache misses" + }, + "MAIN.backend_conn": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. success" + }, + "MAIN.backend_unhealthy": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. not attempted" + }, + "MAIN.backend_busy": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. too many" + }, + "MAIN.backend_fail": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. failures" + }, + "MAIN.backend_reuse": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. reuses" + }, + "MAIN.backend_toolate": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. was closed" + }, + "MAIN.backend_recycle": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. recycles" + }, + "MAIN.backend_retry": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend conn. retry" + }, + "MAIN.fetch_head": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch no body (HEAD)" + }, + "MAIN.fetch_length": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch with Length" + }, + "MAIN.fetch_chunked": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch chunked" + }, + "MAIN.fetch_eof": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch EOF" + }, + "MAIN.fetch_bad": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch bad T-E" + }, + "MAIN.fetch_close": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch wanted close" + }, + "MAIN.fetch_oldhttp": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch pre HTTP/1.1 closed" + }, + "MAIN.fetch_zero": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch zero len body" + }, + "MAIN.fetch_1xx": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch no body (1xx)" + }, + "MAIN.fetch_204": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch no body (204)" + }, + "MAIN.fetch_304": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch no body (304)" + }, + "MAIN.fetch_failed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch failed (all causes)" + }, + "MAIN.fetch_no_thread": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Fetch failed (no thread)" + }, + "MAIN.pools": { + "type": "MAIN", + "value": 2, + "flag": "g", + "description": "Number of thread pools" + }, + "MAIN.threads": { + "type": "MAIN", + "value": 200, + "flag": "g", + "description": "Total number of threads" + }, + "MAIN.threads_limited": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Threads hit max" + }, + "MAIN.threads_created": { + "type": "MAIN", + "value": 200, + "flag": "c", + "description": "Threads created" + }, + "MAIN.threads_destroyed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Threads destroyed" + }, + "MAIN.threads_failed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Thread creation failed" + }, + "MAIN.thread_queue_len": { + "type": "MAIN", + "value": 0, + "flag": "g", + "description": "Length of session queue" + }, + "MAIN.busy_sleep": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Number of requests sent to sleep on busy objhdr" + }, + "MAIN.busy_wakeup": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Number of requests woken after sleep on busy objhdr" + }, + "MAIN.sess_queued": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Sessions queued for thread" + }, + "MAIN.sess_dropped": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Sessions dropped for thread" + }, + "MAIN.n_object": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "object structs made" + }, + "MAIN.n_vampireobject": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "unresurrected objects" + }, + "MAIN.n_objectcore": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "objectcore structs made" + }, + "MAIN.n_objecthead": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "objecthead structs made" + }, + "MAIN.n_waitinglist": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "waitinglist structs made" + }, + "MAIN.n_backend": { + "type": "MAIN", + "value": 1, + "flag": "i", + "description": "Number of backends" + }, + "MAIN.n_expired": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "Number of expired objects" + }, + "MAIN.n_lru_nuked": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "Number of LRU nuked objects" + }, + "MAIN.n_lru_moved": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "Number of LRU moved objects" + }, + "MAIN.losthdr": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "HTTP header overflows" + }, + "MAIN.s_sess": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Total sessions seen" + }, + "MAIN.s_req": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Total requests seen" + }, + "MAIN.s_pipe": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Total pipe sessions seen" + }, + "MAIN.s_pass": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Total pass-ed requests seen" + }, + "MAIN.s_fetch": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Total backend fetches initiated" + }, + "MAIN.s_synth": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Total synthethic responses made" + }, + "MAIN.s_req_hdrbytes": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Request header bytes" + }, + "MAIN.s_req_bodybytes": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Request body bytes" + }, + "MAIN.s_resp_hdrbytes": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Response header bytes" + }, + "MAIN.s_resp_bodybytes": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Response body bytes" + }, + "MAIN.s_pipe_hdrbytes": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Pipe request header bytes" + }, + "MAIN.s_pipe_in": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Piped bytes from client" + }, + "MAIN.s_pipe_out": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Piped bytes to client" + }, + "MAIN.sess_closed": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Session Closed" + }, + "MAIN.sess_pipeline": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Session Pipeline" + }, + "MAIN.sess_readahead": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Session Read Ahead" + }, + "MAIN.sess_herd": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Session herd" + }, + "MAIN.shm_records": { + "type": "MAIN", + "value": 6, + "flag": "a", + "description": "SHM records" + }, + "MAIN.shm_writes": { + "type": "MAIN", + "value": 6, + "flag": "a", + "description": "SHM writes" + }, + "MAIN.shm_flushes": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "SHM flushes due to overflow" + }, + "MAIN.shm_cont": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "SHM MTX contention" + }, + "MAIN.shm_cycles": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "SHM cycles through buffer" + }, + "MAIN.sms_nreq": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "SMS allocator requests" + }, + "MAIN.sms_nobj": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "SMS outstanding allocations" + }, + "MAIN.sms_nbytes": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "SMS outstanding bytes" + }, + "MAIN.sms_balloc": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "SMS bytes allocated" + }, + "MAIN.sms_bfree": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "SMS bytes freed" + }, + "MAIN.backend_req": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Backend requests made" + }, + "MAIN.n_vcl": { + "type": "MAIN", + "value": 1, + "flag": "a", + "description": "Number of loaded VCLs in total" + }, + "MAIN.n_vcl_avail": { + "type": "MAIN", + "value": 1, + "flag": "a", + "description": "Number of VCLs available" + }, + "MAIN.n_vcl_discard": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Number of discarded VCLs" + }, + "MAIN.bans": { + "type": "MAIN", + "value": 1, + "flag": "g", + "description": "Count of bans" + }, + "MAIN.bans_completed": { + "type": "MAIN", + "value": 1, + "flag": "g", + "description": "Number of bans marked 'completed'" + }, + "MAIN.bans_obj": { + "type": "MAIN", + "value": 0, + "flag": "g", + "description": "Number of bans using obj.*" + }, + "MAIN.bans_req": { + "type": "MAIN", + "value": 0, + "flag": "g", + "description": "Number of bans using req.*" + }, + "MAIN.bans_added": { + "type": "MAIN", + "value": 1, + "flag": "c", + "description": "Bans added" + }, + "MAIN.bans_deleted": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Bans deleted" + }, + "MAIN.bans_tested": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Bans tested against objects (lookup)" + }, + "MAIN.bans_obj_killed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Objects killed by bans (lookup)" + }, + "MAIN.bans_lurker_tested": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Bans tested against objects (lurker)" + }, + "MAIN.bans_tests_tested": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Ban tests tested against objects (lookup)" + }, + "MAIN.bans_lurker_tests_tested": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Ban tests tested against objects (lurker)" + }, + "MAIN.bans_lurker_obj_killed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Objects killed by bans (lurker)" + }, + "MAIN.bans_dups": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Bans superseded by other bans" + }, + "MAIN.bans_lurker_contention": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Lurker gave way for lookup" + }, + "MAIN.bans_persisted_bytes": { + "type": "MAIN", + "value": 13, + "flag": "g", + "description": "Bytes used by the persisted ban lists" + }, + "MAIN.bans_persisted_fragmentation": { + "type": "MAIN", + "value": 0, + "flag": "g", + "description": "Extra bytes in persisted ban lists due to fragmentation" + }, + "MAIN.n_purges": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "Number of purge operations executed" + }, + "MAIN.n_obj_purged": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "Number of purged objects" + }, + "MAIN.exp_mailed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Number of objects mailed to expiry thread" + }, + "MAIN.exp_received": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Number of objects received by expiry thread" + }, + "MAIN.hcb_nolock": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "HCB Lookups without lock" + }, + "MAIN.hcb_lock": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "HCB Lookups with lock" + }, + "MAIN.hcb_insert": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "HCB Inserts" + }, + "MAIN.esi_errors": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "ESI parse errors (unlock)" + }, + "MAIN.esi_warnings": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "ESI parse warnings (unlock)" + }, + "MAIN.vmods": { + "type": "MAIN", + "value": 0, + "flag": "i", + "description": "Loaded VMODs" + }, + "MAIN.n_gzip": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Gzip operations" + }, + "MAIN.n_gunzip": { + "type": "MAIN", + "value": 0, + "flag": "a", + "description": "Gunzip operations" + }, + "MAIN.vsm_free": { + "type": "MAIN", + "value": 974768, + "flag": "g", + "description": "Free VSM space" + }, + "MAIN.vsm_used": { + "type": "MAIN", + "value": 83959840, + "flag": "g", + "description": "Used VSM space" + }, + "MAIN.vsm_cooling": { + "type": "MAIN", + "value": 0, + "flag": "g", + "description": "Cooling VSM space" + }, + "MAIN.vsm_overflow": { + "type": "MAIN", + "value": 0, + "flag": "g", + "description": "Overflow VSM space" + }, + "MAIN.vsm_overflowed": { + "type": "MAIN", + "value": 0, + "flag": "c", + "description": "Overflowed VSM space" + }, + "MGT.uptime": { + "type": "MGT", + "value": 0, + "flag": "c", + "description": "Management process uptime" + }, + "MGT.child_start": { + "type": "MGT", + "value": 1, + "flag": "c", + "description": "Child process started" + }, + "MGT.child_exit": { + "type": "MGT", + "value": 0, + "flag": "c", + "description": "Child process normal exit" + }, + "MGT.child_stop": { + "type": "MGT", + "value": 0, + "flag": "c", + "description": "Child process unexpected exit" + }, + "MGT.child_died": { + "type": "MGT", + "value": 0, + "flag": "c", + "description": "Child process died (signal)" + }, + "MGT.child_dump": { + "type": "MGT", + "value": 0, + "flag": "c", + "description": "Child process core dumped" + }, + "MGT.child_panic": { + "type": "MGT", + "value": 0, + "flag": "c", + "description": "Child process panic" + }, + "MEMPOOL.vbc.live": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "g", + "description": "In use" + }, + "MEMPOOL.vbc.pool": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 10, + "flag": "g", + "description": "In Pool" + }, + "MEMPOOL.vbc.sz_wanted": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 88, + "flag": "g", + "description": "Size requested" + }, + "MEMPOOL.vbc.sz_needed": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 120, + "flag": "g", + "description": "Size allocated" + }, + "MEMPOOL.vbc.allocs": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Allocations" + }, + "MEMPOOL.vbc.frees": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Frees" + }, + "MEMPOOL.vbc.recycle": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Recycled from pool" + }, + "MEMPOOL.vbc.timeout": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Timed out from pool" + }, + "MEMPOOL.vbc.toosmall": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Too small to recycle" + }, + "MEMPOOL.vbc.surplus": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Too many for pool" + }, + "MEMPOOL.vbc.randry": { + "type": "MEMPOOL", + "ident": "vbc", + "value": 0, + "flag": "c", + "description": "Pool ran dry" + }, + "MEMPOOL.busyobj.live": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "g", + "description": "In use" + }, + "MEMPOOL.busyobj.pool": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 10, + "flag": "g", + "description": "In Pool" + }, + "MEMPOOL.busyobj.sz_wanted": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 65536, + "flag": "g", + "description": "Size requested" + }, + "MEMPOOL.busyobj.sz_needed": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 65568, + "flag": "g", + "description": "Size allocated" + }, + "MEMPOOL.busyobj.allocs": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Allocations" + }, + "MEMPOOL.busyobj.frees": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Frees" + }, + "MEMPOOL.busyobj.recycle": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Recycled from pool" + }, + "MEMPOOL.busyobj.timeout": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Timed out from pool" + }, + "MEMPOOL.busyobj.toosmall": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Too small to recycle" + }, + "MEMPOOL.busyobj.surplus": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Too many for pool" + }, + "MEMPOOL.busyobj.randry": { + "type": "MEMPOOL", + "ident": "busyobj", + "value": 0, + "flag": "c", + "description": "Pool ran dry" + }, + "MEMPOOL.req0.live": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "g", + "description": "In use" + }, + "MEMPOOL.req0.pool": { + "type": "MEMPOOL", + "ident": "req0", + "value": 10, + "flag": "g", + "description": "In Pool" + }, + "MEMPOOL.req0.sz_wanted": { + "type": "MEMPOOL", + "ident": "req0", + "value": 65536, + "flag": "g", + "description": "Size requested" + }, + "MEMPOOL.req0.sz_needed": { + "type": "MEMPOOL", + "ident": "req0", + "value": 65568, + "flag": "g", + "description": "Size allocated" + }, + "MEMPOOL.req0.allocs": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Allocations" + }, + "MEMPOOL.req0.frees": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Frees" + }, + "MEMPOOL.req0.recycle": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Recycled from pool" + }, + "MEMPOOL.req0.timeout": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Timed out from pool" + }, + "MEMPOOL.req0.toosmall": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Too small to recycle" + }, + "MEMPOOL.req0.surplus": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Too many for pool" + }, + "MEMPOOL.req0.randry": { + "type": "MEMPOOL", + "ident": "req0", + "value": 0, + "flag": "c", + "description": "Pool ran dry" + }, + "MEMPOOL.sess0.live": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "g", + "description": "In use" + }, + "MEMPOOL.sess0.pool": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 10, + "flag": "g", + "description": "In Pool" + }, + "MEMPOOL.sess0.sz_wanted": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 384, + "flag": "g", + "description": "Size requested" + }, + "MEMPOOL.sess0.sz_needed": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 416, + "flag": "g", + "description": "Size allocated" + }, + "MEMPOOL.sess0.allocs": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Allocations" + }, + "MEMPOOL.sess0.frees": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Frees" + }, + "MEMPOOL.sess0.recycle": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Recycled from pool" + }, + "MEMPOOL.sess0.timeout": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Timed out from pool" + }, + "MEMPOOL.sess0.toosmall": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Too small to recycle" + }, + "MEMPOOL.sess0.surplus": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Too many for pool" + }, + "MEMPOOL.sess0.randry": { + "type": "MEMPOOL", + "ident": "sess0", + "value": 0, + "flag": "c", + "description": "Pool ran dry" + }, + "MEMPOOL.req1.live": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "g", + "description": "In use" + }, + "MEMPOOL.req1.pool": { + "type": "MEMPOOL", + "ident": "req1", + "value": 10, + "flag": "g", + "description": "In Pool" + }, + "MEMPOOL.req1.sz_wanted": { + "type": "MEMPOOL", + "ident": "req1", + "value": 65536, + "flag": "g", + "description": "Size requested" + }, + "MEMPOOL.req1.sz_needed": { + "type": "MEMPOOL", + "ident": "req1", + "value": 65568, + "flag": "g", + "description": "Size allocated" + }, + "MEMPOOL.req1.allocs": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Allocations" + }, + "MEMPOOL.req1.frees": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Frees" + }, + "MEMPOOL.req1.recycle": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Recycled from pool" + }, + "MEMPOOL.req1.timeout": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Timed out from pool" + }, + "MEMPOOL.req1.toosmall": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Too small to recycle" + }, + "MEMPOOL.req1.surplus": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Too many for pool" + }, + "MEMPOOL.req1.randry": { + "type": "MEMPOOL", + "ident": "req1", + "value": 0, + "flag": "c", + "description": "Pool ran dry" + }, + "MEMPOOL.sess1.live": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "g", + "description": "In use" + }, + "MEMPOOL.sess1.pool": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 10, + "flag": "g", + "description": "In Pool" + }, + "MEMPOOL.sess1.sz_wanted": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 384, + "flag": "g", + "description": "Size requested" + }, + "MEMPOOL.sess1.sz_needed": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 416, + "flag": "g", + "description": "Size allocated" + }, + "MEMPOOL.sess1.allocs": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Allocations" + }, + "MEMPOOL.sess1.frees": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Frees" + }, + "MEMPOOL.sess1.recycle": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Recycled from pool" + }, + "MEMPOOL.sess1.timeout": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Timed out from pool" + }, + "MEMPOOL.sess1.toosmall": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Too small to recycle" + }, + "MEMPOOL.sess1.surplus": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Too many for pool" + }, + "MEMPOOL.sess1.randry": { + "type": "MEMPOOL", + "ident": "sess1", + "value": 0, + "flag": "c", + "description": "Pool ran dry" + }, + "SMA.s0.c_req": { + "type": "SMA", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Allocator requests" + }, + "SMA.s0.c_fail": { + "type": "SMA", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Allocator failures" + }, + "SMA.s0.c_bytes": { + "type": "SMA", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Bytes allocated" + }, + "SMA.s0.c_freed": { + "type": "SMA", + "ident": "s0", + "value": 0, + "flag": "a", + "description": "Bytes freed" + }, + "SMA.s0.g_alloc": { + "type": "SMA", + "ident": "s0", + "value": 0, + "flag": "i", + "description": "Allocations outstanding" + }, + "SMA.s0.g_bytes": { + "type": "SMA", + "ident": "s0", + "value": 0, + "flag": "i", + "description": "Bytes outstanding" + }, + "SMA.s0.g_space": { + "type": "SMA", + "ident": "s0", + "value": 268435456, + "flag": "i", + "description": "Bytes available" + }, + "SMA.Transient.c_req": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Allocator requests" + }, + "SMA.Transient.c_fail": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Allocator failures" + }, + "SMA.Transient.c_bytes": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Bytes allocated" + }, + "SMA.Transient.c_freed": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "a", + "description": "Bytes freed" + }, + "SMA.Transient.g_alloc": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "i", + "description": "Allocations outstanding" + }, + "SMA.Transient.g_bytes": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "i", + "description": "Bytes outstanding" + }, + "SMA.Transient.g_space": { + "type": "SMA", + "ident": "Transient", + "value": 0, + "flag": "i", + "description": "Bytes available" + }, + "VBE.default(127.0.0.1,,8080).vcls": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 1, + "flag": "i", + "description": "VCL references" + }, + "VBE.default(127.0.0.1,,8080).happy": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "b", + "description": "Happy health probes" + }, + "VBE.default(127.0.0.1,,8080).bereq_hdrbytes": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Request header bytes" + }, + "VBE.default(127.0.0.1,,8080).bereq_bodybytes": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Request body bytes" + }, + "VBE.default(127.0.0.1,,8080).beresp_hdrbytes": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Response header bytes" + }, + "VBE.default(127.0.0.1,,8080).beresp_bodybytes": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Response body bytes" + }, + "VBE.default(127.0.0.1,,8080).pipe_hdrbytes": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Pipe request header bytes" + }, + "VBE.default(127.0.0.1,,8080).pipe_out": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Piped bytes to backend" + }, + "VBE.default(127.0.0.1,,8080).pipe_in": { + "type": "VBE", + "ident": "default(127.0.0.1,,8080)", + "value": 0, + "flag": "a", + "description": "Piped bytes from backend" + }, + "LCK.sms.creat": { + "type": "LCK", + "ident": "sms", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.sms.destroy": { + "type": "LCK", + "ident": "sms", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sms.locks": { + "type": "LCK", + "ident": "sms", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.smp.creat": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.smp.destroy": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.smp.locks": { + "type": "LCK", + "ident": "smp", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.sma.creat": { + "type": "LCK", + "ident": "sma", + "value": 2, + "flag": "a", + "description": "Created locks" + }, + "LCK.sma.destroy": { + "type": "LCK", + "ident": "sma", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sma.locks": { + "type": "LCK", + "ident": "sma", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.smf.creat": { + "type": "LCK", + "ident": "smf", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.smf.destroy": { + "type": "LCK", + "ident": "smf", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.smf.locks": { + "type": "LCK", + "ident": "smf", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.hsl.creat": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.hsl.destroy": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.hsl.locks": { + "type": "LCK", + "ident": "hsl", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.hcb.creat": { + "type": "LCK", + "ident": "hcb", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.hcb.destroy": { + "type": "LCK", + "ident": "hcb", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.hcb.locks": { + "type": "LCK", + "ident": "hcb", + "value": 1, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.hcl.creat": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.hcl.destroy": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.hcl.locks": { + "type": "LCK", + "ident": "hcl", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vcl.creat": { + "type": "LCK", + "ident": "vcl", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vcl.destroy": { + "type": "LCK", + "ident": "vcl", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vcl.locks": { + "type": "LCK", + "ident": "vcl", + "value": 2, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.sessmem.creat": { + "type": "LCK", + "ident": "sessmem", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.sessmem.destroy": { + "type": "LCK", + "ident": "sessmem", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sessmem.locks": { + "type": "LCK", + "ident": "sessmem", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.sess.creat": { + "type": "LCK", + "ident": "sess", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.sess.destroy": { + "type": "LCK", + "ident": "sess", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.sess.locks": { + "type": "LCK", + "ident": "sess", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.wstat.creat": { + "type": "LCK", + "ident": "wstat", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.wstat.destroy": { + "type": "LCK", + "ident": "wstat", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.wstat.locks": { + "type": "LCK", + "ident": "wstat", + "value": 2, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.herder.creat": { + "type": "LCK", + "ident": "herder", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.herder.destroy": { + "type": "LCK", + "ident": "herder", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.herder.locks": { + "type": "LCK", + "ident": "herder", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.wq.creat": { + "type": "LCK", + "ident": "wq", + "value": 3, + "flag": "a", + "description": "Created locks" + }, + "LCK.wq.destroy": { + "type": "LCK", + "ident": "wq", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.wq.locks": { + "type": "LCK", + "ident": "wq", + "value": 404, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.objhdr.creat": { + "type": "LCK", + "ident": "objhdr", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.objhdr.destroy": { + "type": "LCK", + "ident": "objhdr", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.objhdr.locks": { + "type": "LCK", + "ident": "objhdr", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.exp.creat": { + "type": "LCK", + "ident": "exp", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.exp.destroy": { + "type": "LCK", + "ident": "exp", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.exp.locks": { + "type": "LCK", + "ident": "exp", + "value": 2, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.lru.creat": { + "type": "LCK", + "ident": "lru", + "value": 2, + "flag": "a", + "description": "Created locks" + }, + "LCK.lru.destroy": { + "type": "LCK", + "ident": "lru", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.lru.locks": { + "type": "LCK", + "ident": "lru", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.cli.creat": { + "type": "LCK", + "ident": "cli", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.cli.destroy": { + "type": "LCK", + "ident": "cli", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.cli.locks": { + "type": "LCK", + "ident": "cli", + "value": 14, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.ban.creat": { + "type": "LCK", + "ident": "ban", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.ban.destroy": { + "type": "LCK", + "ident": "ban", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.ban.locks": { + "type": "LCK", + "ident": "ban", + "value": 7, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vbp.creat": { + "type": "LCK", + "ident": "vbp", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vbp.destroy": { + "type": "LCK", + "ident": "vbp", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vbp.locks": { + "type": "LCK", + "ident": "vbp", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.backend.creat": { + "type": "LCK", + "ident": "backend", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.backend.destroy": { + "type": "LCK", + "ident": "backend", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.backend.locks": { + "type": "LCK", + "ident": "backend", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vcapace.creat": { + "type": "LCK", + "ident": "vcapace", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vcapace.destroy": { + "type": "LCK", + "ident": "vcapace", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vcapace.locks": { + "type": "LCK", + "ident": "vcapace", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.nbusyobj.creat": { + "type": "LCK", + "ident": "nbusyobj", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.nbusyobj.destroy": { + "type": "LCK", + "ident": "nbusyobj", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.nbusyobj.locks": { + "type": "LCK", + "ident": "nbusyobj", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.busyobj.creat": { + "type": "LCK", + "ident": "busyobj", + "value": 0, + "flag": "a", + "description": "Created locks" + }, + "LCK.busyobj.destroy": { + "type": "LCK", + "ident": "busyobj", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.busyobj.locks": { + "type": "LCK", + "ident": "busyobj", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.mempool.creat": { + "type": "LCK", + "ident": "mempool", + "value": 6, + "flag": "a", + "description": "Created locks" + }, + "LCK.mempool.destroy": { + "type": "LCK", + "ident": "mempool", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.mempool.locks": { + "type": "LCK", + "ident": "mempool", + "value": 60, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.vxid.creat": { + "type": "LCK", + "ident": "vxid", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.vxid.destroy": { + "type": "LCK", + "ident": "vxid", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.vxid.locks": { + "type": "LCK", + "ident": "vxid", + "value": 0, + "flag": "a", + "description": "Lock Operations" + }, + "LCK.pipestat.creat": { + "type": "LCK", + "ident": "pipestat", + "value": 1, + "flag": "a", + "description": "Created locks" + }, + "LCK.pipestat.destroy": { + "type": "LCK", + "ident": "pipestat", + "value": 0, + "flag": "a", + "description": "Destroyed locks" + }, + "LCK.pipestat.locks": { + "type": "LCK", + "ident": "pipestat", + "value": 0, + "flag": "a", + "description": "Lock Operations" + } +} \ No newline at end of file diff -Nru prometheus-varnish-exporter-1.5/varnish.go prometheus-varnish-exporter-1.5.2/varnish.go --- prometheus-varnish-exporter-1.5/varnish.go 2019-06-24 08:40:06.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/varnish.go 2019-10-27 11:45:46.000000000 +0000 @@ -140,7 +140,7 @@ var metricType prometheus.ValueType switch flag { - case "c": + case "c", "a": metricType = prometheus.CounterValue case "g": metricType = prometheus.GaugeValue diff -Nru prometheus-varnish-exporter-1.5/varnish_test.go prometheus-varnish-exporter-1.5.2/varnish_test.go --- prometheus-varnish-exporter-1.5/varnish_test.go 2019-06-24 08:40:06.000000000 +0000 +++ prometheus-varnish-exporter-1.5.2/varnish_test.go 2019-10-27 11:45:46.000000000 +0000 @@ -6,12 +6,13 @@ "os" "path/filepath" "runtime" - "strings" "testing" "github.com/prometheus/client_golang/prometheus" ) +var testFileVersions = []string{"3.0.5", "4.0.5", "4.1.1", "5.2.0", "6.0.0"} + func Test_VarnishVersion(t *testing.T) { tests := map[string]*varnishVersion{ "varnishstat (varnish-6.0.0 revision a068361dff0d25a0d85cf82a6e5fdaf315e06a7d)": &varnishVersion{ @@ -89,14 +90,20 @@ } func Test_VarnishBackendNames(t *testing.T) { - for _, backend := range []string{ - "eu1_x.y-z:w(192.52.0.192,,8085)", // 4.0.3 - "root:eu2_x.y-z:w", // 4.1 - "def0e7f7-a676-4eed-9d8b-78ef7ce21e93.us1_x.y-z:w", - "root:29813cbb-7329-4eb8-8969-26be2ef58c88.us2_x.y-z:w", // ?? - "boot.default", - "ce19737f-72b5-4f4b-9d39-3d8c2d28240b.default", + for _, variant := range [][]string{ + {"eu1_x.y-z:w(192.52.0.192,,8085)", "eu1_x.y-z:w", "192.52.0.192,,8085"}, // 4.0.3 + {"root:eu2_x.y-z:w", "eu2_x.y-z:w", "unknown"}, // 4.1 + {"def0e7f7-a676-4eed-9d8b-78ef7ce21e93.us1_x.y-z:w", "us1_x.y-z:w", "def0e7f7-a676-4eed-9d8b-78ef7ce21e93"}, + {"root:29813cbb-7329-4eb8-8969-26be2ef58c88.us2_x.y-z:w", "us2_x.y-z:w", "29813cbb-7329-4eb8-8969-26be2ef58c88"}, // ?? + {"boot.default", "default", "unknown"}, + {"reload_2019-08-29T100458.default", "default", "unknown"}, // varnish_reload_vcl in 4 + {"reload_20191016_072034_54500.default", "default", "unknown"}, // varnishreload in 6+ + {"ce19737f-72b5-4f4b-9d39-3d8c2d28240b.default", "default", "ce19737f-72b5-4f4b-9d39-3d8c2d28240b"}, } { + backend := variant[0] + expected_backend := variant[1] + expected_server := variant[2] + vName, data := dummyBackendValue(backend) var ( vGroup = prometheusGroup(vName) @@ -120,10 +127,19 @@ } // Varnish < 5.2 name_1, _, labelKeys_1, labelValues_1 := computePrometheusInfo(vName, vGroup, vIdentifier, vDescription) + computed_backend := findLabelValue("backend", labelKeys_1, labelValues_1) + computed_server := findLabelValue("server", labelKeys_1, labelValues_1) t.Logf("%s > %s > %s\n", vName, backend, name_1) t.Logf(" ident : %s\n", vIdentifier) - t.Logf(" backend : %s\n", findLabelValue("backend", labelKeys_1, labelValues_1)) - t.Logf(" server : %s\n", findLabelValue("server", labelKeys_1, labelValues_1)) + t.Logf(" backend : %s\n", computed_backend) + t.Logf(" server : %s\n", computed_server) + + if expected_backend != computed_backend { + t.Fatalf("backend %q != %q", computed_backend, expected_backend) + } + if expected_server != expected_server { + t.Fatalf("server %q != %q", computed_server, expected_server) + } // Varnish >= 5.2 no longer has 'ident', test that detected correctly from vName name_2, _, labelKeys_2, labelValues_2 := computePrometheusInfo(vName, vGroup, "", vDescription) @@ -144,12 +160,8 @@ if !fileExists(filepath.Join(dir, "test/scrape")) { t.Skipf("Cannot find test/scrape files from workind dir %s", dir) } - for _, test := range []string{ - filepath.Join(dir, "test/scrape", "4.1.1.json"), - filepath.Join(dir, "test/scrape", "5.2.0.json"), - filepath.Join(dir, "test/scrape", "6.0.0.json"), - } { - version := strings.Replace(filepath.Base(test), ".json", "", -1) + for _, version := range testFileVersions { + test := filepath.Join(dir, "test/scrape", version+".json") VarnishVersion.parseVersion(version) t.Logf("test scrape %s", VarnishVersion) @@ -157,15 +169,18 @@ if err != nil { t.Fatal(err.Error()) } + done := make(chan bool) metrics := make(chan prometheus.Metric) descs := []*prometheus.Desc{} go func() { for m := range metrics { descs = append(descs, m.Desc()) } + done <- true }() _, err = ScrapeVarnishFrom(buf, metrics) close(metrics) + <-done if err != nil { t.Fatal(err.Error()) @@ -174,6 +189,62 @@ } } +type testCollector struct { + filepath string + t *testing.T +} + +func (tc *testCollector) Describe(ch chan<- *prometheus.Desc) { +} + +func (tc *testCollector) Collect(ch chan<- prometheus.Metric) { + buf, err := ioutil.ReadFile(tc.filepath) + if err != nil { + tc.t.Fatal(err.Error()) + } + _, err = ScrapeVarnishFrom(buf, ch) + + if err != nil { + tc.t.Fatal(err.Error()) + } +} + +func Test_PrometheusExport(t *testing.T) { + dir, _ := os.Getwd() + if !fileExists(filepath.Join(dir, "test/scrape")) { + t.Skipf("Cannot find test/scrape files from workind dir %s", dir) + } + for _, version := range testFileVersions { + test := filepath.Join(dir, "test/scrape", version+".json") + VarnishVersion.parseVersion(version) + t.Logf("test scrape %s", VarnishVersion) + + registry := prometheus.NewRegistry() + collector := &testCollector{filepath: test} + registry.MustRegister(collector) + + gathering, err := registry.Gather() + if err != nil { + errors, ok := err.(prometheus.MultiError) + if ok { + for _, e := range errors { + t.Errorf(" Error in prometheus Gather: %#v", e) + } + } else { + t.Errorf(" Error in prometheus Gather: %#v", err) + } + } + + metricCount := 0 + + for _, mf := range gathering { + metricCount += len(mf.Metric) + } + + t.Logf(" %d metrics", metricCount) + } +} + // Testing against a live varnish instance is only executed in build bot(s). // This is because the usual end user setup requires tests to be ran with sudo in order to work. func Test_VarnishMetrics_CI(t *testing.T) { @@ -192,14 +263,17 @@ t.Fatal(err) } + done := make(chan bool) metrics := make(chan prometheus.Metric) go func() { for m := range metrics { t.Logf("%s", m.Desc()) } + done <- true }() if _, err := ScrapeVarnish(metrics); err != nil { t.Fatal(err) } close(metrics) + <-done }