github.com/netdata/go.d.plugin@v0.58.1/modules/k8s_kubeproxy/metrics.go (about) 1 // SPDX-License-Identifier: GPL-3.0-or-later 2 3 package k8s_kubeproxy 4 5 import ( 6 mtx "github.com/netdata/go.d.plugin/pkg/metrics" 7 ) 8 9 func newMetrics() *metrics { 10 var mx metrics 11 mx.RESTClient.Requests.ByStatusCode = make(map[string]mtx.Gauge) 12 mx.RESTClient.Requests.ByMethod = make(map[string]mtx.Gauge) 13 14 return &mx 15 } 16 17 type metrics struct { 18 SyncProxyRules struct { 19 Count mtx.Gauge `stm:"count"` 20 Latency struct { 21 LE1000 mtx.Gauge `stm:"1000"` 22 LE2000 mtx.Gauge `stm:"2000"` 23 LE4000 mtx.Gauge `stm:"4000"` 24 LE8000 mtx.Gauge `stm:"8000"` 25 LE16000 mtx.Gauge `stm:"16000"` 26 LE32000 mtx.Gauge `stm:"32000"` 27 LE64000 mtx.Gauge `stm:"64000"` 28 LE128000 mtx.Gauge `stm:"128000"` 29 LE256000 mtx.Gauge `stm:"256000"` 30 LE512000 mtx.Gauge `stm:"512000"` 31 LE1024000 mtx.Gauge `stm:"1024000"` 32 LE2048000 mtx.Gauge `stm:"2048000"` 33 LE4096000 mtx.Gauge `stm:"4096000"` 34 LE8192000 mtx.Gauge `stm:"8192000"` 35 LE16384000 mtx.Gauge `stm:"16384000"` 36 Inf mtx.Gauge `stm:"+Inf"` 37 } `stm:"bucket"` 38 } `stm:"sync_proxy_rules"` 39 RESTClient struct { 40 Requests struct { 41 ByStatusCode map[string]mtx.Gauge `stm:""` 42 ByMethod map[string]mtx.Gauge `stm:""` 43 } `stm:"requests"` 44 } `stm:"rest_client"` 45 HTTP struct { 46 Request struct { 47 Duration struct { 48 Quantile05 mtx.Gauge `stm:"05"` 49 Quantile09 mtx.Gauge `stm:"09"` 50 Quantile099 mtx.Gauge `stm:"099"` 51 } `stm:"duration"` 52 } `stm:"request"` 53 } `stm:"http"` 54 }