From a8003d0e3937720989c18ca42831f9215af164a4 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Thu, 3 Jun 2021 09:32:02 -0700 Subject: [PATCH 01/24] init commit --- libbeat/metric/system/memory/memory.go | 54 +----- metricbeat/internal/metrics/memory/memory.go | 5 + .../internal/metrics/memory/memory_linux.go | 62 +++++++ .../module/linux/memory/_meta/data.json | 14 +- metricbeat/module/linux/memory/data.go | 161 ++++++++++++------ metricbeat/module/linux/memory/memory.go | 6 +- .../module/system/memory/_meta/data.json | 44 ++--- metricbeat/module/system/memory/memory.go | 45 ++--- 8 files changed, 232 insertions(+), 159 deletions(-) create mode 100644 metricbeat/internal/metrics/memory/memory.go create mode 100644 metricbeat/internal/metrics/memory/memory_linux.go diff --git a/libbeat/metric/system/memory/memory.go b/libbeat/metric/system/memory/memory.go index 72e351db384..5813d89a2f8 100644 --- a/libbeat/metric/system/memory/memory.go +++ b/libbeat/metric/system/memory/memory.go @@ -20,12 +20,9 @@ package memory import ( - "github.com/pkg/errors" - "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/logp" - sysinfo "github.com/elastic/go-sysinfo" - sysinfotypes "github.com/elastic/go-sysinfo/types" + sigar "github.com/elastic/gosigar" ) @@ -121,52 +118,3 @@ func AddSwapPercentage(s *SwapStat) { perc := float64(s.Swap.Used) / float64(s.Swap.Total) s.UsedPercent = common.Round(perc, common.DefaultDecimalPlacesCount) } - -// HugeTLBPagesStat includes metrics about huge pages usage -type HugeTLBPagesStat struct { - sigar.HugeTLBPages - UsedPercent float64 `json:"used_p"` -} - -// GetHugeTLBPages returns huge pages usage metrics -func GetHugeTLBPages() (*HugeTLBPagesStat, error) { - pages := sigar.HugeTLBPages{} - err := pages.Get() - - if err == nil { - return &HugeTLBPagesStat{HugeTLBPages: pages}, nil - } - - if sigar.IsNotImplemented(err) { - return nil, nil - } - - return nil, err -} - -// AddHugeTLBPagesPercentage calculates ratio of used huge pages -func AddHugeTLBPagesPercentage(s *HugeTLBPagesStat) { - if s.Total == 0 { - return - } - - perc := float64(s.Total-s.Free+s.Reserved) / float64(s.Total) - s.UsedPercent = common.Round(perc, common.DefaultDecimalPlacesCount) -} - -// GetVMStat gets linux vmstat metrics -func GetVMStat() (*sysinfotypes.VMStatInfo, error) { - h, err := sysinfo.Host() - if err != nil { - return nil, errors.Wrap(err, "failed to read self process information") - } - if vmstatHandle, ok := h.(sysinfotypes.VMStat); ok { - info, err := vmstatHandle.VMStat() - if err != nil { - return nil, errors.Wrap(err, "error getting VMStat info") - } - return info, nil - } - return nil, nil - -} diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go new file mode 100644 index 00000000000..0d01a3f8910 --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory.go @@ -0,0 +1,5 @@ +package memory + +// Memory holds os-specifc memory usage data +type Memory struct { +} diff --git a/metricbeat/internal/metrics/memory/memory_linux.go b/metricbeat/internal/metrics/memory/memory_linux.go new file mode 100644 index 00000000000..bf3926bf50d --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_linux.go @@ -0,0 +1,62 @@ +package memory + +import ( + "bufio" + "bytes" + "io" + "io/ioutil" + "path/filepath" + "strconv" + "strings" + + "github.com/pkg/errors" +) + +// ParseMeminfo parses the contents of /proc/meminfo into a hashmap +func ParseMeminfo(rootfs string) (map[string]uint64, error) { + table := map[string]uint64{} + + meminfoPath := filepath.Join(rootfs, "/proc/meminfo") + err := readFile(meminfoPath, func(line string) bool { + fields := strings.Split(line, ":") + + if len(fields) != 2 { + return true // skip on errors + } + + valueUnit := strings.Fields(fields[1]) + value, err := strconv.ParseUint(valueUnit[0], 10, 64) + if err != nil { + return true // skip on errors + } + + if len(valueUnit) > 1 && valueUnit[1] == "kB" { + value *= 1024 + } + table[fields[0]] = value + + return true + }) + return table, err +} + +func readFile(file string, handler func(string) bool) error { + contents, err := ioutil.ReadFile(file) + if err != nil { + return errors.Wrapf(err, "error reading file %s", file) + } + + reader := bufio.NewReader(bytes.NewBuffer(contents)) + + for { + line, _, err := reader.ReadLine() + if err == io.EOF { + break + } + if !handler(string(line)) { + break + } + } + + return nil +} diff --git a/metricbeat/module/linux/memory/_meta/data.json b/metricbeat/module/linux/memory/_meta/data.json index 79a3d431869..cb4acfe5da0 100644 --- a/metricbeat/module/linux/memory/_meta/data.json +++ b/metricbeat/module/linux/memory/_meta/data.json @@ -26,25 +26,25 @@ }, "page_stats": { "direct_efficiency": { - "pct": 0.9228 + "pct": 0.9839 }, "kswapd_efficiency": { - "pct": 0.7523 + "pct": 0.7739 }, "pgfree": { - "pages": 16061818710 + "pages": 40941189636 }, "pgscan_direct": { - "pages": 1198580 + "pages": 1199988 }, "pgscan_kswapd": { - "pages": 50222460 + "pages": 19970993 }, "pgsteal_direct": { - "pages": 1106083 + "pages": 1180686 }, "pgsteal_kswapd": { - "pages": 37782783 + "pages": 15456470 } } } diff --git a/metricbeat/module/linux/memory/data.go b/metricbeat/module/linux/memory/data.go index d3f1a5ef2f8..2461a4d77a0 100644 --- a/metricbeat/module/linux/memory/data.go +++ b/metricbeat/module/linux/memory/data.go @@ -20,80 +20,133 @@ package memory import ( + "fmt" + "github.com/pkg/errors" "github.com/elastic/beats/v7/libbeat/common" - mem "github.com/elastic/beats/v7/libbeat/metric/system/memory" + "github.com/elastic/beats/v7/metricbeat/internal/metrics/memory" + sysinfo "github.com/elastic/go-sysinfo" + sysinfotypes "github.com/elastic/go-sysinfo/types" ) // FetchLinuxMemStats gets page_stat and huge pages data for linux func FetchLinuxMemStats(baseMap common.MapStr) error { - vmstat, err := mem.GetVMStat() + vmstat, err := GetVMStat() if err != nil { return errors.Wrap(err, "VMStat") } - if vmstat != nil { - pageStats := common.MapStr{ - "pgscan_kswapd": common.MapStr{ - "pages": vmstat.PgscanKswapd, - }, - "pgscan_direct": common.MapStr{ - "pages": vmstat.PgscanDirect, - }, - "pgfree": common.MapStr{ - "pages": vmstat.Pgfree, - }, - "pgsteal_kswapd": common.MapStr{ - "pages": vmstat.PgstealKswapd, - }, - "pgsteal_direct": common.MapStr{ - "pages": vmstat.PgstealDirect, - }, - } - // This is similar to the vmeff stat gathered by sar - // these ratios calculate thhe efficiency of page reclaim - if vmstat.PgscanDirect != 0 { - pageStats["direct_efficiency"] = common.MapStr{ - "pct": common.Round(float64(vmstat.PgstealDirect)/float64(vmstat.PgscanDirect), common.DefaultDecimalPlacesCount), - } + pageStats := common.MapStr{ + "pgscan_kswapd": common.MapStr{ + "pages": vmstat.PgscanKswapd, + }, + "pgscan_direct": common.MapStr{ + "pages": vmstat.PgscanDirect, + }, + "pgfree": common.MapStr{ + "pages": vmstat.Pgfree, + }, + "pgsteal_kswapd": common.MapStr{ + "pages": vmstat.PgstealKswapd, + }, + "pgsteal_direct": common.MapStr{ + "pages": vmstat.PgstealDirect, + }, + } + // This is similar to the vmeff stat gathered by sar + // these ratios calculate thhe efficiency of page reclaim + if vmstat.PgscanDirect != 0 { + pageStats["direct_efficiency"] = common.MapStr{ + "pct": common.Round(float64(vmstat.PgstealDirect)/float64(vmstat.PgscanDirect), common.DefaultDecimalPlacesCount), } + } - if vmstat.PgscanKswapd != 0 { - pageStats["kswapd_efficiency"] = common.MapStr{ - "pct": common.Round(float64(vmstat.PgstealKswapd)/float64(vmstat.PgscanKswapd), common.DefaultDecimalPlacesCount), - } + if vmstat.PgscanKswapd != 0 { + pageStats["kswapd_efficiency"] = common.MapStr{ + "pct": common.Round(float64(vmstat.PgstealKswapd)/float64(vmstat.PgscanKswapd), common.DefaultDecimalPlacesCount), } - baseMap["page_stats"] = pageStats } + baseMap["page_stats"] = pageStats + + thp, err := getHugePages() + if err != nil { + return errors.Wrap(err, "error getting huge pages") + } + fmt.Printf("thp: %s\n", baseMap.StringToPrint()) + thp["swap"] = common.MapStr{ + "out": common.MapStr{ + "pages": vmstat.ThpSwpout, + "fallback": vmstat.ThpSwpoutFallback, + }, + } + + baseMap["hugepages"] = thp - hugePagesStat, err := mem.GetHugeTLBPages() + return nil +} + +func getHugePages() (common.MapStr, error) { + // see https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt + table, err := memory.ParseMeminfo("") if err != nil { - return errors.Wrap(err, "hugepages") + return nil, errors.Wrap(err, "error parsing meminfo") } - if hugePagesStat != nil { - mem.AddHugeTLBPagesPercentage(hugePagesStat) - thp := common.MapStr{ - "total": hugePagesStat.Total, - "used": common.MapStr{ - "bytes": hugePagesStat.TotalAllocatedSize, - "pct": hugePagesStat.UsedPercent, - }, - "free": hugePagesStat.Free, - "reserved": hugePagesStat.Reserved, - "surplus": hugePagesStat.Surplus, - "default_size": hugePagesStat.DefaultSize, + thp := common.MapStr{} + + total, okTotal := table["HugePages_Total"] + free, okFree := table["HugePages_Free"] + reserved, okReserved := table["HugePages_Rsvd"] + totalSize, okTotalSize := table["Hugetlb"] + defaultSize, okDefaultSize := table["Hugepagesize"] + + // Calculate percentages + if okTotal && okFree && okReserved { + thp.Put("total", total) + thp.Put("free", free) + thp.Put("reserved", reserved) + + // TODO: this repliactes the behavior of metricbeat in the past, + // but it might be possilbe to do something like (HugePages_Total*Hugepagesize)-Hugetlb / (HugePages_Total*Hugepagesize) + var perc float64 + if total > 0 { + perc = float64(total-free+reserved) / float64(total) } - if vmstat != nil { - thp["swap"] = common.MapStr{ - "out": common.MapStr{ - "pages": vmstat.ThpSwpout, - "fallback": vmstat.ThpSwpoutFallback, - }, - } + thp.Put("used.pct", common.Round(perc, common.DefaultDecimalPlacesCount)) + + if !okTotalSize && okDefaultSize { + thp.Put("used.bytes", (total-free+reserved)*defaultSize) } - baseMap["hugepages"] = thp } - return nil + if okTotalSize { + thp.Put("used.bytes", totalSize) + } + if okDefaultSize { + thp.Put("default_size", defaultSize) + } + if surplus, ok := table["HugePages_Surp"]; ok { + thp.Put("surplus", surplus) + } + + return thp, nil +} + +// GetVMStat gets linux vmstat metrics +func GetVMStat() (*sysinfotypes.VMStatInfo, error) { + // TODO: We may want to pull this code out of go-sysinfo. + // It's platform specific, and not used by anything else. + h, err := sysinfo.Host() + if err != nil { + return nil, errors.Wrap(err, "failed to read self process information") + } + if vmstatHandle, ok := h.(sysinfotypes.VMStat); ok { + info, err := vmstatHandle.VMStat() + if err != nil { + return nil, errors.Wrap(err, "error getting VMStat info") + } + return info, nil + } + return nil, nil + } diff --git a/metricbeat/module/linux/memory/memory.go b/metricbeat/module/linux/memory/memory.go index 163e3bea771..eb2cbaa0cc7 100644 --- a/metricbeat/module/linux/memory/memory.go +++ b/metricbeat/module/linux/memory/memory.go @@ -21,6 +21,7 @@ import ( "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/common/cfgwarn" "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/pkg/errors" ) // init registers the MetricSet with the central registry as soon as the program @@ -54,7 +55,10 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { // of an error set the Error field of mb.Event or simply call report.Error(). func (m *MetricSet) Fetch(report mb.ReporterV2) error { rootEvent := common.MapStr{} - FetchLinuxMemStats(rootEvent) + err := FetchLinuxMemStats(rootEvent) + if err != nil { + return errors.Wrap(err, "error fetching memory stats") + } report.Event(mb.Event{ MetricSetFields: rootEvent, }) diff --git a/metricbeat/module/system/memory/_meta/data.json b/metricbeat/module/system/memory/_meta/data.json index 06abee40a35..838960bc5d0 100644 --- a/metricbeat/module/system/memory/_meta/data.json +++ b/metricbeat/module/system/memory/_meta/data.json @@ -15,13 +15,13 @@ "system": { "memory": { "actual": { - "free": 8461623296, + "free": 48339243008, "used": { - "bytes": 7159164928, - "pct": 0.4583 + "bytes": 19175571456, + "pct": 0.284 } }, - "free": 1299234816, + "free": 10025598976, "hugepages": { "default_size": 2097152, "free": 0, @@ -41,49 +41,49 @@ }, "page_stats": { "direct_efficiency": { - "pct": 0.9242 + "pct": 0.9839 }, "kswapd_efficiency": { - "pct": 0.7518 + "pct": 0.7739 }, "pgfree": { - "pages": 15924304810 + "pages": 40943568817 }, "pgscan_direct": { - "pages": 1185751 + "pages": 1199988 }, "pgscan_kswapd": { - "pages": 50008148 + "pages": 19970993 }, "pgsteal_direct": { - "pages": 1095884 + "pages": 1180686 }, "pgsteal_kswapd": { - "pages": 37594071 + "pages": 15456470 } }, "swap": { - "free": 7823421440, + "free": 8563716096, "in": { - "pages": 2702 + "pages": 727 }, "out": { - "pages": 23582 + "pages": 10484 }, "readahead": { - "cached": 554, - "pages": 986 + "cached": 9, + "pages": 45 }, - "total": 7897870336, + "total": 8589930496, "used": { - "bytes": 74448896, - "pct": 0.0094 + "bytes": 26214400, + "pct": 0.0031 } }, - "total": 15620788224, + "total": 67514814464, "used": { - "bytes": 14321553408, - "pct": 0.9168 + "bytes": 57489215488, + "pct": 0.8515 } } } diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 26c6bea1867..213735be5db 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -21,6 +21,7 @@ package memory import ( "fmt" + "runtime" "github.com/pkg/errors" @@ -86,11 +87,6 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { }, } - vmstat, err := mem.GetVMStat() - if err != nil { - return errors.Wrap(err, "VMStat") - } - swap := common.MapStr{ "total": swapStat.Total, "used": common.MapStr{ @@ -100,28 +96,33 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { "free": swapStat.Free, } - if vmstat != nil { - // Swap in and swap out numbers - swap["in"] = common.MapStr{ - "pages": vmstat.Pswpin, - } - swap["out"] = common.MapStr{ - "pages": vmstat.Pswpout, - } - //Swap readahead - //See https://www.kernel.org/doc/ols/2007/ols2007v2-pages-273-284.pdf - swap["readahead"] = common.MapStr{ - "pages": vmstat.SwapRa, - "cached": vmstat.SwapRaHit, - } - } - // for backwards compatibility, only report if we're not in fleet mode - if !m.IsAgent { + // This is entirely linux-specific data that should live in linux/memory. + // DEPRECATE: remove this for 8.0 + if !m.IsAgent && runtime.GOOS == "linux" { err := linux.FetchLinuxMemStats(memory) if err != nil { return errors.Wrap(err, "error getting page stats") } + vmstat, err := linux.GetVMStat() + if err != nil { + return errors.Wrap(err, "VMStat") + } + if vmstat != nil { + // Swap in and swap out numbers + swap["in"] = common.MapStr{ + "pages": vmstat.Pswpin, + } + swap["out"] = common.MapStr{ + "pages": vmstat.Pswpout, + } + //Swap readahead + //See https://www.kernel.org/doc/ols/2007/ols2007v2-pages-273-284.pdf + swap["readahead"] = common.MapStr{ + "pages": vmstat.SwapRa, + "cached": vmstat.SwapRaHit, + } + } } memory["swap"] = swap From cc898a1c365892116c98354050cee1bdc302210a Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Fri, 4 Jun 2021 11:14:09 -0700 Subject: [PATCH 02/24] start on linux implementation --- metricbeat/internal/metrics/memory/memory.go | 71 ++++++++++++++++ .../internal/metrics/memory/memory_linux.go | 59 +++++++++++++ metricbeat/internal/metrics/opt.go | 83 +++++++++++++++++++ 3 files changed, 213 insertions(+) create mode 100644 metricbeat/internal/metrics/opt.go diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 0d01a3f8910..16fa6b46583 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -1,5 +1,76 @@ package memory +import ( + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/internal/metrics" + "github.com/pkg/errors" +) + // Memory holds os-specifc memory usage data +// The vast majority of these values are cross-platform +// However, we're wrapping all them for the sake of safety, and for the more variable swap metrics type Memory struct { + Total metrics.OptUint + Used metrics.OptUint + Free metrics.OptUint + Cached metrics.OptUint + // Actual values are, technically, a linux-only concept + // For better or worse we've expanded it to include "derived" + // Memory values on other platforms, which we should + // probably keep for the sake of backwards compatibility + ActualFree metrics.OptUint + ActualUsed metrics.OptUint + + // Derived values + UsedPercent metrics.OptFloat + UsedActualPercent metrics.OptFloat + + // Swap metrics + SwapTotal metrics.OptUint + SwapUsed metrics.OptUint + SwapFree metrics.OptUint + SwapUsedPercent metrics.OptFloat +} + +func newMemory() Memory { + return Memory{ + Total: metrics.NewUint(), + Used: metrics.NewUint(), + Free: metrics.NewUint(), + Cached: metrics.NewUint(), + ActualFree: metrics.NewUint(), + ActualUsed: metrics.NewUint(), + UsedPercent: metrics.NewFloat(), + UsedActualPercent: metrics.NewFloat(), + + SwapTotal: metrics.NewUint(), + SwapUsed: metrics.NewUint(), + SwapFree: metrics.NewUint(), + SwapUsedPercent: metrics.NewFloat(), + } +} + +// Get returns platform-independent memory metrics. +func Get(procfs string) (Memory, error) { + base, err := get(procfs) + if err != nil { + return Memory{}, errors.Wrap(err, "error getting system memory info") + } + + // Add percentages + // In theory, `Used` and `Total` are available everywhere, so assume values are good. + if base.Total.ValueOrZero() != 0 { + percUsed := float64(base.Used.ValueOrZero()) / float64(base.Total.ValueOrZero()) + base.UsedPercent.Some(common.Round(percUsed, common.DefaultDecimalPlacesCount)) + + actualPercUsed := float64(base.ActualUsed.ValueOrZero()) / float64(base.Total.ValueOrZero()) + base.UsedActualPercent.Some(common.Round(actualPercUsed, common.DefaultDecimalPlacesCount)) + } + + if base.SwapTotal.ValueOrZero() != 0 && base.SwapUsed.Exists() { + perc := float64(base.SwapUsed.ValueOrZero()) / float64(base.SwapTotal.ValueOrZero()) + base.SwapUsedPercent.Some(common.Round(perc, common.DefaultDecimalPlacesCount)) + } + + return base, nil } diff --git a/metricbeat/internal/metrics/memory/memory_linux.go b/metricbeat/internal/metrics/memory/memory_linux.go index bf3926bf50d..9fa59369992 100644 --- a/metricbeat/internal/metrics/memory/memory_linux.go +++ b/metricbeat/internal/metrics/memory/memory_linux.go @@ -12,6 +12,65 @@ import ( "github.com/pkg/errors" ) +// get is the linux implementation for fetching Memory data +func get(rootfs string) (Memory, error) { + table, err := ParseMeminfo(rootfs) + if err != nil { + return Memory{}, errors.Wrap(err, "error fetching meminfo") + } + + memData := newMemory() + + var free, cached uint64 + if total, ok := table["MemTotal"]; ok { + memData.Total.Some(total) + } + if free, ok := table["MemFree"]; ok { + memData.Free.Some(free) + } + if cached, ok := table["Cached"]; ok { + memData.Cached.Some(cached) + } + + // overlook parsing issues here + // On the very small chance some of these don't exist, + // It's not the end of the world + buffers, _ := table["Buffers"] + + if memAvail, ok := table["MemAvailable"]; ok { + // MemAvailable is in /proc/meminfo (kernel 3.14+) + memData.ActualFree.Some(memAvail) + } else { + // in the future we may want to find another way to do this. + // "MemAvailable" and other more derivied metrics + // Are very relative, and can be unhelpful in cerntain workloads + // We may want to find a way to more clearly express to users + // where a certain value is coming from and what it represents + + // The use of `cached` here is particularly concerning, + // as under certain intense DB server workloads, the cached memory can be quite large + // and give the impression that we've passed memory usage watermark + memData.ActualFree.Some(free + buffers + cached) + } + + // Populate swap data + swapTotal, okST := table["SwapTotal"] + if okST { + memData.SwapTotal.Some(swapTotal) + } + swapFree, okSF := table["SwapFree"] + if okSF { + memData.SwapTotal.Some(swapFree) + } + + if okSF && okST { + memData.SwapUsed.Some(swapTotal - swapFree) + } + + return memData, nil + +} + // ParseMeminfo parses the contents of /proc/meminfo into a hashmap func ParseMeminfo(rootfs string) (map[string]uint64, error) { table := map[string]uint64{} diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go new file mode 100644 index 00000000000..d445dac5806 --- /dev/null +++ b/metricbeat/internal/metrics/opt.go @@ -0,0 +1,83 @@ +package metrics + +// OptUint is a wrapper for "optional" types, with the bool value indicating +// if the stored int is a legitimate value. +type OptUint struct { + exists bool + value uint64 +} + +// NewUint returns a new uint wrapper +func NewUint() OptUint { + return OptUint{ + exists: false, + value: 0, + } +} + +// None marks the Uint as not having a value. +func (opt *OptUint) None() { + opt.exists = false +} + +// Exists returns true if the underlying value is valid +func (opt OptUint) Exists() bool { + return opt.exists +} + +// Some Sets a valid value inside the OptUint +func (opt *OptUint) Some(i uint64) { + opt.value = i + opt.exists = true +} + +// ValueOrZero returns the stored value, or zero +// Please do not use this for populating reported data, +// as we actually want to avoid sending zeros where values are functionally null +func (opt OptUint) ValueOrZero() uint64 { + if opt.exists { + return opt.value + } + return 0 +} + +// OptFloat is a wrapper for "optional" types, with the bool value indicating +// if the stored int is a legitimate value. +type OptFloat struct { + exists bool + value float64 +} + +// NewFloat returns a new uint wrapper +func NewFloat() OptFloat { + return OptFloat{ + exists: false, + value: 0, + } +} + +// None marks the Uint as not having a value. +func (opt *OptFloat) None() { + opt.exists = false +} + +// Some Sets a valid value inside the OptUint +func (opt *OptFloat) Some(i float64) { + opt.value = i + opt.exists = true +} + +// Exists returns true if the underlying value is valid +func (opt OptFloat) Exists() bool { + return opt.exists +} + +// ValueOrZero returns the stored value, or zero +// Please do not use this for populating reported data, +// as we actually want to avoid sending zeros where values are functionally null +func (opt OptFloat) ValueOrZero() float64 { + if opt.exists { + return opt.value + } + return 0 +} From b243bd081bcc19a8c8f4e8572394a1e2069ba4a0 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 8 Jun 2021 10:51:48 -0700 Subject: [PATCH 03/24] finish linux, start work on darwin --- metricbeat/internal/metrics/fold.go | 103 ++++++++++++++ metricbeat/internal/metrics/memory/memory.go | 115 ++++++++++----- .../internal/metrics/memory/memory_darwin.go | 132 ++++++++++++++++++ .../internal/metrics/memory/memory_linux.go | 40 ++++-- metricbeat/internal/metrics/opt.go | 72 ++++++++-- metricbeat/module/linux/memory/memory.go | 3 +- .../module/system/memory/_meta/data.json | 33 ++--- metricbeat/module/system/memory/memory.go | 104 ++++++++------ 8 files changed, 478 insertions(+), 124 deletions(-) create mode 100644 metricbeat/internal/metrics/fold.go create mode 100644 metricbeat/internal/metrics/memory/memory_darwin.go diff --git a/metricbeat/internal/metrics/fold.go b/metricbeat/internal/metrics/fold.go new file mode 100644 index 00000000000..971e78ecbe3 --- /dev/null +++ b/metricbeat/internal/metrics/fold.go @@ -0,0 +1,103 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package metrics + +import ( + "github.com/elastic/go-structform" + "github.com/elastic/go-structform/gotype" +) + +// OptUintUnfolder is the stateful contain for the unfolder +type OptUintUnfolder struct { + gotype.BaseUnfoldState + to *OptUint +} + +// FoldOptUint is a helper for structform's Fold() function +// pass this to gotype.NewIterator +func FoldOptUint(in *OptUint, v structform.ExtVisitor) error { + if in.exists == true { + value := in.value + v.OnUint64(value) + } else { + v.OnNil() + } + return nil +} + +// UnfoldOptUint is a helper function for structform's Fold() function +// Pass this to gotype.NewIterator +func UnfoldOptUint(to *OptUint) gotype.UnfoldState { + return &OptUintUnfolder{to: to} +} + +// OnUint64 Folds Uint64 values +func (u *OptUintUnfolder) OnUint64(ctx gotype.UnfoldCtx, in uint64) error { + defer ctx.Done() + u.to = &OptUint{exists: true, value: in} + + return nil +} + +// OnNil Folds nil values +func (u *OptUintUnfolder) OnNil(ctx gotype.UnfoldCtx) error { + defer ctx.Done() + u.to = &OptUint{exists: false, value: 0} + + return nil +} + +// FoldOptFloat is a helper for structform's Fold() function +// pass this to gotype.NewIterator +func FoldOptFloat(in *OptFloat, v structform.ExtVisitor) error { + if in.exists == true { + value := in.value + v.OnFloat64(value) + } else { + v.OnNil() + } + return nil +} + +// OptFloatUnfolder is the stateful contain for the unfolder +type OptFloatUnfolder struct { + gotype.BaseUnfoldState + to *OptFloat +} + +// UnfoldOptFloat is a helper function for structform's Fold() function +// Pass this to gotype.NewIterator +func UnfoldOptFloat(to *OptFloat) gotype.UnfoldState { + return &OptFloatUnfolder{to: to} +} + +// OnFloat64 Folds Uint64 values +func (u *OptFloatUnfolder) OnFloat64(ctx gotype.UnfoldCtx, in float64) error { + defer ctx.Done() + u.to = &OptFloat{exists: true, value: in} + + return nil +} + +// OnNil Folds nil values +func (u *OptFloatUnfolder) OnNil(ctx gotype.UnfoldCtx) error { + defer ctx.Done() + u.to = &OptFloat{exists: false, value: 0} + + return nil +} diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 16fa6b46583..cb60450733c 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -1,53 +1,66 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + package memory import ( + "github.com/pkg/errors" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/metricbeat/internal/metrics" - "github.com/pkg/errors" + "github.com/elastic/go-structform/gotype" ) // Memory holds os-specifc memory usage data // The vast majority of these values are cross-platform // However, we're wrapping all them for the sake of safety, and for the more variable swap metrics type Memory struct { - Total metrics.OptUint - Used metrics.OptUint - Free metrics.OptUint - Cached metrics.OptUint + Total metrics.OptUint `struct:"total,omitempty"` + Used UsedMemStats `struct:"used,omitempty"` + + Free metrics.OptUint `struct:"free,omitempty"` + Cached metrics.OptUint `struct:"cached,omitempty"` // Actual values are, technically, a linux-only concept // For better or worse we've expanded it to include "derived" // Memory values on other platforms, which we should // probably keep for the sake of backwards compatibility - ActualFree metrics.OptUint - ActualUsed metrics.OptUint - - // Derived values - UsedPercent metrics.OptFloat - UsedActualPercent metrics.OptFloat + Actual ActualMemoryMetrics `struct:"actual,omitempty"` // Swap metrics - SwapTotal metrics.OptUint - SwapUsed metrics.OptUint - SwapFree metrics.OptUint - SwapUsedPercent metrics.OptFloat + Swap SwapMetrics `struct:"swap,omitempty"` } -func newMemory() Memory { - return Memory{ - Total: metrics.NewUint(), - Used: metrics.NewUint(), - Free: metrics.NewUint(), - Cached: metrics.NewUint(), - ActualFree: metrics.NewUint(), - ActualUsed: metrics.NewUint(), - UsedPercent: metrics.NewFloat(), - UsedActualPercent: metrics.NewFloat(), - - SwapTotal: metrics.NewUint(), - SwapUsed: metrics.NewUint(), - SwapFree: metrics.NewUint(), - SwapUsedPercent: metrics.NewFloat(), - } +// UsedMemStats wraps used.* memory metrics +type UsedMemStats struct { + Pct metrics.OptFloat `struct:"pct,omitempty"` + Bytes metrics.OptUint `struct:"bytes,omitempty"` +} + +// ActualMemoryMetrics wraps the actual.* memory metrics +type ActualMemoryMetrics struct { + Free metrics.OptUint `struct:"free,omitempty"` + Used UsedMemStats `struct:"used,omitempty"` +} + +// SwapMetrics wraps swap.* memory metrics +type SwapMetrics struct { + Total metrics.OptUint `struct:"total,omitempty"` + Used UsedMemStats `struct:"used,omitempty"` + Free metrics.OptUint `struct:"free,omitempty"` } // Get returns platform-independent memory metrics. @@ -60,17 +73,43 @@ func Get(procfs string) (Memory, error) { // Add percentages // In theory, `Used` and `Total` are available everywhere, so assume values are good. if base.Total.ValueOrZero() != 0 { - percUsed := float64(base.Used.ValueOrZero()) / float64(base.Total.ValueOrZero()) - base.UsedPercent.Some(common.Round(percUsed, common.DefaultDecimalPlacesCount)) + percUsed := float64(base.Used.Bytes.ValueOrZero()) / float64(base.Total.ValueOrZero()) + base.Used.Pct = metrics.NewFloatValue(common.Round(percUsed, common.DefaultDecimalPlacesCount)) - actualPercUsed := float64(base.ActualUsed.ValueOrZero()) / float64(base.Total.ValueOrZero()) - base.UsedActualPercent.Some(common.Round(actualPercUsed, common.DefaultDecimalPlacesCount)) + actualPercUsed := float64(base.Actual.Used.Bytes.ValueOrZero()) / float64(base.Total.ValueOrZero()) + base.Actual.Used.Pct = metrics.NewFloatValue(common.Round(actualPercUsed, common.DefaultDecimalPlacesCount)) } - if base.SwapTotal.ValueOrZero() != 0 && base.SwapUsed.Exists() { - perc := float64(base.SwapUsed.ValueOrZero()) / float64(base.SwapTotal.ValueOrZero()) - base.SwapUsedPercent.Some(common.Round(perc, common.DefaultDecimalPlacesCount)) + if base.Swap.Total.ValueOrZero() != 0 && base.Swap.Used.Bytes.Exists() { + perc := float64(base.Swap.Used.Bytes.ValueOrZero()) / float64(base.Swap.Total.ValueOrZero()) + base.Swap.Used.Pct = metrics.NewFloatValue(common.Round(perc, common.DefaultDecimalPlacesCount)) } return base, nil } + +// Format returns a formatted MapStr ready to be sent upstream +func (mem Memory) Format() (common.MapStr, error) { + to := common.MapStr{} + unfold, err := gotype.NewUnfolder(nil, gotype.Unfolders( + metrics.UnfoldOptUint, + metrics.UnfoldOptFloat, + )) + if err != nil { + return nil, errors.Wrap(err, "error creating Folder") + } + fold, err := gotype.NewIterator(unfold, gotype.Folders( + metrics.FoldOptFloat, + metrics.FoldOptUint, + )) + if err != nil { + return nil, errors.Wrap(err, "error creating unfolder") + } + + unfold.SetTarget(&to) + if err := fold.Fold(mem); err != nil { + return nil, errors.Wrap(err, "error folding memory structure") + } + + return to, nil +} diff --git a/metricbeat/internal/metrics/memory/memory_darwin.go b/metricbeat/internal/metrics/memory/memory_darwin.go new file mode 100644 index 00000000000..223ffecb2fb --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_darwin.go @@ -0,0 +1,132 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory + +/* +#include +#include +#include +#include +#include +#include +#include +#include +#include +*/ +import "C" + +import ( + "bytes" + "encoding/binary" + "fmt" + "syscall" + "unsafe" + + "github.com/pkg/errors" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" +) + +type xswUsage struct { + Total, Avail, Used uint64 +} + +// get is the darwin implementation for fetching Memory data +func Get(_ string) (Memory, error) { + var vmstat C.vm_statistics_data_t + + mem := Memory{} + + var total uint64 + mem.Total = metrics.NewUintValue(total) + if err := sysctlbyname("hw.memsize", &total); err != nil { + return Memory{}, errors.Wrap(err, "error getting memsize") + } + + if err := vmInfo(&vmstat); err != nil { + return Memory{}, errors.Wrap(err, "error getting VM info") + } + + kern := uint64(vmstat.inactive_count) << 12 + free := uint64(vmstat.free_count) << 12 + + mem.Free = metrics.NewUintValue(free) + mem.Used.Bytes = metrics.NewUintValue(total - free) + + mem.Actual.Free = metrics.NewUintValue(free + kern) + mem.Actual.Used.Bytes = metrics.NewUintValue(mem.Used.Bytes.ValueOrZero() - kern) + + var err error + mem.Swap, err = getSwap() + if err != nil { + return mem, errors.Wrap(err, "error getting swap memory") + } + + return mem, nil +} + +// Get fetches swap data +func getSwap() (SwapMetrics, error) { + swUsage := xswUsage{} + + swap := SwapMetrics{} + if err := sysctlbyname("vm.swapusage", &swUsage); err != nil { + return swap, errors.Wrap(err, "error getting swap usage") + } + + swap.Total = metrics.NewUintValue(swUsage.Total) + swap.Used.Bytes = metrics.NewUintValue(swUsage.Used) + swap.Free = metrics.NewUintValue(swUsage.Avail) + + return swap, nil +} + +// generic Sysctl buffer unmarshalling +func sysctlbyname(name string, data interface{}) (err error) { + val, err := syscall.Sysctl(name) + if err != nil { + return err + } + + buf := []byte(val) + + switch v := data.(type) { + case *uint64: + *v = *(*uint64)(unsafe.Pointer(&buf[0])) + return + } + + bbuf := bytes.NewBuffer([]byte(val)) + return binary.Read(bbuf, binary.LittleEndian, data) +} + +func vmInfo(vmstat *C.vm_statistics_data_t) error { + var count C.mach_msg_type_number_t = C.HOST_VM_INFO_COUNT + + status := C.host_statistics( + C.host_t(C.mach_host_self()), + C.HOST_VM_INFO, + C.host_info_t(unsafe.Pointer(vmstat)), + &count) + + if status != C.KERN_SUCCESS { + return fmt.Errorf("host_statistics=%d", status) + } + + return nil +} diff --git a/metricbeat/internal/metrics/memory/memory_linux.go b/metricbeat/internal/metrics/memory/memory_linux.go index 9fa59369992..c4b8499856c 100644 --- a/metricbeat/internal/metrics/memory/memory_linux.go +++ b/metricbeat/internal/metrics/memory/memory_linux.go @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + package memory import ( @@ -10,6 +27,8 @@ import ( "strings" "github.com/pkg/errors" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" ) // get is the linux implementation for fetching Memory data @@ -19,17 +38,17 @@ func get(rootfs string) (Memory, error) { return Memory{}, errors.Wrap(err, "error fetching meminfo") } - memData := newMemory() + memData := Memory{} var free, cached uint64 if total, ok := table["MemTotal"]; ok { - memData.Total.Some(total) + memData.Total = metrics.NewUintValue(total) } if free, ok := table["MemFree"]; ok { - memData.Free.Some(free) + memData.Free = metrics.NewUintValue(free) } if cached, ok := table["Cached"]; ok { - memData.Cached.Some(cached) + memData.Cached = metrics.NewUintValue(cached) } // overlook parsing issues here @@ -39,7 +58,7 @@ func get(rootfs string) (Memory, error) { if memAvail, ok := table["MemAvailable"]; ok { // MemAvailable is in /proc/meminfo (kernel 3.14+) - memData.ActualFree.Some(memAvail) + memData.Actual.Free = metrics.NewUintValue(memAvail) } else { // in the future we may want to find another way to do this. // "MemAvailable" and other more derivied metrics @@ -50,21 +69,24 @@ func get(rootfs string) (Memory, error) { // The use of `cached` here is particularly concerning, // as under certain intense DB server workloads, the cached memory can be quite large // and give the impression that we've passed memory usage watermark - memData.ActualFree.Some(free + buffers + cached) + memData.Actual.Free = metrics.NewUintValue(free + buffers + cached) } + memData.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Free.ValueOrZero()) + memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Actual.Free.ValueOrZero()) + // Populate swap data swapTotal, okST := table["SwapTotal"] if okST { - memData.SwapTotal.Some(swapTotal) + memData.Swap.Total = metrics.NewUintValue(swapTotal) } swapFree, okSF := table["SwapFree"] if okSF { - memData.SwapTotal.Some(swapFree) + memData.Swap.Free = metrics.NewUintValue(swapFree) } if okSF && okST { - memData.SwapUsed.Some(swapTotal - swapFree) + memData.Swap.Used.Bytes = metrics.NewUintValue(swapTotal - swapFree) } return memData, nil diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go index d445dac5806..f24c6ad7de7 100644 --- a/metricbeat/internal/metrics/opt.go +++ b/metricbeat/internal/metrics/opt.go @@ -1,3 +1,20 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + package metrics // OptUint is a wrapper for "optional" types, with the bool value indicating @@ -7,14 +24,22 @@ type OptUint struct { value uint64 } -// NewUint returns a new uint wrapper -func NewUint() OptUint { +// NewUintNone returns a new OptUint wrapper +func NewUintNone() OptUint { return OptUint{ exists: false, value: 0, } } +// NewUintValue returns a new OptUint wrapper with a given int +func NewUintValue(i uint64) OptUint { + return OptUint{ + exists: true, + value: i, + } +} + // None marks the Uint as not having a value. func (opt *OptUint) None() { opt.exists = false @@ -25,12 +50,23 @@ func (opt OptUint) Exists() bool { return opt.exists } -// Some Sets a valid value inside the OptUint -func (opt *OptUint) Some(i uint64) { +// IsSome returns true if the value exists +func (opt OptUint) IsSome(i uint64) { opt.value = i opt.exists = true } +// IsNone returns true if the value exists +func (opt OptUint) IsNone(i uint64) { + opt.value = i + opt.exists = true +} + +// Value returns true if the value exists +func (opt OptUint) Value() (uint64, bool) { + return opt.value, opt.exists +} + // ValueOrZero returns the stored value, or zero // Please do not use this for populating reported data, // as we actually want to avoid sending zeros where values are functionally null @@ -41,6 +77,15 @@ func (opt OptUint) ValueOrZero() uint64 { return 0 } +// SumOptUint sums a list of OptUint values +func SumOptUint(opts ...OptUint) uint64 { + var sum uint64 + for _, opt := range opts { + sum += opt.ValueOrZero() + } + return sum +} + // OptFloat is a wrapper for "optional" types, with the bool value indicating // if the stored int is a legitimate value. type OptFloat struct { @@ -48,23 +93,20 @@ type OptFloat struct { value float64 } -// NewFloat returns a new uint wrapper -func NewFloat() OptFloat { +// NewFloatNone returns a new uint wrapper +func NewFloatNone() OptFloat { return OptFloat{ exists: false, value: 0, } } -// None marks the Uint as not having a value. -func (opt *OptFloat) None() { - opt.exists = false -} - -// Some Sets a valid value inside the OptUint -func (opt *OptFloat) Some(i float64) { - opt.value = i - opt.exists = true +// NewFloatValue returns a new uint wrapper for the specified value +func NewFloatValue(f float64) OptFloat { + return OptFloat{ + exists: true, + value: f, + } } // Exists returns true if the underlying value is valid diff --git a/metricbeat/module/linux/memory/memory.go b/metricbeat/module/linux/memory/memory.go index eb2cbaa0cc7..35cd407b9b3 100644 --- a/metricbeat/module/linux/memory/memory.go +++ b/metricbeat/module/linux/memory/memory.go @@ -18,10 +18,11 @@ package memory import ( + "github.com/pkg/errors" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/common/cfgwarn" "github.com/elastic/beats/v7/metricbeat/mb" - "github.com/pkg/errors" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/system/memory/_meta/data.json b/metricbeat/module/system/memory/_meta/data.json index 838960bc5d0..15ad36cad82 100644 --- a/metricbeat/module/system/memory/_meta/data.json +++ b/metricbeat/module/system/memory/_meta/data.json @@ -15,13 +15,14 @@ "system": { "memory": { "actual": { - "free": 48339243008, + "free": 45362016256, "used": { - "bytes": 19175571456, - "pct": 0.284 + "bytes": 22152798208, + "pct": 0.3281 } }, - "free": 10025598976, + "cached": 42681081856, + "free": 2059706368, "hugepages": { "default_size": 2097152, "free": 0, @@ -41,34 +42,34 @@ }, "page_stats": { "direct_efficiency": { - "pct": 0.9839 + "pct": 0.9872 }, "kswapd_efficiency": { - "pct": 0.7739 + "pct": 0.7515 }, "pgfree": { - "pages": 40943568817 + "pages": 50957037258 }, "pgscan_direct": { - "pages": 1199988 + "pages": 1508615 }, "pgscan_kswapd": { - "pages": 19970993 + "pages": 23543712 }, "pgsteal_direct": { - "pages": 1180686 + "pages": 1489234 }, "pgsteal_kswapd": { - "pages": 15456470 + "pages": 17693625 } }, "swap": { - "free": 8563716096, + "free": 8563453952, "in": { "pages": 727 }, "out": { - "pages": 10484 + "pages": 10531 }, "readahead": { "cached": 9, @@ -76,14 +77,14 @@ }, "total": 8589930496, "used": { - "bytes": 26214400, + "bytes": 26476544, "pct": 0.0031 } }, "total": 67514814464, "used": { - "bytes": 57489215488, - "pct": 0.8515 + "bytes": 65455108096, + "pct": 0.9695 } } } diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 213735be5db..dc3afa19e6c 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -24,9 +24,9 @@ import ( "runtime" "github.com/pkg/errors" + //"github.com/rcrowley/go-metrics" - "github.com/elastic/beats/v7/libbeat/common" - mem "github.com/elastic/beats/v7/libbeat/metric/system/memory" + metrics "github.com/elastic/beats/v7/metricbeat/internal/metrics/memory" "github.com/elastic/beats/v7/metricbeat/mb" "github.com/elastic/beats/v7/metricbeat/mb/parse" linux "github.com/elastic/beats/v7/metricbeat/module/linux/memory" @@ -59,42 +59,54 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { // Fetch fetches memory metrics from the OS. func (m *MetricSet) Fetch(r mb.ReporterV2) error { - memStat, err := mem.Get() - if err != nil { - return errors.Wrap(err, "memory") - } - mem.AddMemPercentage(memStat) - swapStat, err := mem.GetSwap() + eventRaw, err := metrics.Get("") if err != nil { - return errors.Wrap(err, "swap") - } - mem.AddSwapPercentage(swapStat) - - memory := common.MapStr{ - "total": memStat.Total, - "used": common.MapStr{ - "bytes": memStat.Used, - "pct": memStat.UsedPercent, - }, - "free": memStat.Free, - "actual": common.MapStr{ - "free": memStat.ActualFree, - "used": common.MapStr{ - "pct": memStat.ActualUsedPercent, - "bytes": memStat.ActualUsed, - }, - }, + return errors.Wrap(err, "error fetching memory metrics") } - swap := common.MapStr{ - "total": swapStat.Total, - "used": common.MapStr{ - "bytes": swapStat.Used, - "pct": swapStat.UsedPercent, - }, - "free": swapStat.Free, + memory, err := eventRaw.Format() + if err != nil { + return errors.Wrap(err, "error formatting base memory events") } + // memStat, err := mem.Get() + // if err != nil { + // return errors.Wrap(err, "memory") + // } + // mem.AddMemPercentage(memStat) + + // swapStat, err := mem.GetSwap() + // if err != nil { + // return errors.Wrap(err, "swap") + // } + // mem.AddSwapPercentage(swapStat) + + // memory := common.MapStr{ + // "total": memStat.Total, + // "used": common.MapStr{ + // "bytes": memStat.Used, + // "pct": memStat.UsedPercent, + // }, + // "free": memStat.Free, + // "actual": common.MapStr{ + // "free": memStat.ActualFree, + // "used": common.MapStr{ + // "pct": memStat.ActualUsedPercent, + // "bytes": memStat.ActualUsed, + // }, + // }, + // } + + // swap := common.MapStr{ + // "total": swapStat.Total, + // "used": common.MapStr{ + // "bytes": swapStat.Used, + // "pct": swapStat.UsedPercent, + // }, + // "free": swapStat.Free, + // } + + // memory["swap"] = swap // for backwards compatibility, only report if we're not in fleet mode // This is entirely linux-specific data that should live in linux/memory. @@ -110,23 +122,25 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { } if vmstat != nil { // Swap in and swap out numbers - swap["in"] = common.MapStr{ - "pages": vmstat.Pswpin, - } - swap["out"] = common.MapStr{ - "pages": vmstat.Pswpout, - } + memory.Put("swap.in.pages", vmstat.Pswpin) + memory.Put("swap.out.pages", vmstat.Pswpout) + memory.Put("swap.readahead.pages", vmstat.SwapRa) + memory.Put("swap.readahead.cached", vmstat.SwapRaHit) + // swap["in"] = common.MapStr{ + // "pages": vmstat.Pswpin, + // } + // swap["out"] = common.MapStr{ + // "pages": vmstat.Pswpout, + // } //Swap readahead //See https://www.kernel.org/doc/ols/2007/ols2007v2-pages-273-284.pdf - swap["readahead"] = common.MapStr{ - "pages": vmstat.SwapRa, - "cached": vmstat.SwapRaHit, - } + // swap["readahead"] = common.MapStr{ + // "pages": vmstat.SwapRa, + // "cached": vmstat.SwapRaHit, + // } } } - memory["swap"] = swap - r.Event(mb.Event{ MetricSetFields: memory, }) From 59fc7d4e1d2a3b234ce646902080ba5da5f95983 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 8 Jun 2021 11:40:24 -0700 Subject: [PATCH 04/24] fix build platform issues --- .../internal/metrics/memory/memory_darwin.go | 2 +- metricbeat/module/linux/memory/data.go | 17 ++--- .../module/system/memory/helper_linux.go | 32 +++++++++ .../module/system/memory/helper_other.go | 35 ++++++++++ metricbeat/module/system/memory/memory.go | 67 ++----------------- 5 files changed, 84 insertions(+), 69 deletions(-) create mode 100644 metricbeat/module/system/memory/helper_linux.go create mode 100644 metricbeat/module/system/memory/helper_other.go diff --git a/metricbeat/internal/metrics/memory/memory_darwin.go b/metricbeat/internal/metrics/memory/memory_darwin.go index 223ffecb2fb..8ec506b395d 100644 --- a/metricbeat/internal/metrics/memory/memory_darwin.go +++ b/metricbeat/internal/metrics/memory/memory_darwin.go @@ -47,7 +47,7 @@ type xswUsage struct { } // get is the darwin implementation for fetching Memory data -func Get(_ string) (Memory, error) { +func get(_ string) (Memory, error) { var vmstat C.vm_statistics_data_t mem := Memory{} diff --git a/metricbeat/module/linux/memory/data.go b/metricbeat/module/linux/memory/data.go index 2461a4d77a0..18cf34baf00 100644 --- a/metricbeat/module/linux/memory/data.go +++ b/metricbeat/module/linux/memory/data.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -// +build darwin freebsd linux openbsd windows +// +build linux package memory @@ -140,13 +140,14 @@ func GetVMStat() (*sysinfotypes.VMStatInfo, error) { if err != nil { return nil, errors.Wrap(err, "failed to read self process information") } - if vmstatHandle, ok := h.(sysinfotypes.VMStat); ok { - info, err := vmstatHandle.VMStat() - if err != nil { - return nil, errors.Wrap(err, "error getting VMStat info") - } - return info, nil + vmstatHandle, ok := h.(sysinfotypes.VMStat) + if !ok { + return nil, errors.Wrap(err, "VMStat not available for platform") + } + info, err := vmstatHandle.VMStat() + if err != nil { + return nil, errors.Wrap(err, "error getting VMStat info") } - return nil, nil + return info, nil } diff --git a/metricbeat/module/system/memory/helper_linux.go b/metricbeat/module/system/memory/helper_linux.go new file mode 100644 index 00000000000..a0ba099afae --- /dev/null +++ b/metricbeat/module/system/memory/helper_linux.go @@ -0,0 +1,32 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory + +import ( + "github.com/elastic/beats/v7/libbeat/common" + linux "github.com/elastic/beats/v7/metricbeat/module/linux/memory" + sysinfotypes "github.com/elastic/go-sysinfo/types" +) + +func fetchLinuxMemStats(baseMap common.MapStr) error { + return linux.FetchLinuxMemStats(baseMap) +} + +func getVMStat() (*sysinfotypes.VMStatInfo, error) { + return linux.GetVMStat() +} diff --git a/metricbeat/module/system/memory/helper_other.go b/metricbeat/module/system/memory/helper_other.go new file mode 100644 index 00000000000..ab188042799 --- /dev/null +++ b/metricbeat/module/system/memory/helper_other.go @@ -0,0 +1,35 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// +build darwin freebsd aix openbsd windows + +package memory + +import ( + "errors" + + "github.com/elastic/beats/v7/libbeat/common" + sysinfotypes "github.com/elastic/go-sysinfo/types" +) + +func fetchLinuxMemStats(baseMap common.MapStr) error { + return errors.New("MemStats is only available on Linux") +} + +func getVMStat() (*sysinfotypes.VMStatInfo, error) { + return nil, errors.New("VMStat is only available on Linux") +} diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index dc3afa19e6c..6d861a64aae 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -29,7 +29,6 @@ import ( metrics "github.com/elastic/beats/v7/metricbeat/internal/metrics/memory" "github.com/elastic/beats/v7/metricbeat/mb" "github.com/elastic/beats/v7/metricbeat/mb/parse" - linux "github.com/elastic/beats/v7/metricbeat/module/linux/memory" "github.com/elastic/beats/v7/metricbeat/module/system" ) @@ -69,76 +68,24 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { if err != nil { return errors.Wrap(err, "error formatting base memory events") } - // memStat, err := mem.Get() - // if err != nil { - // return errors.Wrap(err, "memory") - // } - // mem.AddMemPercentage(memStat) - - // swapStat, err := mem.GetSwap() - // if err != nil { - // return errors.Wrap(err, "swap") - // } - // mem.AddSwapPercentage(swapStat) - - // memory := common.MapStr{ - // "total": memStat.Total, - // "used": common.MapStr{ - // "bytes": memStat.Used, - // "pct": memStat.UsedPercent, - // }, - // "free": memStat.Free, - // "actual": common.MapStr{ - // "free": memStat.ActualFree, - // "used": common.MapStr{ - // "pct": memStat.ActualUsedPercent, - // "bytes": memStat.ActualUsed, - // }, - // }, - // } - - // swap := common.MapStr{ - // "total": swapStat.Total, - // "used": common.MapStr{ - // "bytes": swapStat.Used, - // "pct": swapStat.UsedPercent, - // }, - // "free": swapStat.Free, - // } - - // memory["swap"] = swap // for backwards compatibility, only report if we're not in fleet mode // This is entirely linux-specific data that should live in linux/memory. // DEPRECATE: remove this for 8.0 if !m.IsAgent && runtime.GOOS == "linux" { - err := linux.FetchLinuxMemStats(memory) + err := fetchLinuxMemStats(memory) if err != nil { return errors.Wrap(err, "error getting page stats") } - vmstat, err := linux.GetVMStat() + vmstat, err := getVMStat() if err != nil { return errors.Wrap(err, "VMStat") } - if vmstat != nil { - // Swap in and swap out numbers - memory.Put("swap.in.pages", vmstat.Pswpin) - memory.Put("swap.out.pages", vmstat.Pswpout) - memory.Put("swap.readahead.pages", vmstat.SwapRa) - memory.Put("swap.readahead.cached", vmstat.SwapRaHit) - // swap["in"] = common.MapStr{ - // "pages": vmstat.Pswpin, - // } - // swap["out"] = common.MapStr{ - // "pages": vmstat.Pswpout, - // } - //Swap readahead - //See https://www.kernel.org/doc/ols/2007/ols2007v2-pages-273-284.pdf - // swap["readahead"] = common.MapStr{ - // "pages": vmstat.SwapRa, - // "cached": vmstat.SwapRaHit, - // } - } + // Swap in and swap out numbers + memory.Put("swap.in.pages", vmstat.Pswpin) + memory.Put("swap.out.pages", vmstat.Pswpout) + memory.Put("swap.readahead.pages", vmstat.SwapRa) + memory.Put("swap.readahead.cached", vmstat.SwapRaHit) } r.Event(mb.Event{ From f51e0bf505e834ba4b872a324c7568653cffbae6 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 8 Jun 2021 11:51:53 -0700 Subject: [PATCH 05/24] fix metrics on darwin --- metricbeat/internal/metrics/memory/memory_darwin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metricbeat/internal/metrics/memory/memory_darwin.go b/metricbeat/internal/metrics/memory/memory_darwin.go index 8ec506b395d..08a18539e46 100644 --- a/metricbeat/internal/metrics/memory/memory_darwin.go +++ b/metricbeat/internal/metrics/memory/memory_darwin.go @@ -53,10 +53,11 @@ func get(_ string) (Memory, error) { mem := Memory{} var total uint64 - mem.Total = metrics.NewUintValue(total) + if err := sysctlbyname("hw.memsize", &total); err != nil { return Memory{}, errors.Wrap(err, "error getting memsize") } + mem.Total = metrics.NewUintValue(total) if err := vmInfo(&vmstat); err != nil { return Memory{}, errors.Wrap(err, "error getting VM info") From 484d064d751a30dbb2d31672198a863e8a586c5a Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 8 Jun 2021 13:34:30 -0700 Subject: [PATCH 06/24] add openbsd --- .../internal/metrics/memory/memory_openbsd.go | 233 ++++++++++++++++++ metricbeat/module/linux/memory/data.go | 2 +- metricbeat/module/system/memory/memory.go | 2 +- 3 files changed, 235 insertions(+), 2 deletions(-) create mode 100644 metricbeat/internal/metrics/memory/memory_openbsd.go diff --git a/metricbeat/internal/metrics/memory/memory_openbsd.go b/metricbeat/internal/metrics/memory/memory_openbsd.go new file mode 100644 index 00000000000..ec10e0ba8ce --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_openbsd.go @@ -0,0 +1,233 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory + +/* +#include +#include +#include +#include +#include +#include +#include +#include +*/ +import "C" + +import ( + "syscall" + "unsafe" + + "github.com/pkg/errors" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" +) + +// Uvmexp wraps memory data from sysctl +type Uvmexp struct { + pagesize uint32 + pagemask uint32 + pageshift uint32 + npages uint32 + free uint32 + active uint32 + inactive uint32 + paging uint32 + wired uint32 + zeropages uint32 + reserve_pagedaemon uint32 + reserve_kernel uint32 + anonpages uint32 + vnodepages uint32 + vtextpages uint32 + freemin uint32 + freetarg uint32 + inactarg uint32 + wiredmax uint32 + anonmin uint32 + vtextmin uint32 + vnodemin uint32 + anonminpct uint32 + vtextmi uint32 + npct uint32 + vnodeminpct uint32 + nswapdev uint32 + swpages uint32 + swpginuse uint32 + swpgonly uint32 + nswget uint32 + nanon uint32 + nanonneeded uint32 + nfreeanon uint32 + faults uint32 + traps uint32 + intrs uint32 + swtch uint32 + softs uint32 + syscalls uint32 + pageins uint32 + obsolete_swapins uint32 + obsolete_swapouts uint32 + pgswapin uint32 + pgswapout uint32 + forks uint32 + forks_ppwait uint32 + forks_sharevm uint32 + pga_zerohit uint32 + pga_zeromiss uint32 + zeroaborts uint32 + fltnoram uint32 + fltnoanon uint32 + fltpgwait uint32 + fltpgrele uint32 + fltrelck uint32 + fltrelckok uint32 + fltanget uint32 + fltanretry uint32 + fltamcopy uint32 + fltnamap uint32 + fltnomap uint32 + fltlget uint32 + fltget uint32 + flt_anon uint32 + flt_acow uint32 + flt_obj uint32 + flt_prcopy uint32 + flt_przero uint32 + pdwoke uint32 + pdrevs uint32 + pdswout uint32 + pdfreed uint32 + pdscans uint32 + pdanscan uint32 + pdobscan uint32 + pdreact uint32 + pdbusy uint32 + pdpageouts uint32 + pdpending uint32 + pddeact uint32 + pdreanon uint32 + pdrevnode uint32 + pdrevtext uint32 + fpswtch uint32 + kmapent uint32 +} + +// Bcachestats reports cache stats from sysctl +type Bcachestats struct { + numbufs uint64 + numbufpages uint64 + numdirtypages uint64 + numcleanpages uint64 + pendingwrites uint64 + pendingreads uint64 + numwrites uint64 + numreads uint64 + cachehits uint64 + busymapped uint64 + dmapages uint64 + highpages uint64 + delwribufs uint64 + kvaslots uint64 + kvaslots_avail uint64 +} + +// Swapent reports swap metrics from sysctl +type Swapent struct { + se_dev C.dev_t + se_flags int32 + se_nblks int32 + se_inuse int32 + se_priority int32 + sw_path []byte +} + +func get(_ string) (Memory, error) { + + memData := Memory{} + + n := uintptr(0) + var uvmexp Uvmexp + mib := [2]int32{C.CTL_VM, C.VM_UVMEXP} + n = uintptr(0) + // First we determine how much memory we'll need to pass later on (via `n`) + _, _, errno := syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib[0])), 2, 0, uintptr(unsafe.Pointer(&n)), 0, 0) + if errno != 0 || n == 0 { + return memData, errors.Errorf("Error in size VM_UVMEXP sysctl call, errno %d", errno) + } + + _, _, errno = syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib[0])), 2, uintptr(unsafe.Pointer(&uvmexp)), uintptr(unsafe.Pointer(&n)), 0, 0) + if errno != 0 || n == 0 { + return memData, errors.Errorf("Error in VM_UVMEXP sysctl call, errno %d", errno) + } + + var bcachestats Bcachestats + mib3 := [3]int32{C.CTL_VFS, C.VFS_GENERIC, C.VFS_BCACHESTAT} + n = uintptr(0) + _, _, errno = syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib3[0])), 3, 0, uintptr(unsafe.Pointer(&n)), 0, 0) + if errno != 0 || n == 0 { + return memData, errors.Errorf("Error in size VFS_BCACHESTAT sysctl call, errno %d", errno) + } + _, _, errno = syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib3[0])), 3, uintptr(unsafe.Pointer(&bcachestats)), uintptr(unsafe.Pointer(&n)), 0, 0) + if errno != 0 || n == 0 { + return memData, errors.Errorf("Error in VFS_BCACHESTAT sysctl call, errno %d", errno) + } + + memData.Total = metrics.NewUintValue(uint64(uvmexp.npages) << uvmexp.pageshift) + memData.Used.Bytes = metrics.NewUintValue(uint64(uvmexp.npages-uvmexp.free) << uvmexp.pageshift) + memData.Free = metrics.NewUintValue(uint64(uvmexp.free) << uvmexp.pageshift) + + memData.Actual.Free = metrics.NewUintValue(memData.Free.ValueOrZero() + (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) + memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Used.Bytes.ValueOrZero() - (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) + + var err error + memData.Swap, err = getSwap() + if err != nil { + return memData, errors.Wrap(err, "error getting swap data") + } + + return memData, nil +} + +func getSwap() (SwapMetrics, error) { + swapData := SwapMetrics{} + nswap := C.swapctl(C.SWAP_NSWAP, unsafe.Pointer(uintptr(0)), 0) + + // If there are no swap devices, nothing to do here. + if nswap == 0 { + return swapData, nil + } + + swdev := make([]Swapent, nswap) + + rnswap := C.swapctl(C.SWAP_STATS, unsafe.Pointer(&swdev[0]), nswap) + if rnswap == 0 { + return swapData, errors.Errorf("error in SWAP_STATS sysctl, swapctl returned %d", rnswap) + } + + for i := 0; i < int(nswap); i++ { + if swdev[i].se_flags&C.SWF_ENABLE == 2 { + swapData.Used.Bytes = metrics.NewUintValue(swapData.Used.Bytes.ValueOrZero() + uint64(swdev[i].se_inuse/(1024/C.DEV_BSIZE))) + swapData.Total = metrics.NewUintValue(swapData.Total.ValueOrZero() + uint64(swdev[i].se_nblks/(1024/C.DEV_BSIZE))) + } + } + + swapData.Free = metrics.NewUintValue(swapData.Total.ValueOrZero() - swapData.Used.Bytes.ValueOrZero()) + + return swapData, nil +} diff --git a/metricbeat/module/linux/memory/data.go b/metricbeat/module/linux/memory/data.go index 18cf34baf00..3c2902602c6 100644 --- a/metricbeat/module/linux/memory/data.go +++ b/metricbeat/module/linux/memory/data.go @@ -35,7 +35,7 @@ func FetchLinuxMemStats(baseMap common.MapStr) error { vmstat, err := GetVMStat() if err != nil { - return errors.Wrap(err, "VMStat") + return errors.Wrap(err, "error fetching VMStats") } pageStats := common.MapStr{ diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 6d861a64aae..1a3a583ce6e 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -79,7 +79,7 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { } vmstat, err := getVMStat() if err != nil { - return errors.Wrap(err, "VMStat") + return errors.Wrap(err, "Error getting VMStat data") } // Swap in and swap out numbers memory.Put("swap.in.pages", vmstat.Pswpin) From fa17efdd75e16fc77b94c2ea5059207f9ac10886 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 9 Jun 2021 08:43:47 -0700 Subject: [PATCH 07/24] add freebsd --- .../internal/metrics/memory/memory_freebsd.go | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 metricbeat/internal/metrics/memory/memory_freebsd.go diff --git a/metricbeat/internal/metrics/memory/memory_freebsd.go b/metricbeat/internal/metrics/memory/memory_freebsd.go new file mode 100644 index 00000000000..71d5b505540 --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_freebsd.go @@ -0,0 +1,85 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory + +import ( + "unsafe" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" + "github.com/pkg/errors" +) + +/* +#include +#include +#include +#include +#include +#include +#include +#include +#include +*/ +import "C" + +func get(_ string) (Memory, error) { + val := C.uint32_t(0) + sc := C.size_t(4) + + memData := Memory{} + + name := C.CString("vm.stats.vm.v_page_count") + _, err := C.sysctlbyname(name, unsafe.Pointer(&val), &sc, nil, 0) + C.free(unsafe.Pointer(name)) + if err != nil { + return memData, errors.Errorf("error in vm.stats.vm.v_page_count") + } + pagecount := uint64(val) + + name = C.CString("vm.stats.vm.v_page_size") + _, err = C.sysctlbyname(name, unsafe.Pointer(&val), &sc, nil, 0) + C.free(unsafe.Pointer(name)) + if err != nil { + return memData, errors.Errorf("error in vm.stats.vm.v_page_size") + } + pagesize := uint64(val) + + name = C.CString("vm.stats.vm.v_free_count") + _, err = C.sysctlbyname(name, unsafe.Pointer(&val), &sc, nil, 0) + C.free(unsafe.Pointer(name)) + if err != nil { + return memData, errors.Errorf("error in vm.stats.vm.v_free_count") + } + memData.Free = metrics.NewUintValue(uint64(val) * pagesize) + + name = C.CString("vm.stats.vm.v_inactive_count") + _, err = C.sysctlbyname(name, unsafe.Pointer(&val), &sc, nil, 0) + C.free(unsafe.Pointer(name)) + if err != nil { + return memData, errors.Errorf("error in vm.stats.vm.v_inactive_count") + } + kern := uint64(val) + + memData.Total = metrics.NewUintValue(uint64(pagecount * pagesize)) + + memData.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Free.ValueOrZero()) + memData.Actual.Free = metrics.NewUintValue(memData.Free.ValueOrZero() + (kern * pagesize)) + memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Used.Bytes.ValueOrZero() - (kern * pagesize)) + + return memData, nil +} From d9da0ea64796de0813fde62073d77d7f146e6466 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 9 Jun 2021 11:48:13 -0700 Subject: [PATCH 08/24] add windows, aix --- metricbeat/internal/metrics/memory/memory.go | 4 +- .../internal/metrics/memory/memory_aix.go | 72 +++++++++++++++++++ .../internal/metrics/memory/memory_freebsd.go | 3 +- .../internal/metrics/memory/memory_windows.go | 51 +++++++++++++ 4 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 metricbeat/internal/metrics/memory/memory_aix.go create mode 100644 metricbeat/internal/metrics/memory/memory_windows.go diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index cb60450733c..1d82e794181 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -34,10 +34,12 @@ type Memory struct { Free metrics.OptUint `struct:"free,omitempty"` Cached metrics.OptUint `struct:"cached,omitempty"` - // Actual values are, technically, a linux-only concept + // "Actual" values are, technically, a linux-only concept // For better or worse we've expanded it to include "derived" // Memory values on other platforms, which we should // probably keep for the sake of backwards compatibility + // However, because the derived value varies from platform to platform, + // We may want to more precisely document what these mean. Actual ActualMemoryMetrics `struct:"actual,omitempty"` // Swap metrics diff --git a/metricbeat/internal/metrics/memory/memory_aix.go b/metricbeat/internal/metrics/memory/memory_aix.go new file mode 100644 index 00000000000..d90c122d765 --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_aix.go @@ -0,0 +1,72 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory + +/* +#cgo LDFLAGS: -L/usr/lib -lperfstat + +#include +#include +#include +#include +#include +#include +#include +#include + +*/ +import "C" + +import ( + "fmt" + "os" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" +) + +var system struct { + ticks uint64 + btime uint64 + pagesize uint64 +} + +func init() { + // sysconf(_SC_CLK_TCK) returns the number of ticks by second. + system.ticks = uint64(C.sysconf(C._SC_CLK_TCK)) + system.pagesize = uint64(os.Getpagesize()) +} + +func get(_ string) (Memory, error) { + memData := Memory{} + meminfo := C.perfstat_memory_total_t{} + _, err := C.perfstat_memory_total(nil, &meminfo, C.sizeof_perfstat_memory_total_t, 1) + if err != nil { + return memData, fmt.Errorf("perfstat_memory_total: %s", err) + } + + memData.Total = metrics.NewUintValue(uint64(meminfo.real_total) * system.pagesize) + memData.Free = metrics.NewUintValue(uint64(meminfo.real_free) * system.pagesize) + + kern := uint64(meminfo.numperm) * system.pagesize // number of pages in file cache + + memData.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Free.ValueOrZero()) + memData.Actual.Free = metrics.NewUintValue(memData.Free.ValueOrZero() + kern) + memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Used.Bytes.ValueOrZero() - kern) + + return memData, nil +} diff --git a/metricbeat/internal/metrics/memory/memory_freebsd.go b/metricbeat/internal/metrics/memory/memory_freebsd.go index 71d5b505540..6c101231a8d 100644 --- a/metricbeat/internal/metrics/memory/memory_freebsd.go +++ b/metricbeat/internal/metrics/memory/memory_freebsd.go @@ -20,8 +20,9 @@ package memory import ( "unsafe" - "github.com/elastic/beats/v7/metricbeat/internal/metrics" "github.com/pkg/errors" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" ) /* diff --git a/metricbeat/internal/metrics/memory/memory_windows.go b/metricbeat/internal/metrics/memory/memory_windows.go new file mode 100644 index 00000000000..95365d26694 --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_windows.go @@ -0,0 +1,51 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory + +import ( + "github.com/pkg/errors" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" + "github.com/elastic/go-windows" +) + +// get is the windows implementation of get for memory metrics +func get(_ string) (Memory, error) { + + memData := Memory{} + + memoryStatusEx, err := windows.GlobalMemoryStatusEx() + if err != nil { + return memData, errors.Wrap(err, "Error fetching global memory status") + } + memData.Total = metrics.NewUintValue(memoryStatusEx.TotalPhys) + memData.Free = metrics.NewUintValue(memoryStatusEx.AvailPhys) + + memData.Used.Bytes = metrics.NewUintValue(memoryStatusEx.TotalPhys - memoryStatusEx.AvailPhys) + + // We shouldn't really be doing this, but we also don't want to make breaking changes right now, + // and memory.actual is used by quite a few visualizations + memData.Actual.Free = memData.Free + memData.Actual.Used.Bytes = memData.Used.Bytes + + memData.Swap.Free = metrics.NewUintValue(memoryStatusEx.AvailPageFile) + memData.Swap.Total = metrics.NewUintValue(memoryStatusEx.TotalPageFile) + memData.Swap.Used.Bytes = metrics.NewUintValue(memoryStatusEx.TotalPageFile - memoryStatusEx.AvailPageFile) + + return memData, nil +} From 6fea17d4399c2cc87b8096d4343afa74eb074042 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 9 Jun 2021 12:05:07 -0700 Subject: [PATCH 09/24] fix aix build --- metricbeat/module/system/memory/helper_other.go | 2 ++ metricbeat/module/system/memory/memory_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/metricbeat/module/system/memory/helper_other.go b/metricbeat/module/system/memory/helper_other.go index ab188042799..a1a30ba1868 100644 --- a/metricbeat/module/system/memory/helper_other.go +++ b/metricbeat/module/system/memory/helper_other.go @@ -26,6 +26,8 @@ import ( sysinfotypes "github.com/elastic/go-sysinfo/types" ) +// These whole helper files are a shim until we can make breaking changes and remove these +// data enrichers from the metricset, as they're linux-only. func fetchLinuxMemStats(baseMap common.MapStr) error { return errors.New("MemStats is only available on Linux") } diff --git a/metricbeat/module/system/memory/memory_test.go b/metricbeat/module/system/memory/memory_test.go index 978d2de8ae1..515bfcb26b8 100644 --- a/metricbeat/module/system/memory/memory_test.go +++ b/metricbeat/module/system/memory/memory_test.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -// +build darwin freebsd linux openbsd windows +// +build darwin freebsd linux openbsd windows aix package memory From b89318b87aa7c1abb1933b97516b3b6b0ce6a02c Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 9 Jun 2021 13:06:03 -0700 Subject: [PATCH 10/24] finish memory --- libbeat/metric/system/memory/doc.go | 18 --- libbeat/metric/system/memory/memory.go | 120 ------------------ libbeat/metric/system/memory/memory_test.go | 96 -------------- libbeat/metric/system/process/process.go | 16 ++- metricbeat/internal/metrics/memory/memory.go | 6 +- .../internal/metrics/memory/memory_test.go | 93 ++++++++++++++ .../module/system/memory/_meta/data.json | 36 +++--- 7 files changed, 127 insertions(+), 258 deletions(-) delete mode 100644 libbeat/metric/system/memory/doc.go delete mode 100644 libbeat/metric/system/memory/memory.go delete mode 100644 libbeat/metric/system/memory/memory_test.go create mode 100644 metricbeat/internal/metrics/memory/memory_test.go diff --git a/libbeat/metric/system/memory/doc.go b/libbeat/metric/system/memory/doc.go deleted file mode 100644 index 150cf0788e9..00000000000 --- a/libbeat/metric/system/memory/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package memory diff --git a/libbeat/metric/system/memory/memory.go b/libbeat/metric/system/memory/memory.go deleted file mode 100644 index 5813d89a2f8..00000000000 --- a/libbeat/metric/system/memory/memory.go +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// +build darwin freebsd linux openbsd windows - -package memory - -import ( - "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/v7/libbeat/logp" - - sigar "github.com/elastic/gosigar" -) - -// MemStat includes the memory usage statistics and ratios of usage and total memory usage -type MemStat struct { - sigar.Mem - UsedPercent float64 `json:"used_p"` - ActualUsedPercent float64 `json:"actual_used_p"` -} - -// Get returns the memory stats of the host -func Get() (*MemStat, error) { - mem := sigar.Mem{} - err := mem.Get() - if err != nil { - return nil, err - } - - return &MemStat{Mem: mem}, nil -} - -// AddMemPercentage calculates the ratio of used and total size of memory -func AddMemPercentage(m *MemStat) { - if m.Mem.Total == 0 { - return - } - - perc := float64(m.Mem.Used) / float64(m.Mem.Total) - m.UsedPercent = common.Round(perc, common.DefaultDecimalPlacesCount) - - actualPerc := float64(m.Mem.ActualUsed) / float64(m.Mem.Total) - m.ActualUsedPercent = common.Round(actualPerc, common.DefaultDecimalPlacesCount) -} - -// SwapStat includes the current swap usage and the ratio of used and total swap size -type SwapStat struct { - sigar.Swap - UsedPercent float64 `json:"used_p"` -} - -// GetSwap returns the swap usage of the host -func GetSwap() (*SwapStat, error) { - swap := sigar.Swap{} - err := swap.Get() - if err != nil { - return nil, err - } - - // This shouldn't happen, but it has been reported to happen and - // this can provoke too big values for used swap. - // Workaround this by assuming that all swap is free in that case. - if swap.Free > swap.Total || swap.Used > swap.Total { - logger := logp.NewLogger("memory") - logger.Debugf("memory", - "Unexpected values for swap memory - total: %v free: %v used: %v. Setting swap used to 0.", - swap.Total, swap.Free, swap.Used) - swap.Free = swap.Total - swap.Used = 0 - } - - return &SwapStat{Swap: swap}, nil -} - -// GetMemoryEvent returns the event created from memory statistics -func GetMemoryEvent(memStat *MemStat) common.MapStr { - return common.MapStr{ - "total": memStat.Total, - "used": memStat.Used, - "free": memStat.Free, - "actual_used": memStat.ActualUsed, - "actual_free": memStat.ActualFree, - "used_p": memStat.UsedPercent, - "actual_used_p": memStat.ActualUsedPercent, - } -} - -// GetSwapEvent returns the event created from swap usage -func GetSwapEvent(swapStat *SwapStat) common.MapStr { - return common.MapStr{ - "total": swapStat.Total, - "used": swapStat.Used, - "free": swapStat.Free, - "used_p": swapStat.UsedPercent, - } -} - -// AddSwapPercentage calculates the ratio of used and total swap size -func AddSwapPercentage(s *SwapStat) { - if s.Swap.Total == 0 { - return - } - - perc := float64(s.Swap.Used) / float64(s.Swap.Total) - s.UsedPercent = common.Round(perc, common.DefaultDecimalPlacesCount) -} diff --git a/libbeat/metric/system/memory/memory_test.go b/libbeat/metric/system/memory/memory_test.go deleted file mode 100644 index e71e092de52..00000000000 --- a/libbeat/metric/system/memory/memory_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// +build !integration -// +build darwin freebsd linux openbsd windows - -package memory - -import ( - "runtime" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/elastic/gosigar" -) - -func TestGetMemory(t *testing.T) { - mem, err := Get() - - assert.NotNil(t, mem) - assert.NoError(t, err) - - assert.True(t, (mem.Total > 0)) - assert.True(t, (mem.Used > 0)) - assert.True(t, (mem.Free >= 0)) - assert.True(t, (mem.ActualFree >= 0)) - assert.True(t, (mem.ActualUsed > 0)) -} - -func TestGetSwap(t *testing.T) { - if runtime.GOOS == "windows" { - return //no load data on windows - } - - swap, err := GetSwap() - - assert.NotNil(t, swap) - assert.NoError(t, err) - - assert.True(t, (swap.Total >= 0)) - assert.True(t, (swap.Used >= 0)) - assert.True(t, (swap.Free >= 0)) -} - -func TestMemPercentage(t *testing.T) { - m := MemStat{ - Mem: gosigar.Mem{ - Total: 7, - Used: 5, - Free: 2, - }, - } - AddMemPercentage(&m) - assert.Equal(t, m.UsedPercent, 0.7143) - - m = MemStat{ - Mem: gosigar.Mem{Total: 0}, - } - AddMemPercentage(&m) - assert.Equal(t, m.UsedPercent, 0.0) -} - -func TestActualMemPercentage(t *testing.T) { - m := MemStat{ - Mem: gosigar.Mem{ - Total: 7, - ActualUsed: 5, - ActualFree: 2, - }, - } - AddMemPercentage(&m) - assert.Equal(t, m.ActualUsedPercent, 0.7143) - - m = MemStat{ - Mem: gosigar.Mem{ - Total: 0, - }, - } - AddMemPercentage(&m) - assert.Equal(t, m.ActualUsedPercent, 0.0) -} diff --git a/libbeat/metric/system/process/process.go b/libbeat/metric/system/process/process.go index 9e7eb5ac932..3a301000a9a 100644 --- a/libbeat/metric/system/process/process.go +++ b/libbeat/metric/system/process/process.go @@ -32,7 +32,7 @@ import ( "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/common/match" "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/libbeat/metric/system/memory" + sysinfo "github.com/elastic/go-sysinfo" sigar "github.com/elastic/gosigar" "github.com/elastic/gosigar/cgroup" ) @@ -288,12 +288,20 @@ func GetOwnResourceUsageTimeInMillis() (int64, int64, error) { func (procStats *Stats) getProcessEvent(process *Process) common.MapStr { + // This is a holdover until we migrate this library to metricbeat/internal + // At which point we'll use the memory code there. var totalPhyMem uint64 - baseMem, err := memory.Get() + host, err := sysinfo.Host() if err != nil { - procStats.logger.Warnf("Getting memory details: %v", err) + procStats.logger.Warnf("Getting host details: %v", err) } else { - totalPhyMem = baseMem.Mem.Total + memStats, err := host.Memory() + if err != nil { + procStats.logger.Warnf("Getting memory details: %v", err) + } else { + totalPhyMem = memStats.Total + } + } proc := common.MapStr{ diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 1d82e794181..7347dbcb492 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -71,7 +71,11 @@ func Get(procfs string) (Memory, error) { if err != nil { return Memory{}, errors.Wrap(err, "error getting system memory info") } + base.fillPercentages() + return base, nil +} +func (base *Memory) fillPercentages() { // Add percentages // In theory, `Used` and `Total` are available everywhere, so assume values are good. if base.Total.ValueOrZero() != 0 { @@ -86,8 +90,6 @@ func Get(procfs string) (Memory, error) { perc := float64(base.Swap.Used.Bytes.ValueOrZero()) / float64(base.Swap.Total.ValueOrZero()) base.Swap.Used.Pct = metrics.NewFloatValue(common.Round(perc, common.DefaultDecimalPlacesCount)) } - - return base, nil } // Format returns a formatted MapStr ready to be sent upstream diff --git a/metricbeat/internal/metrics/memory/memory_test.go b/metricbeat/internal/metrics/memory/memory_test.go new file mode 100644 index 00000000000..1a5d54954ed --- /dev/null +++ b/metricbeat/internal/metrics/memory/memory_test.go @@ -0,0 +1,93 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// +build !integration +// +build darwin freebsd linux openbsd windows + +package memory + +import ( + "runtime" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/elastic/beats/v7/metricbeat/internal/metrics" +) + +func TestGetMemory(t *testing.T) { + mem, err := Get("") + + assert.NotNil(t, mem) + assert.NoError(t, err) + + assert.True(t, (mem.Total.ValueOrZero() > 0)) + assert.True(t, (mem.Used.Bytes.ValueOrZero() > 0)) + assert.True(t, (mem.Free.ValueOrZero() >= 0)) + assert.True(t, (mem.Actual.Free.ValueOrZero() >= 0)) + assert.True(t, (mem.Actual.Used.Bytes.ValueOrZero() > 0)) +} + +func TestGetSwap(t *testing.T) { + if runtime.GOOS == "freebsd" { + return //no load data on freebsd + } + + mem, err := Get("") + + assert.NotNil(t, mem) + assert.NoError(t, err) + + assert.True(t, (mem.Swap.Total.ValueOrZero() >= 0)) + assert.True(t, (mem.Swap.Used.Bytes.ValueOrZero() >= 0)) + assert.True(t, (mem.Swap.Free.ValueOrZero() >= 0)) +} + +func TestMemPercentage(t *testing.T) { + m := Memory{ + Total: metrics.NewUintValue(7), + Used: UsedMemStats{Bytes: metrics.NewUintValue(5)}, + Free: metrics.NewUintValue(2), + } + m.fillPercentages() + assert.Equal(t, m.Used.Pct.ValueOrZero(), 0.7143) + + m = Memory{ + Total: metrics.NewUintValue(0), + } + m.fillPercentages() + assert.Equal(t, m.Used.Pct.ValueOrZero(), 0.0) +} + +func TestActualMemPercentage(t *testing.T) { + m := Memory{ + Total: metrics.NewUintValue(7), + Actual: ActualMemoryMetrics{ + Used: UsedMemStats{Bytes: metrics.NewUintValue(5)}, + Free: metrics.NewUintValue(2), + }, + } + + m.fillPercentages() + assert.Equal(t, m.Actual.Used.Pct.ValueOrZero(), 0.7143) + + m = Memory{ + Total: metrics.NewUintValue(0), + } + m.fillPercentages() + assert.Equal(t, m.Actual.Used.Pct.ValueOrZero(), 0.0) +} diff --git a/metricbeat/module/system/memory/_meta/data.json b/metricbeat/module/system/memory/_meta/data.json index 15ad36cad82..4e311464f2a 100644 --- a/metricbeat/module/system/memory/_meta/data.json +++ b/metricbeat/module/system/memory/_meta/data.json @@ -15,14 +15,14 @@ "system": { "memory": { "actual": { - "free": 45362016256, + "free": 43083005952, "used": { - "bytes": 22152798208, - "pct": 0.3281 + "bytes": 24431808512, + "pct": 0.3619 } }, - "cached": 42681081856, - "free": 2059706368, + "cached": 38601846784, + "free": 4047224832, "hugepages": { "default_size": 2097152, "free": 0, @@ -42,34 +42,34 @@ }, "page_stats": { "direct_efficiency": { - "pct": 0.9872 + "pct": 0.9871 }, "kswapd_efficiency": { - "pct": 0.7515 + "pct": 0.7105 }, "pgfree": { - "pages": 50957037258 + "pages": 55427784553 }, "pgscan_direct": { - "pages": 1508615 + "pages": 1512375 }, "pgscan_kswapd": { - "pages": 23543712 + "pages": 25880646 }, "pgsteal_direct": { - "pages": 1489234 + "pages": 1492831 }, "pgsteal_kswapd": { - "pages": 17693625 + "pages": 18387096 } }, "swap": { - "free": 8563453952, + "free": 8560832512, "in": { "pages": 727 }, "out": { - "pages": 10531 + "pages": 11197 }, "readahead": { "cached": 9, @@ -77,14 +77,14 @@ }, "total": 8589930496, "used": { - "bytes": 26476544, - "pct": 0.0031 + "bytes": 29097984, + "pct": 0.0034 } }, "total": 67514814464, "used": { - "bytes": 65455108096, - "pct": 0.9695 + "bytes": 63467589632, + "pct": 0.9401 } } } From 44065b38844a2b23ed4e4deba9add6492d850714 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 15 Jun 2021 11:47:37 -0700 Subject: [PATCH 11/24] fix up opt changes --- metricbeat/internal/metrics/memory/memory.go | 16 +++++----- .../internal/metrics/memory/memory_aix.go | 10 +++--- .../internal/metrics/memory/memory_darwin.go | 16 +++++----- .../internal/metrics/memory/memory_freebsd.go | 10 +++--- .../internal/metrics/memory/memory_linux.go | 20 ++++++------ .../internal/metrics/memory/memory_openbsd.go | 16 +++++----- .../internal/metrics/memory/memory_test.go | 32 +++++++++---------- .../internal/metrics/memory/memory_windows.go | 12 +++---- metricbeat/internal/metrics/opt.go | 8 +++-- 9 files changed, 72 insertions(+), 68 deletions(-) diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 7347dbcb492..7a194c48cae 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -78,17 +78,17 @@ func Get(procfs string) (Memory, error) { func (base *Memory) fillPercentages() { // Add percentages // In theory, `Used` and `Total` are available everywhere, so assume values are good. - if base.Total.ValueOrZero() != 0 { - percUsed := float64(base.Used.Bytes.ValueOrZero()) / float64(base.Total.ValueOrZero()) - base.Used.Pct = metrics.NewFloatValue(common.Round(percUsed, common.DefaultDecimalPlacesCount)) + if base.Total.ValueOr(0) != 0 { + percUsed := float64(base.Used.Bytes.ValueOr(0)) / float64(base.Total.ValueOr(0)) + base.Used.Pct = metrics.OptFloatWith(common.Round(percUsed, common.DefaultDecimalPlacesCount)) - actualPercUsed := float64(base.Actual.Used.Bytes.ValueOrZero()) / float64(base.Total.ValueOrZero()) - base.Actual.Used.Pct = metrics.NewFloatValue(common.Round(actualPercUsed, common.DefaultDecimalPlacesCount)) + actualPercUsed := float64(base.Actual.Used.Bytes.ValueOr(0)) / float64(base.Total.ValueOr(0)) + base.Actual.Used.Pct = metrics.OptFloatWith(common.Round(actualPercUsed, common.DefaultDecimalPlacesCount)) } - if base.Swap.Total.ValueOrZero() != 0 && base.Swap.Used.Bytes.Exists() { - perc := float64(base.Swap.Used.Bytes.ValueOrZero()) / float64(base.Swap.Total.ValueOrZero()) - base.Swap.Used.Pct = metrics.NewFloatValue(common.Round(perc, common.DefaultDecimalPlacesCount)) + if base.Swap.Total.ValueOr(0) != 0 && base.Swap.Used.Bytes.Exists() { + perc := float64(base.Swap.Used.Bytes.ValueOr(0)) / float64(base.Swap.Total.ValueOr(0)) + base.Swap.Used.Pct = metrics.OptFloatWith(common.Round(perc, common.DefaultDecimalPlacesCount)) } } diff --git a/metricbeat/internal/metrics/memory/memory_aix.go b/metricbeat/internal/metrics/memory/memory_aix.go index d90c122d765..58c9dbee8d8 100644 --- a/metricbeat/internal/metrics/memory/memory_aix.go +++ b/metricbeat/internal/metrics/memory/memory_aix.go @@ -59,14 +59,14 @@ func get(_ string) (Memory, error) { return memData, fmt.Errorf("perfstat_memory_total: %s", err) } - memData.Total = metrics.NewUintValue(uint64(meminfo.real_total) * system.pagesize) - memData.Free = metrics.NewUintValue(uint64(meminfo.real_free) * system.pagesize) + memData.Total = metrics.OptUintWith(uint64(meminfo.real_total) * system.pagesize) + memData.Free = metrics.OptUintWith(uint64(meminfo.real_free) * system.pagesize) kern := uint64(meminfo.numperm) * system.pagesize // number of pages in file cache - memData.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Free.ValueOrZero()) - memData.Actual.Free = metrics.NewUintValue(memData.Free.ValueOrZero() + kern) - memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Used.Bytes.ValueOrZero() - kern) + memData.Used.Bytes = metrics.OptUintWith(memData.Total.ValueOr(0) - memData.Free.ValueOr(0)) + memData.Actual.Free = metrics.OptUintWith(memData.Free.ValueOr(0) + kern) + memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Used.Bytes.ValueOr(0) - kern) return memData, nil } diff --git a/metricbeat/internal/metrics/memory/memory_darwin.go b/metricbeat/internal/metrics/memory/memory_darwin.go index 08a18539e46..c6eda23d8cb 100644 --- a/metricbeat/internal/metrics/memory/memory_darwin.go +++ b/metricbeat/internal/metrics/memory/memory_darwin.go @@ -57,7 +57,7 @@ func get(_ string) (Memory, error) { if err := sysctlbyname("hw.memsize", &total); err != nil { return Memory{}, errors.Wrap(err, "error getting memsize") } - mem.Total = metrics.NewUintValue(total) + mem.Total = metrics.OptUintWith(total) if err := vmInfo(&vmstat); err != nil { return Memory{}, errors.Wrap(err, "error getting VM info") @@ -66,11 +66,11 @@ func get(_ string) (Memory, error) { kern := uint64(vmstat.inactive_count) << 12 free := uint64(vmstat.free_count) << 12 - mem.Free = metrics.NewUintValue(free) - mem.Used.Bytes = metrics.NewUintValue(total - free) + mem.Free = metrics.OptUintWith(free) + mem.Used.Bytes = metrics.OptUintWith(total - free) - mem.Actual.Free = metrics.NewUintValue(free + kern) - mem.Actual.Used.Bytes = metrics.NewUintValue(mem.Used.Bytes.ValueOrZero() - kern) + mem.Actual.Free = metrics.OptUintWith(free + kern) + mem.Actual.Used.Bytes = metrics.OptUintWith(mem.Used.Bytes.ValueOr(0) - kern) var err error mem.Swap, err = getSwap() @@ -90,9 +90,9 @@ func getSwap() (SwapMetrics, error) { return swap, errors.Wrap(err, "error getting swap usage") } - swap.Total = metrics.NewUintValue(swUsage.Total) - swap.Used.Bytes = metrics.NewUintValue(swUsage.Used) - swap.Free = metrics.NewUintValue(swUsage.Avail) + swap.Total = metrics.OptUintWith(swUsage.Total) + swap.Used.Bytes = metrics.OptUintWith(swUsage.Used) + swap.Free = metrics.OptUintWith(swUsage.Avail) return swap, nil } diff --git a/metricbeat/internal/metrics/memory/memory_freebsd.go b/metricbeat/internal/metrics/memory/memory_freebsd.go index 6c101231a8d..06e2ea57a6d 100644 --- a/metricbeat/internal/metrics/memory/memory_freebsd.go +++ b/metricbeat/internal/metrics/memory/memory_freebsd.go @@ -66,7 +66,7 @@ func get(_ string) (Memory, error) { if err != nil { return memData, errors.Errorf("error in vm.stats.vm.v_free_count") } - memData.Free = metrics.NewUintValue(uint64(val) * pagesize) + memData.Free = metrics.OptUintWith(uint64(val) * pagesize) name = C.CString("vm.stats.vm.v_inactive_count") _, err = C.sysctlbyname(name, unsafe.Pointer(&val), &sc, nil, 0) @@ -76,11 +76,11 @@ func get(_ string) (Memory, error) { } kern := uint64(val) - memData.Total = metrics.NewUintValue(uint64(pagecount * pagesize)) + memData.Total = metrics.OptUintWith(uint64(pagecount * pagesize)) - memData.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Free.ValueOrZero()) - memData.Actual.Free = metrics.NewUintValue(memData.Free.ValueOrZero() + (kern * pagesize)) - memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Used.Bytes.ValueOrZero() - (kern * pagesize)) + memData.Used.Bytes = metrics.OptUintWith(memData.Total.ValueOr(0) - memData.Free.ValueOr(0)) + memData.Actual.Free = metrics.OptUintWith(memData.Free.ValueOr(0) + (kern * pagesize)) + memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Used.Bytes.ValueOr(0) - (kern * pagesize)) return memData, nil } diff --git a/metricbeat/internal/metrics/memory/memory_linux.go b/metricbeat/internal/metrics/memory/memory_linux.go index c4b8499856c..dc563e1b47d 100644 --- a/metricbeat/internal/metrics/memory/memory_linux.go +++ b/metricbeat/internal/metrics/memory/memory_linux.go @@ -42,13 +42,13 @@ func get(rootfs string) (Memory, error) { var free, cached uint64 if total, ok := table["MemTotal"]; ok { - memData.Total = metrics.NewUintValue(total) + memData.Total = metrics.OptUintWith(total) } if free, ok := table["MemFree"]; ok { - memData.Free = metrics.NewUintValue(free) + memData.Free = metrics.OptUintWith(free) } if cached, ok := table["Cached"]; ok { - memData.Cached = metrics.NewUintValue(cached) + memData.Cached = metrics.OptUintWith(cached) } // overlook parsing issues here @@ -58,7 +58,7 @@ func get(rootfs string) (Memory, error) { if memAvail, ok := table["MemAvailable"]; ok { // MemAvailable is in /proc/meminfo (kernel 3.14+) - memData.Actual.Free = metrics.NewUintValue(memAvail) + memData.Actual.Free = metrics.OptUintWith(memAvail) } else { // in the future we may want to find another way to do this. // "MemAvailable" and other more derivied metrics @@ -69,24 +69,24 @@ func get(rootfs string) (Memory, error) { // The use of `cached` here is particularly concerning, // as under certain intense DB server workloads, the cached memory can be quite large // and give the impression that we've passed memory usage watermark - memData.Actual.Free = metrics.NewUintValue(free + buffers + cached) + memData.Actual.Free = metrics.OptUintWith(free + buffers + cached) } - memData.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Free.ValueOrZero()) - memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Total.ValueOrZero() - memData.Actual.Free.ValueOrZero()) + memData.Used.Bytes = metrics.OptUintWith(memData.Total.ValueOr(0) - memData.Free.ValueOr(0)) + memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Total.ValueOr(0) - memData.Actual.Free.ValueOr(0)) // Populate swap data swapTotal, okST := table["SwapTotal"] if okST { - memData.Swap.Total = metrics.NewUintValue(swapTotal) + memData.Swap.Total = metrics.OptUintWith(swapTotal) } swapFree, okSF := table["SwapFree"] if okSF { - memData.Swap.Free = metrics.NewUintValue(swapFree) + memData.Swap.Free = metrics.OptUintWith(swapFree) } if okSF && okST { - memData.Swap.Used.Bytes = metrics.NewUintValue(swapTotal - swapFree) + memData.Swap.Used.Bytes = metrics.OptUintWith(swapTotal - swapFree) } return memData, nil diff --git a/metricbeat/internal/metrics/memory/memory_openbsd.go b/metricbeat/internal/metrics/memory/memory_openbsd.go index ec10e0ba8ce..2eeac4f38e6 100644 --- a/metricbeat/internal/metrics/memory/memory_openbsd.go +++ b/metricbeat/internal/metrics/memory/memory_openbsd.go @@ -188,12 +188,12 @@ func get(_ string) (Memory, error) { return memData, errors.Errorf("Error in VFS_BCACHESTAT sysctl call, errno %d", errno) } - memData.Total = metrics.NewUintValue(uint64(uvmexp.npages) << uvmexp.pageshift) - memData.Used.Bytes = metrics.NewUintValue(uint64(uvmexp.npages-uvmexp.free) << uvmexp.pageshift) - memData.Free = metrics.NewUintValue(uint64(uvmexp.free) << uvmexp.pageshift) + memData.Total = metrics.OptUintWith(uint64(uvmexp.npages) << uvmexp.pageshift) + memData.Used.Bytes = metrics.OptUintWith(uint64(uvmexp.npages-uvmexp.free) << uvmexp.pageshift) + memData.Free = metrics.OptUintWith(uint64(uvmexp.free) << uvmexp.pageshift) - memData.Actual.Free = metrics.NewUintValue(memData.Free.ValueOrZero() + (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) - memData.Actual.Used.Bytes = metrics.NewUintValue(memData.Used.Bytes.ValueOrZero() - (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) + memData.Actual.Free = metrics.OptUintWith(memData.Free.ValueOr(0) + (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) + memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Used.Bytes.ValueOr(0) - (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) var err error memData.Swap, err = getSwap() @@ -222,12 +222,12 @@ func getSwap() (SwapMetrics, error) { for i := 0; i < int(nswap); i++ { if swdev[i].se_flags&C.SWF_ENABLE == 2 { - swapData.Used.Bytes = metrics.NewUintValue(swapData.Used.Bytes.ValueOrZero() + uint64(swdev[i].se_inuse/(1024/C.DEV_BSIZE))) - swapData.Total = metrics.NewUintValue(swapData.Total.ValueOrZero() + uint64(swdev[i].se_nblks/(1024/C.DEV_BSIZE))) + swapData.Used.Bytes = metrics.OptUintWith(swapData.Used.Bytes.ValueOr(0) + uint64(swdev[i].se_inuse/(1024/C.DEV_BSIZE))) + swapData.Total = metrics.OptUintWith(swapData.Total.ValueOr(0) + uint64(swdev[i].se_nblks/(1024/C.DEV_BSIZE))) } } - swapData.Free = metrics.NewUintValue(swapData.Total.ValueOrZero() - swapData.Used.Bytes.ValueOrZero()) + swapData.Free = metrics.OptUintWith(swapData.Total.ValueOr(0) - swapData.Used.Bytes.ValueOr(0)) return swapData, nil } diff --git a/metricbeat/internal/metrics/memory/memory_test.go b/metricbeat/internal/metrics/memory/memory_test.go index 1a5d54954ed..2a7e24534c2 100644 --- a/metricbeat/internal/metrics/memory/memory_test.go +++ b/metricbeat/internal/metrics/memory/memory_test.go @@ -35,11 +35,11 @@ func TestGetMemory(t *testing.T) { assert.NotNil(t, mem) assert.NoError(t, err) - assert.True(t, (mem.Total.ValueOrZero() > 0)) - assert.True(t, (mem.Used.Bytes.ValueOrZero() > 0)) - assert.True(t, (mem.Free.ValueOrZero() >= 0)) - assert.True(t, (mem.Actual.Free.ValueOrZero() >= 0)) - assert.True(t, (mem.Actual.Used.Bytes.ValueOrZero() > 0)) + assert.True(t, (mem.Total.ValueOr(0) > 0)) + assert.True(t, (mem.Used.Bytes.ValueOr(0) > 0)) + assert.True(t, (mem.Free.ValueOr(0) >= 0)) + assert.True(t, (mem.Actual.Free.ValueOr(0) >= 0)) + assert.True(t, (mem.Actual.Used.Bytes.ValueOr(0) > 0)) } func TestGetSwap(t *testing.T) { @@ -52,22 +52,22 @@ func TestGetSwap(t *testing.T) { assert.NotNil(t, mem) assert.NoError(t, err) - assert.True(t, (mem.Swap.Total.ValueOrZero() >= 0)) - assert.True(t, (mem.Swap.Used.Bytes.ValueOrZero() >= 0)) - assert.True(t, (mem.Swap.Free.ValueOrZero() >= 0)) + assert.True(t, (mem.Swap.Total.ValueOr(0) >= 0)) + assert.True(t, (mem.Swap.Used.Bytes.ValueOr(0) >= 0)) + assert.True(t, (mem.Swap.Free.ValueOr(0) >= 0)) } func TestMemPercentage(t *testing.T) { m := Memory{ - Total: metrics.NewUintValue(7), - Used: UsedMemStats{Bytes: metrics.NewUintValue(5)}, - Free: metrics.NewUintValue(2), + Total: metrics.OptUintWith(7), + Used: UsedMemStats{Bytes: metrics.OptUintWith(5)}, + Free: metrics.OptUintWith(2), } m.fillPercentages() assert.Equal(t, m.Used.Pct.ValueOrZero(), 0.7143) m = Memory{ - Total: metrics.NewUintValue(0), + Total: metrics.OptUintWith(0), } m.fillPercentages() assert.Equal(t, m.Used.Pct.ValueOrZero(), 0.0) @@ -75,10 +75,10 @@ func TestMemPercentage(t *testing.T) { func TestActualMemPercentage(t *testing.T) { m := Memory{ - Total: metrics.NewUintValue(7), + Total: metrics.OptUintWith(7), Actual: ActualMemoryMetrics{ - Used: UsedMemStats{Bytes: metrics.NewUintValue(5)}, - Free: metrics.NewUintValue(2), + Used: UsedMemStats{Bytes: metrics.OptUintWith(5)}, + Free: metrics.OptUintWith(2), }, } @@ -86,7 +86,7 @@ func TestActualMemPercentage(t *testing.T) { assert.Equal(t, m.Actual.Used.Pct.ValueOrZero(), 0.7143) m = Memory{ - Total: metrics.NewUintValue(0), + Total: metrics.OptUintWith(0), } m.fillPercentages() assert.Equal(t, m.Actual.Used.Pct.ValueOrZero(), 0.0) diff --git a/metricbeat/internal/metrics/memory/memory_windows.go b/metricbeat/internal/metrics/memory/memory_windows.go index 95365d26694..b19bf977091 100644 --- a/metricbeat/internal/metrics/memory/memory_windows.go +++ b/metricbeat/internal/metrics/memory/memory_windows.go @@ -33,19 +33,19 @@ func get(_ string) (Memory, error) { if err != nil { return memData, errors.Wrap(err, "Error fetching global memory status") } - memData.Total = metrics.NewUintValue(memoryStatusEx.TotalPhys) - memData.Free = metrics.NewUintValue(memoryStatusEx.AvailPhys) + memData.Total = metrics.OptUintWith(memoryStatusEx.TotalPhys) + memData.Free = metrics.OptUintWith(memoryStatusEx.AvailPhys) - memData.Used.Bytes = metrics.NewUintValue(memoryStatusEx.TotalPhys - memoryStatusEx.AvailPhys) + memData.Used.Bytes = metrics.OptUintWith(memoryStatusEx.TotalPhys - memoryStatusEx.AvailPhys) // We shouldn't really be doing this, but we also don't want to make breaking changes right now, // and memory.actual is used by quite a few visualizations memData.Actual.Free = memData.Free memData.Actual.Used.Bytes = memData.Used.Bytes - memData.Swap.Free = metrics.NewUintValue(memoryStatusEx.AvailPageFile) - memData.Swap.Total = metrics.NewUintValue(memoryStatusEx.TotalPageFile) - memData.Swap.Used.Bytes = metrics.NewUintValue(memoryStatusEx.TotalPageFile - memoryStatusEx.AvailPageFile) + memData.Swap.Free = metrics.OptUintWith(memoryStatusEx.AvailPageFile) + memData.Swap.Total = metrics.OptUintWith(memoryStatusEx.TotalPageFile) + memData.Swap.Used.Bytes = metrics.OptUintWith(memoryStatusEx.TotalPageFile - memoryStatusEx.AvailPageFile) return memData, nil } diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go index 1c9a9186697..da8017d6075 100644 --- a/metricbeat/internal/metrics/opt.go +++ b/metricbeat/internal/metrics/opt.go @@ -17,6 +17,8 @@ package metrics +// Uint + // OptUint is a wrapper for "optional" types, with the bool value indicating // if the stored int is a legitimate value. type OptUint struct { @@ -85,6 +87,8 @@ func SumOptUint(opts ...OptUint) uint64 { return sum } +// Float + // OptFloat is a wrapper for "optional" types, with the bool value indicating // if the stored int is a legitimate value. type OptFloat struct { @@ -100,8 +104,8 @@ func NewFloatNone() OptFloat { } } -// NewFloatValue returns a new uint wrapper for the specified value -func NewFloatValue(f float64) OptFloat { +// OptFloatWith returns a new uint wrapper for the specified value +func OptFloatWith(f float64) OptFloat { return OptFloat{ exists: true, value: f, From cd760cbe5ce49245a88108c800806fb2ce381c67 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 15 Jun 2021 11:52:56 -0700 Subject: [PATCH 12/24] cleanup metricset code --- metricbeat/internal/metrics/opt.go | 5 +++++ metricbeat/module/system/memory/helper_other.go | 1 + metricbeat/module/system/memory/memory.go | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go index da8017d6075..c54b56debbe 100644 --- a/metricbeat/internal/metrics/opt.go +++ b/metricbeat/internal/metrics/opt.go @@ -117,6 +117,11 @@ func (opt OptFloat) Exists() bool { return opt.exists } +// IsZero returns true if the underlying value nil +func (opt OptFloat) IsZero() bool { + return !opt.exists +} + // ValueOrZero returns the stored value, or zero // Please do not use this for populating reported data, // as we actually want to avoid sending zeros where values are functionally null diff --git a/metricbeat/module/system/memory/helper_other.go b/metricbeat/module/system/memory/helper_other.go index a1a30ba1868..adbeba59aa6 100644 --- a/metricbeat/module/system/memory/helper_other.go +++ b/metricbeat/module/system/memory/helper_other.go @@ -28,6 +28,7 @@ import ( // These whole helper files are a shim until we can make breaking changes and remove these // data enrichers from the metricset, as they're linux-only. +// DEPRECATE: 8.0 func fetchLinuxMemStats(baseMap common.MapStr) error { return errors.New("MemStats is only available on Linux") } diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 1a3a583ce6e..c8b71a136e6 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -24,7 +24,6 @@ import ( "runtime" "github.com/pkg/errors" - //"github.com/rcrowley/go-metrics" metrics "github.com/elastic/beats/v7/metricbeat/internal/metrics/memory" "github.com/elastic/beats/v7/metricbeat/mb" From 7c93b60560ddaae5a8faeab2611fa570a65e421c Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 15 Jun 2021 17:53:59 -0700 Subject: [PATCH 13/24] fix up folder methods --- metricbeat/internal/metrics/fold.go | 67 ++----------------- metricbeat/internal/metrics/memory/memory.go | 31 +++++---- .../module/system/memory/_meta/data.json | 16 ++--- 3 files changed, 30 insertions(+), 84 deletions(-) diff --git a/metricbeat/internal/metrics/fold.go b/metricbeat/internal/metrics/fold.go index 971e78ecbe3..b039af5af10 100644 --- a/metricbeat/internal/metrics/fold.go +++ b/metricbeat/internal/metrics/fold.go @@ -19,18 +19,10 @@ package metrics import ( "github.com/elastic/go-structform" - "github.com/elastic/go-structform/gotype" ) -// OptUintUnfolder is the stateful contain for the unfolder -type OptUintUnfolder struct { - gotype.BaseUnfoldState - to *OptUint -} - -// FoldOptUint is a helper for structform's Fold() function -// pass this to gotype.NewIterator -func FoldOptUint(in *OptUint, v structform.ExtVisitor) error { +// Fold implements the folder interface for OptUint +func (in *OptUint) Fold(v structform.ExtVisitor) error { if in.exists == true { value := in.value v.OnUint64(value) @@ -40,31 +32,8 @@ func FoldOptUint(in *OptUint, v structform.ExtVisitor) error { return nil } -// UnfoldOptUint is a helper function for structform's Fold() function -// Pass this to gotype.NewIterator -func UnfoldOptUint(to *OptUint) gotype.UnfoldState { - return &OptUintUnfolder{to: to} -} - -// OnUint64 Folds Uint64 values -func (u *OptUintUnfolder) OnUint64(ctx gotype.UnfoldCtx, in uint64) error { - defer ctx.Done() - u.to = &OptUint{exists: true, value: in} - - return nil -} - -// OnNil Folds nil values -func (u *OptUintUnfolder) OnNil(ctx gotype.UnfoldCtx) error { - defer ctx.Done() - u.to = &OptUint{exists: false, value: 0} - - return nil -} - -// FoldOptFloat is a helper for structform's Fold() function -// pass this to gotype.NewIterator -func FoldOptFloat(in *OptFloat, v structform.ExtVisitor) error { +// Fold implements the folder interface for OptUint +func (in *OptFloat) Fold(v structform.ExtVisitor) error { if in.exists == true { value := in.value v.OnFloat64(value) @@ -73,31 +42,3 @@ func FoldOptFloat(in *OptFloat, v structform.ExtVisitor) error { } return nil } - -// OptFloatUnfolder is the stateful contain for the unfolder -type OptFloatUnfolder struct { - gotype.BaseUnfoldState - to *OptFloat -} - -// UnfoldOptFloat is a helper function for structform's Fold() function -// Pass this to gotype.NewIterator -func UnfoldOptFloat(to *OptFloat) gotype.UnfoldState { - return &OptFloatUnfolder{to: to} -} - -// OnFloat64 Folds Uint64 values -func (u *OptFloatUnfolder) OnFloat64(ctx gotype.UnfoldCtx, in float64) error { - defer ctx.Done() - u.to = &OptFloat{exists: true, value: in} - - return nil -} - -// OnNil Folds nil values -func (u *OptFloatUnfolder) OnNil(ctx gotype.UnfoldCtx) error { - defer ctx.Done() - u.to = &OptFloat{exists: false, value: 0} - - return nil -} diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 7a194c48cae..55d91c4cb4c 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -75,6 +75,16 @@ func Get(procfs string) (Memory, error) { return base, nil } +// IsZero implements the zeroer interface for structform's folders +func (used UsedMemStats) IsZero() bool { + return used.Pct.IsZero() && used.Bytes.IsZero() +} + +// IsZero implements the zeroer interface for structform's folders +func (swap SwapMetrics) IsZero() bool { + return swap.Free.IsZero() && swap.Used.IsZero() && swap.Total.IsZero() +} + func (base *Memory) fillPercentages() { // Add percentages // In theory, `Used` and `Total` are available everywhere, so assume values are good. @@ -95,24 +105,19 @@ func (base *Memory) fillPercentages() { // Format returns a formatted MapStr ready to be sent upstream func (mem Memory) Format() (common.MapStr, error) { to := common.MapStr{} - unfold, err := gotype.NewUnfolder(nil, gotype.Unfolders( - metrics.UnfoldOptUint, - metrics.UnfoldOptFloat, - )) + + unfold, err := gotype.NewUnfolder(&to) if err != nil { - return nil, errors.Wrap(err, "error creating Folder") + return nil, errors.Wrap(err, "error creating Unfolder") } - fold, err := gotype.NewIterator(unfold, gotype.Folders( - metrics.FoldOptFloat, - metrics.FoldOptUint, - )) + fold, err := gotype.NewIterator(unfold) if err != nil { - return nil, errors.Wrap(err, "error creating unfolder") + return nil, errors.Wrap(err, "error creating Iterator") } - unfold.SetTarget(&to) - if err := fold.Fold(mem); err != nil { - return nil, errors.Wrap(err, "error folding memory structure") + err = fold.Fold(mem) + if err != nil { + return nil, errors.Wrap(err, "error folding Memory") } return to, nil diff --git a/metricbeat/module/system/memory/_meta/data.json b/metricbeat/module/system/memory/_meta/data.json index 4e311464f2a..ce7da4541cf 100644 --- a/metricbeat/module/system/memory/_meta/data.json +++ b/metricbeat/module/system/memory/_meta/data.json @@ -15,14 +15,14 @@ "system": { "memory": { "actual": { - "free": 43083005952, + "free": 46533455872, "used": { - "bytes": 24431808512, - "pct": 0.3619 + "bytes": 20981358592, + "pct": 0.3108 } }, - "cached": 38601846784, - "free": 4047224832, + "cached": 42114609152, + "free": 3916599296, "hugepages": { "default_size": 2097152, "free": 0, @@ -48,7 +48,7 @@ "pct": 0.7105 }, "pgfree": { - "pages": 55427784553 + "pages": 69780946234 }, "pgscan_direct": { "pages": 1512375 @@ -83,8 +83,8 @@ }, "total": 67514814464, "used": { - "bytes": 63467589632, - "pct": 0.9401 + "bytes": 63598215168, + "pct": 0.942 } } } From 5b28daa980a69ff00a735bdbcfc0483480e61dcc Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 16 Jun 2021 11:45:47 -0700 Subject: [PATCH 14/24] fix calculations, Opt API, gomod --- go.mod | 2 +- metricbeat/internal/metrics/fold.go | 44 -------------- metricbeat/internal/metrics/memory/memory.go | 24 +------- .../internal/metrics/memory/memory_aix.go | 11 ++-- .../internal/metrics/memory/memory_darwin.go | 2 +- .../internal/metrics/memory/memory_freebsd.go | 14 +++-- .../internal/metrics/memory/memory_openbsd.go | 11 ++-- metricbeat/internal/metrics/opt.go | 58 +++++++++++-------- metricbeat/module/system/memory/memory.go | 13 +++-- 9 files changed, 68 insertions(+), 111 deletions(-) delete mode 100644 metricbeat/internal/metrics/fold.go diff --git a/go.mod b/go.mod index ae8b2b854f0..d2493475708 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/elastic/go-sysinfo v1.7.0 github.com/elastic/go-txfile v0.0.7 github.com/elastic/go-ucfg v0.8.3 - github.com/elastic/go-windows v1.0.1 // indirect + github.com/elastic/go-windows v1.0.1 github.com/elastic/gosigar v0.14.1 github.com/fatih/color v1.9.0 github.com/fsnotify/fsevents v0.1.1 diff --git a/metricbeat/internal/metrics/fold.go b/metricbeat/internal/metrics/fold.go deleted file mode 100644 index b039af5af10..00000000000 --- a/metricbeat/internal/metrics/fold.go +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package metrics - -import ( - "github.com/elastic/go-structform" -) - -// Fold implements the folder interface for OptUint -func (in *OptUint) Fold(v structform.ExtVisitor) error { - if in.exists == true { - value := in.value - v.OnUint64(value) - } else { - v.OnNil() - } - return nil -} - -// Fold implements the folder interface for OptUint -func (in *OptFloat) Fold(v structform.ExtVisitor) error { - if in.exists == true { - value := in.value - v.OnFloat64(value) - } else { - v.OnNil() - } - return nil -} diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 55d91c4cb4c..45572f5378f 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -22,7 +22,6 @@ import ( "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/metricbeat/internal/metrics" - "github.com/elastic/go-structform/gotype" ) // Memory holds os-specifc memory usage data @@ -89,7 +88,7 @@ func (base *Memory) fillPercentages() { // Add percentages // In theory, `Used` and `Total` are available everywhere, so assume values are good. if base.Total.ValueOr(0) != 0 { - percUsed := float64(base.Used.Bytes.ValueOr(0)) / float64(base.Total.ValueOr(0)) + percUsed := float64(base.Used.Bytes.ValueOr(0)) / float64(base.Total.ValueOr(1)) base.Used.Pct = metrics.OptFloatWith(common.Round(percUsed, common.DefaultDecimalPlacesCount)) actualPercUsed := float64(base.Actual.Used.Bytes.ValueOr(0)) / float64(base.Total.ValueOr(0)) @@ -101,24 +100,3 @@ func (base *Memory) fillPercentages() { base.Swap.Used.Pct = metrics.OptFloatWith(common.Round(perc, common.DefaultDecimalPlacesCount)) } } - -// Format returns a formatted MapStr ready to be sent upstream -func (mem Memory) Format() (common.MapStr, error) { - to := common.MapStr{} - - unfold, err := gotype.NewUnfolder(&to) - if err != nil { - return nil, errors.Wrap(err, "error creating Unfolder") - } - fold, err := gotype.NewIterator(unfold) - if err != nil { - return nil, errors.Wrap(err, "error creating Iterator") - } - - err = fold.Fold(mem) - if err != nil { - return nil, errors.Wrap(err, "error folding Memory") - } - - return to, nil -} diff --git a/metricbeat/internal/metrics/memory/memory_aix.go b/metricbeat/internal/metrics/memory/memory_aix.go index 58c9dbee8d8..e936c518479 100644 --- a/metricbeat/internal/metrics/memory/memory_aix.go +++ b/metricbeat/internal/metrics/memory/memory_aix.go @@ -59,13 +59,16 @@ func get(_ string) (Memory, error) { return memData, fmt.Errorf("perfstat_memory_total: %s", err) } - memData.Total = metrics.OptUintWith(uint64(meminfo.real_total) * system.pagesize) - memData.Free = metrics.OptUintWith(uint64(meminfo.real_free) * system.pagesize) + totalMem := uint64(meminfo.real_total) * system.pagesize + freeMem := uint64(meminfo.real_free) * system.pagesize + + memData.Total = metrics.OptUintWith(totalMem) + memData.Free = metrics.OptUintWith(freeMem) kern := uint64(meminfo.numperm) * system.pagesize // number of pages in file cache - memData.Used.Bytes = metrics.OptUintWith(memData.Total.ValueOr(0) - memData.Free.ValueOr(0)) - memData.Actual.Free = metrics.OptUintWith(memData.Free.ValueOr(0) + kern) + memData.Used.Bytes = metrics.OptUintWith(totalMem - freeMem) + memData.Actual.Free = metrics.OptUintWith(freeMem + kern) memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Used.Bytes.ValueOr(0) - kern) return memData, nil diff --git a/metricbeat/internal/metrics/memory/memory_darwin.go b/metricbeat/internal/metrics/memory/memory_darwin.go index c6eda23d8cb..7f9d08e0a8c 100644 --- a/metricbeat/internal/metrics/memory/memory_darwin.go +++ b/metricbeat/internal/metrics/memory/memory_darwin.go @@ -70,7 +70,7 @@ func get(_ string) (Memory, error) { mem.Used.Bytes = metrics.OptUintWith(total - free) mem.Actual.Free = metrics.OptUintWith(free + kern) - mem.Actual.Used.Bytes = metrics.OptUintWith(mem.Used.Bytes.ValueOr(0) - kern) + mem.Actual.Used.Bytes = metrics.OptUintWith((total - free) - kern) var err error mem.Swap, err = getSwap() diff --git a/metricbeat/internal/metrics/memory/memory_freebsd.go b/metricbeat/internal/metrics/memory/memory_freebsd.go index 06e2ea57a6d..13c1ebb0748 100644 --- a/metricbeat/internal/metrics/memory/memory_freebsd.go +++ b/metricbeat/internal/metrics/memory/memory_freebsd.go @@ -66,7 +66,9 @@ func get(_ string) (Memory, error) { if err != nil { return memData, errors.Errorf("error in vm.stats.vm.v_free_count") } - memData.Free = metrics.OptUintWith(uint64(val) * pagesize) + + memFree := uint64(val) * pagesize + memData.Free = metrics.OptUintWith(memFree) name = C.CString("vm.stats.vm.v_inactive_count") _, err = C.sysctlbyname(name, unsafe.Pointer(&val), &sc, nil, 0) @@ -76,11 +78,13 @@ func get(_ string) (Memory, error) { } kern := uint64(val) - memData.Total = metrics.OptUintWith(uint64(pagecount * pagesize)) + memTotal := uint64(pagecount * pagesize) + + memData.Total = metrics.OptUintWith(memTotal) - memData.Used.Bytes = metrics.OptUintWith(memData.Total.ValueOr(0) - memData.Free.ValueOr(0)) - memData.Actual.Free = metrics.OptUintWith(memData.Free.ValueOr(0) + (kern * pagesize)) - memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Used.Bytes.ValueOr(0) - (kern * pagesize)) + memData.Used.Bytes = metrics.OptUintWith(memTotal - memFree) + memData.Actual.Free = metrics.OptUintWith(memFree + (kern * pagesize)) + memData.Actual.Used.Bytes = metrics.OptUintWith((memTotal - memFree) - (kern * pagesize)) return memData, nil } diff --git a/metricbeat/internal/metrics/memory/memory_openbsd.go b/metricbeat/internal/metrics/memory/memory_openbsd.go index 2eeac4f38e6..51e6ef830e3 100644 --- a/metricbeat/internal/metrics/memory/memory_openbsd.go +++ b/metricbeat/internal/metrics/memory/memory_openbsd.go @@ -188,12 +188,15 @@ func get(_ string) (Memory, error) { return memData, errors.Errorf("Error in VFS_BCACHESTAT sysctl call, errno %d", errno) } + memFree := uint64(uvmexp.free) << uvmexp.pageshift + memUsed := uint64(uvmexp.npages-uvmexp.free) << uvmexp.pageshift + memData.Total = metrics.OptUintWith(uint64(uvmexp.npages) << uvmexp.pageshift) - memData.Used.Bytes = metrics.OptUintWith(uint64(uvmexp.npages-uvmexp.free) << uvmexp.pageshift) - memData.Free = metrics.OptUintWith(uint64(uvmexp.free) << uvmexp.pageshift) + memData.Used.Bytes = metrics.OptUintWith(memUsed) + memData.Free = metrics.OptUintWith(memFree) - memData.Actual.Free = metrics.OptUintWith(memData.Free.ValueOr(0) + (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) - memData.Actual.Used.Bytes = metrics.OptUintWith(memData.Used.Bytes.ValueOr(0) - (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) + memData.Actual.Free = metrics.OptUintWith(memFree + (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) + memData.Actual.Used.Bytes = metrics.OptUintWith(memUsed - (uint64(bcachestats.numbufpages) << uvmexp.pageshift)) var err error memData.Swap, err = getSwap() diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go index c54b56debbe..b9dfdf751d8 100644 --- a/metricbeat/internal/metrics/opt.go +++ b/metricbeat/internal/metrics/opt.go @@ -17,6 +17,8 @@ package metrics +import "github.com/elastic/go-structform" + // Uint // OptUint is a wrapper for "optional" types, with the bool value indicating @@ -42,32 +44,16 @@ func OptUintWith(i uint64) OptUint { } } -// None marks the Uint as not having a value. -func (opt *OptUint) None() { - opt.exists = false +// IsZero returns true if the underlying value nil +func (opt OptUint) IsZero() bool { + return !opt.exists } -// Exists returns true if the underlying value is valid +// Exists returns true if the underlying value exists func (opt OptUint) Exists() bool { return opt.exists } -// IsNone returns true if the value exists -func (opt OptUint) IsNone(i uint64) { - opt.value = i - opt.exists = true -} - -// Value returns true if the value exists -func (opt OptUint) Value() (uint64, bool) { - return opt.value, opt.exists -} - -// IsZero returns true if the underlying value nil -func (opt OptUint) IsZero() bool { - return !opt.exists -} - // ValueOr returns the stored value, or a given int // Please do not use this for populating reported data, // as we actually want to avoid sending zeros where values are functionally null @@ -87,6 +73,17 @@ func SumOptUint(opts ...OptUint) uint64 { return sum } +// Fold implements the folder interface for OptUint +func (in *OptUint) Fold(v structform.ExtVisitor) error { + if in.exists == true { + value := in.value + v.OnUint64(value) + } else { + v.OnNil() + } + return nil +} + // Float // OptFloat is a wrapper for "optional" types, with the bool value indicating @@ -112,16 +109,16 @@ func OptFloatWith(f float64) OptFloat { } } -// Exists returns true if the underlying value is valid -func (opt OptFloat) Exists() bool { - return opt.exists -} - // IsZero returns true if the underlying value nil func (opt OptFloat) IsZero() bool { return !opt.exists } +// Exists returns true if the underlying value exists +func (opt OptFloat) Exists() bool { + return opt.exists +} + // ValueOrZero returns the stored value, or zero // Please do not use this for populating reported data, // as we actually want to avoid sending zeros where values are functionally null @@ -131,3 +128,14 @@ func (opt OptFloat) ValueOrZero() float64 { } return 0 } + +// Fold implements the folder interface for OptUint +func (in *OptFloat) Fold(v structform.ExtVisitor) error { + if in.exists == true { + value := in.value + v.OnFloat64(value) + } else { + v.OnNil() + } + return nil +} diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index c8b71a136e6..9cd042ba9e5 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -25,6 +25,8 @@ import ( "github.com/pkg/errors" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/transform/typeconv" metrics "github.com/elastic/beats/v7/metricbeat/internal/metrics/memory" "github.com/elastic/beats/v7/metricbeat/mb" "github.com/elastic/beats/v7/metricbeat/mb/parse" @@ -63,10 +65,13 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { return errors.Wrap(err, "error fetching memory metrics") } - memory, err := eventRaw.Format() - if err != nil { - return errors.Wrap(err, "error formatting base memory events") - } + // memory, err := eventRaw.Format() + // if err != nil { + // return errors.Wrap(err, "error formatting base memory events") + // } + + memory := common.MapStr{} + err = typeconv.Convert(&memory, &eventRaw) // for backwards compatibility, only report if we're not in fleet mode // This is entirely linux-specific data that should live in linux/memory. From a517ecbdfc4dbdc72b905e8ce3a363d21fea2cd7 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 16 Jun 2021 20:25:21 -0700 Subject: [PATCH 15/24] make notice --- NOTICE.txt | 424 ++++++++++++++++++++++++++--------------------------- go.sum | 85 +++++++++++ 2 files changed, 297 insertions(+), 212 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index c05d9163211..c55af562179 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -8539,6 +8539,218 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-ucfg@v0.8.3/ limitations under the License. +-------------------------------------------------------------------------------- +Dependency : github.com/elastic/go-windows +Version: v1.0.1 +Licence type (autodetected): Apache-2.0 +-------------------------------------------------------------------------------- + +Contents of probable licence file $GOMODCACHE/github.com/elastic/go-windows@v1.0.1/LICENSE.txt: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + -------------------------------------------------------------------------------- Dependency : github.com/elastic/gosigar Version: v0.14.1 @@ -27056,218 +27268,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------- -Dependency : github.com/elastic/go-windows -Version: v1.0.1 -Licence type (autodetected): Apache-2.0 --------------------------------------------------------------------------------- - -Contents of probable licence file $GOMODCACHE/github.com/elastic/go-windows@v1.0.1/LICENSE.txt: - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -------------------------------------------------------------------------------- Dependency : github.com/elazarl/goproxy Version: v0.0.0-20180725130230-947c36da3153 diff --git a/go.sum b/go.sum index 11d70882dd4..3d2a1cb6820 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,7 @@ 4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE= 4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b h1:+TO4EgK74+Qo/ilRDiF2WpY09Jk9VSJSLe3wEn+dJBw= 4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b/go.mod h1:SHGqVdL7hd2ZaX2T9uEiOZ/OFAUfCCLURdLPJsd8ZNs= +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 h1:SC+c6A1qTFstO9qmB86mPV2IpYme/2ZoEQ0hrP+wo+Q= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -28,6 +29,7 @@ code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTg code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-amqp-common-go/v3 v3.0.0 h1:j9tjcwhypb/jek3raNrwlCIl7iKQYOug7CLpSyBBodc= github.com/Azure/azure-amqp-common-go/v3 v3.0.0/go.mod h1:SY08giD/XbhTz07tJdpw1SoxQXHPN30+DI3Z04SYqyg= @@ -76,6 +78,7 @@ github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VY github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -83,10 +86,13 @@ github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITg github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0 h1:0GoNN3taZV6QI81IXgCbxMyEaJDXMSIjArYBCYzVVvs= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2 h1:JCHLVE3B+kJde7bIEo5N4J+ZbLhp0J1Fs+ulyRws4gE= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -101,13 +107,16 @@ github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc/g github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20 h1:7rj9qZ63knnVo2ZeepYHvHuRdG76f3tRUTdIQDzRBeI= github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20/go.mod h1:cI59GRkC2FRaFYtgbYEqMlgnnfvAwXzjojyZKXwklNg= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 h1:WFwa9pqou0Nb4DdfBOyaBTH0GqLE74Qwdf61E7ITHwQ= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43/go.mod h1:tJPYQG4mnMeUtQvQKNkbsFrnmZOg59Qnf8CcctFv5v4= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antlr/antlr4 v0.0.0-20200820155224-be881fa6b91d h1:OE3kzLBpy7pOJEzE55j9sdgrSilUPzzj++FWvp1cmIs= github.com/antlr/antlr4 v0.0.0-20200820155224-be881fa6b91d/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= @@ -115,6 +124,7 @@ github.com/apache/thrift v0.13.1-0.20200603211036-eac4d0c79a5f h1:33BV5v3u8I6dA2 github.com/apache/thrift v0.13.1-0.20200603211036-eac4d0c79a5f/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 h1:afT88tB6u9JCKQZVAAaa9ICz/uGn5Uw9ekn6P22mYKM= github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:bXvGk6IkT1Agy7qzJ+DjIw/SJ1AaB3AvAuMDVV+Vkoo= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -124,6 +134,7 @@ github.com/aws/aws-lambda-go v1.6.0 h1:T+u/g79zPKw1oJM7xYhvpq7i4Sjc0iVsXZUaqRVVS github.com/aws/aws-lambda-go v1.6.0/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A= github.com/aws/aws-sdk-go-v2 v0.9.0 h1:dWtJKGRFv3UZkMBQaIzMsF0/y4ge3iQPWTzeC4r/vl4= github.com/aws/aws-sdk-go-v2 v0.9.0/go.mod h1:sa1GePZ/LfBGI4dSq30f6uR4Tthll8axxtEPvlpXZ8U= +github.com/awslabs/goformation/v3 v3.1.0 h1:1WhWJrMtuwphJ+x1+0wM7v4QPDzcArvX+i4/sK1Z4e4= github.com/awslabs/goformation/v3 v3.1.0/go.mod h1:hQ5RXo3GNm2laHWKizDzU5DsDy+yNcenSca2UxN0850= github.com/awslabs/goformation/v4 v4.1.0 h1:JRxIW0IjhYpYDrIZOTJGMu2azXKI+OK5dP56ubpywGU= github.com/awslabs/goformation/v4 v4.1.0/go.mod h1:MBDN7u1lMNDoehbFuO4uPvgwPeolTMA2TzX1yO6KlxI= @@ -137,6 +148,7 @@ github.com/blakerouse/service v1.1.1-0.20200924160513-057808572ffa h1:aXHPZwx8Y5 github.com/blakerouse/service v1.1.1-0.20200924160513-057808572ffa/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc= github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI= github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= +github.com/blang/semver v3.1.0+incompatible h1:7hqmJYuaEK3qwVjWubYiht3j93YI0WQBuysxHIfUriU= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible h1:4g18+HnTDwEtO0n7K8B1Kjq+04MEKJRkhJNQ/hb9d5A= github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= @@ -144,14 +156,19 @@ github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e h1:YYUjy5BRwO5 github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e/go.mod h1:V284PjgVwSk4ETmz84rpu9ehpGg7swlIH8npP9k2bGw= github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e h1:Gbx+iVCXG/1m5WSnidDGuHgN+vbIwl+6fR092ANU+Y8= github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e/go.mod h1:AZIh1CCnMrcVm6afFf96PBvE2MRpWFco91z8ObJtgDY= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f h1:fK3ikA1s77arBhpDwFuyO0hUZ2Aa8O6o2Uzy8Q6iLbs= github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f/go.mod h1:RtIewdO+K/czvxvIFCMbPyx7jdxSLL1RZ+DA/Vk8Lwg= @@ -159,10 +176,13 @@ github.com/cloudfoundry/noaa v2.1.0+incompatible h1:hr6VnM5VlYRN3YD+NmAedQLW8686 github.com/cloudfoundry/noaa v2.1.0+incompatible/go.mod h1:5LmacnptvxzrTvMfL9+EJhgkUfIgcwI61BVSTh47ECo= github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 h1:cWfya7mo/zbnwYVio6eWGsFJHqYw4/k/uhwIJ1eqRPI= github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 h1:uict5mhHFTzKLUCufdSLym7z/J0CbBJT59lYbP9wtbg= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.3 h1:LoIzb5y9x5l8VKAlyrbusNPXqBY0+kviRloxFUMFwKc= @@ -173,11 +193,17 @@ github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 h1:esQOJREg8nw8aXj6uCN5dfW5cKUBiEJ/+nni1Q/D/sw= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de h1:dlfGmNcE3jDAecLqwKPMNX6nk2qh1c1Vg1/YTzpOOF4= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -185,7 +211,9 @@ github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQa github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/godog v0.8.1 h1:lVb+X41I4YDreE+ibZ50bdXmySxgRviYFgKY6Aw4XE8= github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= @@ -229,6 +257,7 @@ github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 h1:BzN9o4IS1Hj+AM5qDggsfMDQGFXau5KagipEFmnyIbc= github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5/go.mod h1:cxc20xI7fOgsFHWgt+PenlDDnMcrvh7Ocuj5hEFIdEk= @@ -288,10 +317,13 @@ github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877 h1:C9LsbipColsz0 github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -302,7 +334,9 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/frankban/quicktest v1.10.2 h1:19ARM85nVi4xH7xPXuc5eM/udya5ieh7b/Sv+d844Tk= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72 h1:b+9H1GAsx5RsjvDFLoS5zkNBzIQMuVKUYQDmxU3N5XE= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= @@ -317,15 +351,20 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iauee github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647 h1:whypLownH338a3Ork2w9t0KUKtVxbXYySuz7V1YGsJo= github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1 h1:wSt/4CYxs70xbATrGXhokKF1i0tZjENLOo1ioIO13zk= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9 h1:tF+augKRWlWx0J0B7ZyyKSiTyV6E1zZe+7b3qQlcEf8= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501 h1:C1JKChikHGpXwT5UQDFaryIpDtyyGL/CR6C2kB7F1oc= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87 h1:zP3nY8Tk2E6RTkqGYrarZXuzh+ffyLDljLxCy1iJw80= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= @@ -350,12 +389,14 @@ github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -375,6 +416,7 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gomodule/redigo v1.8.3 h1:HR0kYDX2RJZvAup8CsiJwxB4dTCSC0AaUq6S4SiLwUc= github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9 h1:b4EyQBj8pgtcWOr7YCSxK6NUQzJr0n4hxJ3mc+dtKk4= github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -394,7 +436,9 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc h1:DLpL8pWq0v4JYoRpEhDfsJhhJyGKCcQM2WPW2TJs31c= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -414,6 +458,7 @@ github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.13.0 h1:sBDQoHXrOlfPobnKw69FIKa1wg9qsLLvvQ/Y19WtFgI= github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= @@ -443,6 +488,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/nomad/api v0.0.0-20201203164818-6318a8ac7bf8 h1:Yrz9yGVJf5Ce2KS7x8hS/MUTIeBmGEhF8nhzolRpSqY= github.com/hashicorp/nomad/api v0.0.0-20201203164818-6318a8ac7bf8/go.mod h1:vYHP9jMXk4/T2qNUbWlQ1OHCA1hHLil3nvqSmz8mtgc= @@ -450,6 +496,7 @@ github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 h1:S4qyfL2sEm5Budr4 github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= @@ -460,6 +507,7 @@ github.com/jarcoal/httpmock v1.0.4 h1:jp+dy/+nonJE4g4xbVtl9QdrUNbn6/3hDT5R4nDIZn github.com/jarcoal/httpmock v1.0.4/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -486,11 +534,14 @@ github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfE github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/karrick/godirwalk v1.15.6 h1:Yf2mmR8TJy+8Fa0SuQVto5SYap6IF7lNVX4Jdl8G1qA= github.com/karrick/godirwalk v1.15.6/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0 h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.0 h1:wJbzvpYMVGG9iTI9VxpnNZfd4DzMPoCWze3GgSqz8yg= github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -505,6 +556,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -515,6 +567,7 @@ github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01/go.mod h1:5WUZQaWbwv1U+lT github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.11.0 h1:C/55Ywp9BpgVVclD3lRnSYCwXTYxmSppIgLeDYlNuls= github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= @@ -561,8 +614,11 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d h1:7PxY7LVfSZm7PEeBTyK1rj1gABdCO2mbri6GKO1cMDs= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -590,18 +646,23 @@ github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5X github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU4LguQVtc= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1 h1:wY4pOY8fBdSIvs9+IDHC55thBuEulhzfSgKeC1yFvzQ= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso= github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -639,8 +700,11 @@ github.com/prometheus/prometheus v2.5.0+incompatible h1:7QPitgO2kOFG8ecuRn9O/4L9 github.com/prometheus/prometheus v2.5.0+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e h1:hUGyBE/4CXRPThr4b6kt+f1CN90no4Fs5CNrYOKYSIg= github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e/go.mod h1:Sb6li54lXV0yYEjI4wX8cucdQ9gqUJV3+Ngg3l9g30I= @@ -675,17 +739,21 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -700,6 +768,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 h1:zLV6q4e8Jv9EHjNg/iHfzwDkCve6Ua5jCygptrtXHvI= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b h1:X/8hkb4rQq3+QuOxpJK7gWmAXmZucF0EI1s1BfBLq6U= github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b/go.mod h1:jAqhj/JBVC1PwcLTWd6rjQyGyItxxrhpiBl8LSuAGmw= @@ -710,6 +779,7 @@ github.com/ugorji/go v1.1.8/go.mod h1:0lNM99SwWUIRhCXnigEMClngXBk/EmpTXa7mgiewYW github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.8 h1:4dryPvxMP9OtkjIbuNeK2nb27M38XMHLGlfNSNph/5s= github.com/ugorji/go/codec v1.1.8/go.mod h1:X00B19HDtwvKbQY2DcYjvZxKQp8mzrJoQ6EgoIY/D2E= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 h1:MCfT24H3f//U5+UCrZp1/riVO3B50BovxtDiNn0XKkk= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 h1:OHNw/6pXODJAB32NujjdQO/KIYQ3KAbHQfCzH81XdCs= github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797/go.mod h1:pNWFTeQ+V1OYT/TzWpnWb6eQBdoXpdx+H+lrH97/Oyo= @@ -721,6 +791,7 @@ github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4 h1:hhA8EBThzz9PztawVTyc github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4/go.mod h1:RspW+E2Yb7Fs7HclB2tiDaiu6Rp41BiIG4Wo1YaoXGc= github.com/urso/sderr v0.0.0-20200210124243-c2a16f3d43ec h1:HkZIDJrMKZHPsYhmH2XjTTSk1pbMCFfpxSnyzZUFm+k= github.com/urso/sderr v0.0.0-20200210124243-c2a16f3d43ec/go.mod h1:Wp40HwmjM59FkDIVFfcCb9LzBbnc0XAMp8++hJuWvSU= +github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02dE= github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g= github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41 h1:NeNpIvfvaFOh0BH7nMEljE5Rk/VJlxhm58M41SeOD20= github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= @@ -729,10 +800,14 @@ github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhe github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56 h1:yhqBHs09SmmUoNOHc9jgK4a60T3XFRtPAkYxVnqgY50= github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7 h1:0gYLpmzecnaDCoeWxSfEJ7J1b6B/67+NV++4HKQXx+Y= github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= @@ -785,6 +860,7 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -797,6 +873,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367 h1:0IiAsCRByjO2QjX7ZPkw5oU9x+n1YqRL802rjC0c3Aw= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -884,6 +961,7 @@ golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210308170721-88b6017d0656 h1:FuBaiPCiXkq4v+JY5JEGPU/HwEZwpVyDbu/KBz9fU+4= golang.org/x/sys v0.0.0-20210308170721-88b6017d0656/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -950,7 +1028,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -958,9 +1038,11 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1009,15 +1091,18 @@ k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac h1:sAvhNk5RRuc6FNYGqe7Ygz3PSo/2wGWbulskmzRX8Vs= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From dd6a0e10ecb75e6a4957f2763addd8498021885b Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Thu, 17 Jun 2021 12:50:10 -0700 Subject: [PATCH 16/24] go mod tidy, mage fmt --- go.sum | 85 ------------------- .../osquerybeat/beater/config_plugin_test.go | 3 +- x-pack/osquerybeat/beater/logger_plugin.go | 3 +- .../osquerybeat/beater/logger_plugin_test.go | 3 +- x-pack/osquerybeat/internal/osqd/osqueryd.go | 3 +- .../internal/osqd/osqueryd_windows.go | 3 +- x-pack/osquerybeat/internal/osqdcli/client.go | 3 +- 7 files changed, 12 insertions(+), 91 deletions(-) diff --git a/go.sum b/go.sum index 3d2a1cb6820..11d70882dd4 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,6 @@ 4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE= 4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b h1:+TO4EgK74+Qo/ilRDiF2WpY09Jk9VSJSLe3wEn+dJBw= 4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b/go.mod h1:SHGqVdL7hd2ZaX2T9uEiOZ/OFAUfCCLURdLPJsd8ZNs= -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 h1:SC+c6A1qTFstO9qmB86mPV2IpYme/2ZoEQ0hrP+wo+Q= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -29,7 +28,6 @@ code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTg code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-amqp-common-go/v3 v3.0.0 h1:j9tjcwhypb/jek3raNrwlCIl7iKQYOug7CLpSyBBodc= github.com/Azure/azure-amqp-common-go/v3 v3.0.0/go.mod h1:SY08giD/XbhTz07tJdpw1SoxQXHPN30+DI3Z04SYqyg= @@ -78,7 +76,6 @@ github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VY github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -86,13 +83,10 @@ github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITg github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0 h1:0GoNN3taZV6QI81IXgCbxMyEaJDXMSIjArYBCYzVVvs= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2 h1:JCHLVE3B+kJde7bIEo5N4J+ZbLhp0J1Fs+ulyRws4gE= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -107,16 +101,13 @@ github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc/g github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20 h1:7rj9qZ63knnVo2ZeepYHvHuRdG76f3tRUTdIQDzRBeI= github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20/go.mod h1:cI59GRkC2FRaFYtgbYEqMlgnnfvAwXzjojyZKXwklNg= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 h1:WFwa9pqou0Nb4DdfBOyaBTH0GqLE74Qwdf61E7ITHwQ= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43/go.mod h1:tJPYQG4mnMeUtQvQKNkbsFrnmZOg59Qnf8CcctFv5v4= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antlr/antlr4 v0.0.0-20200820155224-be881fa6b91d h1:OE3kzLBpy7pOJEzE55j9sdgrSilUPzzj++FWvp1cmIs= github.com/antlr/antlr4 v0.0.0-20200820155224-be881fa6b91d/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= @@ -124,7 +115,6 @@ github.com/apache/thrift v0.13.1-0.20200603211036-eac4d0c79a5f h1:33BV5v3u8I6dA2 github.com/apache/thrift v0.13.1-0.20200603211036-eac4d0c79a5f/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 h1:afT88tB6u9JCKQZVAAaa9ICz/uGn5Uw9ekn6P22mYKM= github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:bXvGk6IkT1Agy7qzJ+DjIw/SJ1AaB3AvAuMDVV+Vkoo= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -134,7 +124,6 @@ github.com/aws/aws-lambda-go v1.6.0 h1:T+u/g79zPKw1oJM7xYhvpq7i4Sjc0iVsXZUaqRVVS github.com/aws/aws-lambda-go v1.6.0/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A= github.com/aws/aws-sdk-go-v2 v0.9.0 h1:dWtJKGRFv3UZkMBQaIzMsF0/y4ge3iQPWTzeC4r/vl4= github.com/aws/aws-sdk-go-v2 v0.9.0/go.mod h1:sa1GePZ/LfBGI4dSq30f6uR4Tthll8axxtEPvlpXZ8U= -github.com/awslabs/goformation/v3 v3.1.0 h1:1WhWJrMtuwphJ+x1+0wM7v4QPDzcArvX+i4/sK1Z4e4= github.com/awslabs/goformation/v3 v3.1.0/go.mod h1:hQ5RXo3GNm2laHWKizDzU5DsDy+yNcenSca2UxN0850= github.com/awslabs/goformation/v4 v4.1.0 h1:JRxIW0IjhYpYDrIZOTJGMu2azXKI+OK5dP56ubpywGU= github.com/awslabs/goformation/v4 v4.1.0/go.mod h1:MBDN7u1lMNDoehbFuO4uPvgwPeolTMA2TzX1yO6KlxI= @@ -148,7 +137,6 @@ github.com/blakerouse/service v1.1.1-0.20200924160513-057808572ffa h1:aXHPZwx8Y5 github.com/blakerouse/service v1.1.1-0.20200924160513-057808572ffa/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc= github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI= github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= -github.com/blang/semver v3.1.0+incompatible h1:7hqmJYuaEK3qwVjWubYiht3j93YI0WQBuysxHIfUriU= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible h1:4g18+HnTDwEtO0n7K8B1Kjq+04MEKJRkhJNQ/hb9d5A= github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= @@ -156,19 +144,14 @@ github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e h1:YYUjy5BRwO5 github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e/go.mod h1:V284PjgVwSk4ETmz84rpu9ehpGg7swlIH8npP9k2bGw= github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e h1:Gbx+iVCXG/1m5WSnidDGuHgN+vbIwl+6fR092ANU+Y8= github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e/go.mod h1:AZIh1CCnMrcVm6afFf96PBvE2MRpWFco91z8ObJtgDY= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f h1:fK3ikA1s77arBhpDwFuyO0hUZ2Aa8O6o2Uzy8Q6iLbs= github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f/go.mod h1:RtIewdO+K/czvxvIFCMbPyx7jdxSLL1RZ+DA/Vk8Lwg= @@ -176,13 +159,10 @@ github.com/cloudfoundry/noaa v2.1.0+incompatible h1:hr6VnM5VlYRN3YD+NmAedQLW8686 github.com/cloudfoundry/noaa v2.1.0+incompatible/go.mod h1:5LmacnptvxzrTvMfL9+EJhgkUfIgcwI61BVSTh47ECo= github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 h1:cWfya7mo/zbnwYVio6eWGsFJHqYw4/k/uhwIJ1eqRPI= github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 h1:uict5mhHFTzKLUCufdSLym7z/J0CbBJT59lYbP9wtbg= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.3 h1:LoIzb5y9x5l8VKAlyrbusNPXqBY0+kviRloxFUMFwKc= @@ -193,17 +173,11 @@ github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 h1:esQOJREg8nw8aXj6uCN5dfW5cKUBiEJ/+nni1Q/D/sw= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de h1:dlfGmNcE3jDAecLqwKPMNX6nk2qh1c1Vg1/YTzpOOF4= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -211,9 +185,7 @@ github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQa github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/godog v0.8.1 h1:lVb+X41I4YDreE+ibZ50bdXmySxgRviYFgKY6Aw4XE8= github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= @@ -257,7 +229,6 @@ github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 h1:BzN9o4IS1Hj+AM5qDggsfMDQGFXau5KagipEFmnyIbc= github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5/go.mod h1:cxc20xI7fOgsFHWgt+PenlDDnMcrvh7Ocuj5hEFIdEk= @@ -317,13 +288,10 @@ github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877 h1:C9LsbipColsz0 github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -334,9 +302,7 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/frankban/quicktest v1.10.2 h1:19ARM85nVi4xH7xPXuc5eM/udya5ieh7b/Sv+d844Tk= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72 h1:b+9H1GAsx5RsjvDFLoS5zkNBzIQMuVKUYQDmxU3N5XE= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= @@ -351,20 +317,15 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iauee github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647 h1:whypLownH338a3Ork2w9t0KUKtVxbXYySuz7V1YGsJo= github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1 h1:wSt/4CYxs70xbATrGXhokKF1i0tZjENLOo1ioIO13zk= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9 h1:tF+augKRWlWx0J0B7ZyyKSiTyV6E1zZe+7b3qQlcEf8= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501 h1:C1JKChikHGpXwT5UQDFaryIpDtyyGL/CR6C2kB7F1oc= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87 h1:zP3nY8Tk2E6RTkqGYrarZXuzh+ffyLDljLxCy1iJw80= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= @@ -389,14 +350,12 @@ github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -416,7 +375,6 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gomodule/redigo v1.8.3 h1:HR0kYDX2RJZvAup8CsiJwxB4dTCSC0AaUq6S4SiLwUc= github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9 h1:b4EyQBj8pgtcWOr7YCSxK6NUQzJr0n4hxJ3mc+dtKk4= github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -436,9 +394,7 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc h1:DLpL8pWq0v4JYoRpEhDfsJhhJyGKCcQM2WPW2TJs31c= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -458,7 +414,6 @@ github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.13.0 h1:sBDQoHXrOlfPobnKw69FIKa1wg9qsLLvvQ/Y19WtFgI= github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= @@ -488,7 +443,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/nomad/api v0.0.0-20201203164818-6318a8ac7bf8 h1:Yrz9yGVJf5Ce2KS7x8hS/MUTIeBmGEhF8nhzolRpSqY= github.com/hashicorp/nomad/api v0.0.0-20201203164818-6318a8ac7bf8/go.mod h1:vYHP9jMXk4/T2qNUbWlQ1OHCA1hHLil3nvqSmz8mtgc= @@ -496,7 +450,6 @@ github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 h1:S4qyfL2sEm5Budr4 github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= @@ -507,7 +460,6 @@ github.com/jarcoal/httpmock v1.0.4 h1:jp+dy/+nonJE4g4xbVtl9QdrUNbn6/3hDT5R4nDIZn github.com/jarcoal/httpmock v1.0.4/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -534,14 +486,11 @@ github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfE github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/karrick/godirwalk v1.15.6 h1:Yf2mmR8TJy+8Fa0SuQVto5SYap6IF7lNVX4Jdl8G1qA= github.com/karrick/godirwalk v1.15.6/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0 h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.0 h1:wJbzvpYMVGG9iTI9VxpnNZfd4DzMPoCWze3GgSqz8yg= github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -556,7 +505,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -567,7 +515,6 @@ github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01/go.mod h1:5WUZQaWbwv1U+lT github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.11.0 h1:C/55Ywp9BpgVVclD3lRnSYCwXTYxmSppIgLeDYlNuls= github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= @@ -614,11 +561,8 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d h1:7PxY7LVfSZm7PEeBTyK1rj1gABdCO2mbri6GKO1cMDs= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -646,23 +590,18 @@ github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5X github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU4LguQVtc= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1 h1:wY4pOY8fBdSIvs9+IDHC55thBuEulhzfSgKeC1yFvzQ= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso= github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -700,11 +639,8 @@ github.com/prometheus/prometheus v2.5.0+incompatible h1:7QPitgO2kOFG8ecuRn9O/4L9 github.com/prometheus/prometheus v2.5.0+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e h1:hUGyBE/4CXRPThr4b6kt+f1CN90no4Fs5CNrYOKYSIg= github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e/go.mod h1:Sb6li54lXV0yYEjI4wX8cucdQ9gqUJV3+Ngg3l9g30I= @@ -739,21 +675,17 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -768,7 +700,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 h1:zLV6q4e8Jv9EHjNg/iHfzwDkCve6Ua5jCygptrtXHvI= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b h1:X/8hkb4rQq3+QuOxpJK7gWmAXmZucF0EI1s1BfBLq6U= github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b/go.mod h1:jAqhj/JBVC1PwcLTWd6rjQyGyItxxrhpiBl8LSuAGmw= @@ -779,7 +710,6 @@ github.com/ugorji/go v1.1.8/go.mod h1:0lNM99SwWUIRhCXnigEMClngXBk/EmpTXa7mgiewYW github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.8 h1:4dryPvxMP9OtkjIbuNeK2nb27M38XMHLGlfNSNph/5s= github.com/ugorji/go/codec v1.1.8/go.mod h1:X00B19HDtwvKbQY2DcYjvZxKQp8mzrJoQ6EgoIY/D2E= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 h1:MCfT24H3f//U5+UCrZp1/riVO3B50BovxtDiNn0XKkk= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 h1:OHNw/6pXODJAB32NujjdQO/KIYQ3KAbHQfCzH81XdCs= github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797/go.mod h1:pNWFTeQ+V1OYT/TzWpnWb6eQBdoXpdx+H+lrH97/Oyo= @@ -791,7 +721,6 @@ github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4 h1:hhA8EBThzz9PztawVTyc github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4/go.mod h1:RspW+E2Yb7Fs7HclB2tiDaiu6Rp41BiIG4Wo1YaoXGc= github.com/urso/sderr v0.0.0-20200210124243-c2a16f3d43ec h1:HkZIDJrMKZHPsYhmH2XjTTSk1pbMCFfpxSnyzZUFm+k= github.com/urso/sderr v0.0.0-20200210124243-c2a16f3d43ec/go.mod h1:Wp40HwmjM59FkDIVFfcCb9LzBbnc0XAMp8++hJuWvSU= -github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02dE= github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g= github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41 h1:NeNpIvfvaFOh0BH7nMEljE5Rk/VJlxhm58M41SeOD20= github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= @@ -800,14 +729,10 @@ github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhe github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56 h1:yhqBHs09SmmUoNOHc9jgK4a60T3XFRtPAkYxVnqgY50= github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7 h1:0gYLpmzecnaDCoeWxSfEJ7J1b6B/67+NV++4HKQXx+Y= github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= @@ -860,7 +785,6 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -873,7 +797,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367 h1:0IiAsCRByjO2QjX7ZPkw5oU9x+n1YqRL802rjC0c3Aw= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -961,7 +884,6 @@ golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210308170721-88b6017d0656 h1:FuBaiPCiXkq4v+JY5JEGPU/HwEZwpVyDbu/KBz9fU+4= golang.org/x/sys v0.0.0-20210308170721-88b6017d0656/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1028,9 +950,7 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1038,11 +958,9 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1091,18 +1009,15 @@ k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac h1:sAvhNk5RRuc6FNYGqe7Ygz3PSo/2wGWbulskmzRX8Vs= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/x-pack/osquerybeat/beater/config_plugin_test.go b/x-pack/osquerybeat/beater/config_plugin_test.go index 456836a0a59..da8dd214272 100644 --- a/x-pack/osquerybeat/beater/config_plugin_test.go +++ b/x-pack/osquerybeat/beater/config_plugin_test.go @@ -11,9 +11,10 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/google/go-cmp/cmp" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/x-pack/osquerybeat/internal/testutil" ) diff --git a/x-pack/osquerybeat/beater/logger_plugin.go b/x-pack/osquerybeat/beater/logger_plugin.go index 83c510207f5..3160c4d64f3 100644 --- a/x-pack/osquerybeat/beater/logger_plugin.go +++ b/x-pack/osquerybeat/beater/logger_plugin.go @@ -8,8 +8,9 @@ import ( "context" "encoding/json" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/kolide/osquery-go/plugin/logger" + + "github.com/elastic/beats/v7/libbeat/logp" ) type SnapshotResult struct { diff --git a/x-pack/osquerybeat/beater/logger_plugin_test.go b/x-pack/osquerybeat/beater/logger_plugin_test.go index a501d8aebab..67cdafc25a0 100644 --- a/x-pack/osquerybeat/beater/logger_plugin_test.go +++ b/x-pack/osquerybeat/beater/logger_plugin_test.go @@ -9,10 +9,11 @@ import ( "encoding/json" "testing" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/google/go-cmp/cmp" "github.com/kolide/osquery-go/plugin/logger" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/x-pack/osquerybeat/internal/testutil" ) diff --git a/x-pack/osquerybeat/internal/osqd/osqueryd.go b/x-pack/osquerybeat/internal/osqd/osqueryd.go index e3de3e00913..f2e5f184bda 100644 --- a/x-pack/osquerybeat/internal/osqd/osqueryd.go +++ b/x-pack/osquerybeat/internal/osqd/osqueryd.go @@ -18,8 +18,9 @@ import ( "time" "github.com/dolmen-go/contextio" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/pkg/errors" + + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go b/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go index 22b4f2e820f..758dce74500 100644 --- a/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go +++ b/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go @@ -13,8 +13,9 @@ import ( "github.com/gofrs/uuid" ) + const ( - extensionName = "osquery-extension.exe" + extensionName = "osquery-extension.exe" ) func CreateSocketPath() (string, func(), error) { diff --git a/x-pack/osquerybeat/internal/osqdcli/client.go b/x-pack/osquerybeat/internal/osqdcli/client.go index ae582226573..ceb0fee340f 100644 --- a/x-pack/osquerybeat/internal/osqdcli/client.go +++ b/x-pack/osquerybeat/internal/osqdcli/client.go @@ -14,8 +14,9 @@ import ( "golang.org/x/sync/semaphore" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/kolide/osquery-go" + + "github.com/elastic/beats/v7/libbeat/logp" ) const ( From 87aaeaa9703d14be438bbf686266ad85214270c6 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Mon, 21 Jun 2021 08:59:29 -0700 Subject: [PATCH 17/24] fix up linux/memory --- metricbeat/module/linux/memory/doc.go | 18 ++++++++++++++++++ metricbeat/module/linux/memory/memory.go | 2 ++ metricbeat/module/linux/memory/memory_test.go | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 metricbeat/module/linux/memory/doc.go diff --git a/metricbeat/module/linux/memory/doc.go b/metricbeat/module/linux/memory/doc.go new file mode 100644 index 00000000000..150cf0788e9 --- /dev/null +++ b/metricbeat/module/linux/memory/doc.go @@ -0,0 +1,18 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package memory diff --git a/metricbeat/module/linux/memory/memory.go b/metricbeat/module/linux/memory/memory.go index 35cd407b9b3..13f080196ad 100644 --- a/metricbeat/module/linux/memory/memory.go +++ b/metricbeat/module/linux/memory/memory.go @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +// +build linux + package memory import ( diff --git a/metricbeat/module/linux/memory/memory_test.go b/metricbeat/module/linux/memory/memory_test.go index 2980c94841e..52b0bdcc7e1 100644 --- a/metricbeat/module/linux/memory/memory_test.go +++ b/metricbeat/module/linux/memory/memory_test.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -// +build darwin freebsd linux openbsd windows +// +build linux package memory From 0574d520f3bf2709790297150a6f5424667945d5 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 22 Jun 2021 11:36:21 -0700 Subject: [PATCH 18/24] update fields --- metricbeat/docs/fields.asciidoc | 12 ++++++++++++ metricbeat/module/system/fields.go | 2 +- metricbeat/module/system/memory/_meta/fields.yml | 6 ++++++ metricbeat/module/system/memory/memory.go | 5 ----- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index 379bd3bca3e..575b4df1822 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -50388,6 +50388,18 @@ format: bytes The total amount of free memory in bytes. This value does not include memory consumed by system caches and buffers (see system.memory.actual.free). +type: long + +format: bytes + +-- + +*`system.memory.cached`*:: ++ +-- +Total Cached memory on system. + + type: long format: bytes diff --git a/metricbeat/module/system/fields.go b/metricbeat/module/system/fields.go index fdeeea5f9c6..ffde1aef0bc 100644 --- a/metricbeat/module/system/fields.go +++ b/metricbeat/module/system/fields.go @@ -32,5 +32,5 @@ func init() { // AssetSystem returns asset data. // This is the base64 encoded gzipped contents of module/system. func AssetSystem() string { - return "eJzsff+PGzey5+/5KwgfFhm/m5E93mzevvnhAMfzcjeAvR7YDt4DDgeZ6i5J3GGTHZItWfnrDyyyv7PV3VJLIy8yWGSTGYn8VLFYrCoWq27IE+zuiN5pA8kPhBhmONyRF5/xFy9+ICQGHSmWGibFHflfPxBCiPsj0YaaTJMEjGKRviacPQF59/gboSImCSRS7Uim6QquiVlTQ6gCEknOITIQk6WSCTFrIDIFRQ0TK49i9gMhei2VmUdSLNnqjhiVwQ+EKOBANdyRFf2BkCUDHus7BHRDBE3gjqRKRqA1/o4Qs0vth5XMUv+bAC3259F9Ladk5v9QnaE6i6Ubit/m8zzBbitVXPl9x2z258sacrBuuBn5VSoC32iSIv9VJgQTqxez1uxRms3SyLTm1xHlEM+XXNLqH5dSJdTckRRUBMKMgOe+QFdA5BKX1bAEiE5BGLLY4dIVJDARAf6GU20IbECYWWNEpsmG8gwI00RYUJz9AXE+ksiSBah8pkgq0ChGzBBFxQp0bTSUndfESHIbZpA2VJm5BdziU1xfvB4uIM3bNYgavVuKy6YMxO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DEhlmIKNH46+5NPuS6uQfmha9NTzaqbIRO0qvpQfxRfdSXzgM912d6hDM0Uxa99DjKm5rqAWurajv4BM/JOKgU6xUKfRua1tjTgnf4rqzFf6Z1+JcC8Yunmp1cmSucJJDPysaPNTHeKY7jY/NGdP/pXlwwMAEmVrun+HPfulR6IFhG7ve4XyU8LsRX5fGm7+buXgi4dMjUBuT7p5/swvXICfBbaPj3ThAfaWgRMr1sXfScAWN4BVqYdxc2ISw3zLe0sm3IStA2EVkfMSyTz4GVYHbdhyWXALoAMQa13Yq7DDRTPCjrHMRSzgqjZJP1ZMFscQzAvmcA1aYaCzg66ADIGdTP+82yo3wxBzak2cxqFbmDOCjrHMQSz1TVnOUH6VR4TqxDiwkmLJzVff7v/FzFfLSHPaL5m8SWar/tXlww0X89t/HWh3vMvxe5IG/XKR0cJvrohvtYrOfinHGKVi4r7lI8lHHnV5huBzJJwNkPgaiDfPvlXG39mIs3MPP9Qwjhn4fSBAcmsHz/ntGInoXKodqpYpkHpXt4fkCj2Xq5WEN8U5d1BayZFM4C8j8cd4bSDU3zLB2geTHBWDa1640fM+1ZUr0a4XDGruZpT7HnrdiTN979k2mdxuq6eAzgQuIQ9EoX9epEjVJGGjgUI5YocswaF8A1NTalfTwSRLKTk0IoP9CKxX8OOGJHTTDS/GdrLkWNSxcIrkle9bST97cEQyamlorIaTkHHgVnKlH8atw6rg/PJ14B9pMnjMJ3g1mg+8sq19wh9W7sW9HfSZbnYBqDyX/5/AAAA///lIhrz" } diff --git a/metricbeat/module/system/memory/_meta/fields.yml b/metricbeat/module/system/memory/_meta/fields.yml index ab80bf3ba28..9a8a7714a5e 100644 --- a/metricbeat/module/system/memory/_meta/fields.yml +++ b/metricbeat/module/system/memory/_meta/fields.yml @@ -23,6 +23,12 @@ The total amount of free memory in bytes. This value does not include memory consumed by system caches and buffers (see system.memory.actual.free). + - name: cached + type: long + format: bytes + description: > + Total Cached memory on system. + - name: used.pct type: scaled_float format: percent diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 9cd042ba9e5..54565231c53 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -65,11 +65,6 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { return errors.Wrap(err, "error fetching memory metrics") } - // memory, err := eventRaw.Format() - // if err != nil { - // return errors.Wrap(err, "error formatting base memory events") - // } - memory := common.MapStr{} err = typeconv.Convert(&memory, &eventRaw) From c7fb4e7bed82cfcb1cdd5d92d68006ee7e3b246d Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 23 Jun 2021 10:02:44 -0700 Subject: [PATCH 19/24] update system tests --- metricbeat/module/system/test_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metricbeat/module/system/test_system.py b/metricbeat/module/system/test_system.py index b1c83db81eb..b7e4e1ce10a 100644 --- a/metricbeat/module/system/test_system.py +++ b/metricbeat/module/system/test_system.py @@ -67,7 +67,7 @@ SYSTEM_FSSTAT_FIELDS = ["count", "total_files", "total_size"] -SYSTEM_MEMORY_FIELDS = ["swap", "actual.free", "free", "total", "used.bytes", "used.pct", "actual.used.bytes", +SYSTEM_MEMORY_FIELDS = ["swap", "actual.free", "free", "total", "cached", "used.bytes", "used.pct", "actual.used.bytes", "actual.used.pct", "hugepages", "page_stats"] SYSTEM_NETWORK_FIELDS = ["name", "out.bytes", "in.bytes", "out.packets", From 6c0bc54a79973a4896e7b1d9148bae2b315f11b7 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 23 Jun 2021 12:46:44 -0700 Subject: [PATCH 20/24] fix system tests, again --- metricbeat/module/system/test_system.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/metricbeat/module/system/test_system.py b/metricbeat/module/system/test_system.py index b7e4e1ce10a..e4d69723cf1 100644 --- a/metricbeat/module/system/test_system.py +++ b/metricbeat/module/system/test_system.py @@ -67,8 +67,11 @@ SYSTEM_FSSTAT_FIELDS = ["count", "total_files", "total_size"] -SYSTEM_MEMORY_FIELDS = ["swap", "actual.free", "free", "total", "cached", "used.bytes", "used.pct", "actual.used.bytes", - "actual.used.pct", "hugepages", "page_stats"] +SYSTEM_MEMORY_FIELDS_LINUX = ["swap", "actual.free", "free", "total", "cached", "used.bytes", "used.pct", "actual.used.bytes", + "actual.used.pct", "hugepages", "page_stats"] + +SYSTEM_MEMORY_FIELDS = ["swap", "actual.free", "free", "total", "used.bytes", "used.pct", "actual.used.bytes", + "actual.used.pct", "hugepages", "page_stats"] SYSTEM_NETWORK_FIELDS = ["name", "out.bytes", "in.bytes", "out.packets", "in.packets", "in.error", "out.error", "in.dropped", "out.dropped"] @@ -384,7 +387,13 @@ def test_memory(self): if not re.match("(?i)linux", sys.platform) and not "page_stats" in memory: # Ensure presence of page_stats only in Linux memory["page_stats"] = None - self.assertCountEqual(self.de_dot(SYSTEM_MEMORY_FIELDS), memory.keys()) + + if sys.platform.startswith("linux"): + self.assertCountEqual(self.de_dot( + SYSTEM_MEMORY_FIELDS_LINUX), memory.keys()) + else: + self.assertCountEqual(self.de_dot( + SYSTEM_MEMORY_FIELDS), memory.keys()) # Check that percentages are calculated. mem = memory From 5088c945a2a668397ccb172888d82a37a616bad5 Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 23 Jun 2021 15:10:51 -0700 Subject: [PATCH 21/24] fix extra print statements --- metricbeat/module/linux/memory/data.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/metricbeat/module/linux/memory/data.go b/metricbeat/module/linux/memory/data.go index 3c2902602c6..eb4706e02f0 100644 --- a/metricbeat/module/linux/memory/data.go +++ b/metricbeat/module/linux/memory/data.go @@ -20,8 +20,6 @@ package memory import ( - "fmt" - "github.com/pkg/errors" "github.com/elastic/beats/v7/libbeat/common" @@ -74,7 +72,6 @@ func FetchLinuxMemStats(baseMap common.MapStr) error { if err != nil { return errors.Wrap(err, "error getting huge pages") } - fmt.Printf("thp: %s\n", baseMap.StringToPrint()) thp["swap"] = common.MapStr{ "out": common.MapStr{ "pages": vmstat.ThpSwpout, From 7b52da17a5bf00926c6526ff913ea95d2dbaf88f Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Wed, 23 Jun 2021 16:21:40 -0700 Subject: [PATCH 22/24] fix if block in fillPercentages --- metricbeat/internal/metrics/memory/memory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metricbeat/internal/metrics/memory/memory.go b/metricbeat/internal/metrics/memory/memory.go index 45572f5378f..73597e8974f 100644 --- a/metricbeat/internal/metrics/memory/memory.go +++ b/metricbeat/internal/metrics/memory/memory.go @@ -87,7 +87,7 @@ func (swap SwapMetrics) IsZero() bool { func (base *Memory) fillPercentages() { // Add percentages // In theory, `Used` and `Total` are available everywhere, so assume values are good. - if base.Total.ValueOr(0) != 0 { + if base.Total.Exists() && base.Total.ValueOr(0) != 0 { percUsed := float64(base.Used.Bytes.ValueOr(0)) / float64(base.Total.ValueOr(1)) base.Used.Pct = metrics.OptFloatWith(common.Round(percUsed, common.DefaultDecimalPlacesCount)) From d5f5ea1ae18a2409dea24663ca406050211e1edb Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Thu, 24 Jun 2021 12:28:15 -0700 Subject: [PATCH 23/24] vix Value API --- metricbeat/internal/metrics/memory/memory_test.go | 8 ++++---- metricbeat/internal/metrics/opt.go | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/metricbeat/internal/metrics/memory/memory_test.go b/metricbeat/internal/metrics/memory/memory_test.go index 2a7e24534c2..1bc76125cba 100644 --- a/metricbeat/internal/metrics/memory/memory_test.go +++ b/metricbeat/internal/metrics/memory/memory_test.go @@ -64,13 +64,13 @@ func TestMemPercentage(t *testing.T) { Free: metrics.OptUintWith(2), } m.fillPercentages() - assert.Equal(t, m.Used.Pct.ValueOrZero(), 0.7143) + assert.Equal(t, m.Used.Pct.ValueOr(0), 0.7143) m = Memory{ Total: metrics.OptUintWith(0), } m.fillPercentages() - assert.Equal(t, m.Used.Pct.ValueOrZero(), 0.0) + assert.Equal(t, m.Used.Pct.ValueOr(0), 0.0) } func TestActualMemPercentage(t *testing.T) { @@ -83,11 +83,11 @@ func TestActualMemPercentage(t *testing.T) { } m.fillPercentages() - assert.Equal(t, m.Actual.Used.Pct.ValueOrZero(), 0.7143) + assert.Equal(t, m.Actual.Used.Pct.ValueOr(0), 0.7143) m = Memory{ Total: metrics.OptUintWith(0), } m.fillPercentages() - assert.Equal(t, m.Actual.Used.Pct.ValueOrZero(), 0.0) + assert.Equal(t, m.Actual.Used.Pct.ValueOr(0), 0.0) } diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go index b9dfdf751d8..58100d9f146 100644 --- a/metricbeat/internal/metrics/opt.go +++ b/metricbeat/internal/metrics/opt.go @@ -119,14 +119,14 @@ func (opt OptFloat) Exists() bool { return opt.exists } -// ValueOrZero returns the stored value, or zero +// ValueOr returns the stored value, or zero // Please do not use this for populating reported data, // as we actually want to avoid sending zeros where values are functionally null -func (opt OptFloat) ValueOrZero() float64 { +func (opt OptFloat) ValueOr(f float64) float64 { if opt.exists { return opt.value } - return 0 + return f } // Fold implements the folder interface for OptUint From 8212feecb9cc6968f0edc11a38581907627dbffa Mon Sep 17 00:00:00 2001 From: Alex Kristiansen Date: Tue, 29 Jun 2021 09:36:44 -0700 Subject: [PATCH 24/24] fix up tests, opt --- .../internal/metrics/memory/memory_test.go | 19 ++++++++++++++----- metricbeat/internal/metrics/opt.go | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/metricbeat/internal/metrics/memory/memory_test.go b/metricbeat/internal/metrics/memory/memory_test.go index 1bc76125cba..5b7908290ec 100644 --- a/metricbeat/internal/metrics/memory/memory_test.go +++ b/metricbeat/internal/metrics/memory/memory_test.go @@ -35,10 +35,19 @@ func TestGetMemory(t *testing.T) { assert.NotNil(t, mem) assert.NoError(t, err) + assert.True(t, mem.Total.Exists()) assert.True(t, (mem.Total.ValueOr(0) > 0)) + + assert.True(t, mem.Used.Bytes.Exists()) assert.True(t, (mem.Used.Bytes.ValueOr(0) > 0)) + + assert.True(t, mem.Free.Exists()) assert.True(t, (mem.Free.ValueOr(0) >= 0)) + + assert.True(t, mem.Actual.Free.Exists()) assert.True(t, (mem.Actual.Free.ValueOr(0) >= 0)) + + assert.True(t, mem.Actual.Used.Bytes.Exists()) assert.True(t, (mem.Actual.Used.Bytes.ValueOr(0) > 0)) } @@ -52,8 +61,13 @@ func TestGetSwap(t *testing.T) { assert.NotNil(t, mem) assert.NoError(t, err) + assert.True(t, mem.Swap.Total.Exists()) assert.True(t, (mem.Swap.Total.ValueOr(0) >= 0)) + + assert.True(t, mem.Swap.Used.Bytes.Exists()) assert.True(t, (mem.Swap.Used.Bytes.ValueOr(0) >= 0)) + + assert.True(t, mem.Swap.Free.Exists()) assert.True(t, (mem.Swap.Free.ValueOr(0) >= 0)) } @@ -85,9 +99,4 @@ func TestActualMemPercentage(t *testing.T) { m.fillPercentages() assert.Equal(t, m.Actual.Used.Pct.ValueOr(0), 0.7143) - m = Memory{ - Total: metrics.OptUintWith(0), - } - m.fillPercentages() - assert.Equal(t, m.Actual.Used.Pct.ValueOr(0), 0.0) } diff --git a/metricbeat/internal/metrics/opt.go b/metricbeat/internal/metrics/opt.go index 58100d9f146..a5f28975252 100644 --- a/metricbeat/internal/metrics/opt.go +++ b/metricbeat/internal/metrics/opt.go @@ -75,7 +75,7 @@ func SumOptUint(opts ...OptUint) uint64 { // Fold implements the folder interface for OptUint func (in *OptUint) Fold(v structform.ExtVisitor) error { - if in.exists == true { + if in.exists { value := in.value v.OnUint64(value) } else { @@ -131,7 +131,7 @@ func (opt OptFloat) ValueOr(f float64) float64 { // Fold implements the folder interface for OptUint func (in *OptFloat) Fold(v structform.ExtVisitor) error { - if in.exists == true { + if in.exists { value := in.value v.OnFloat64(value) } else {