collectors

package
v0.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 36 Imported by: 1

README

CCMetric collectors

This folder contains the collectors for the cc-metric-collector.

Configuration

{
    "collector_type" : {
        <collector specific configuration>
    }
}

In contrast to the configuration files for sinks and receivers, the collectors configuration is not a list but a set of dicts. This is required because we didn't manage to partially read the type before loading the remaining configuration. We are eager to change this to the same format.

Available collectors

Todos

  • Aggreate metrics to higher topology entity (sum hwthread metrics to socket metric, ...). Needs to be configurable

Contributing own collectors

A collector reads data from any source, parses it to metrics and submits these metrics to the metric-collector. A collector provides three function:

  • Name() string: Return the name of the collector
  • Init(config json.RawMessage) error: Initializes the collector using the given collector-specific config in JSON. Check if needed files/commands exists, ...
  • Initialized() bool: Check if a collector is successfully initialized
  • Read(duration time.Duration, output chan ccMetric.CCMetric): Read, parse and submit data to the output channel as CCMetric. If the collector has to measure anything for some duration, use the provided function argument duration.
  • Close(): Closes down the collector.

It is recommanded to call setup() in the Init() function.

Finally, the collector needs to be registered in the collectorManager.go. There is a list of collectors called AvailableCollectors which is a map (collector_type_string -> pointer to MetricCollector interface). Add a new entry with a descriptive name and the new collector.

Sample collector

package collectors

import (
    "encoding/json"
    "time"

    lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
)

// Struct for the collector-specific JSON config
type SampleCollectorConfig struct {
    ExcludeMetrics []string `json:"exclude_metrics"`
}

type SampleCollector struct {
    metricCollector
    config SampleCollectorConfig
}

func (m *SampleCollector) Init(config json.RawMessage) error {
    // Check if already initialized
    if m.init {
        return nil
    }

    m.name = "SampleCollector"
    m.setup()
    if len(config) > 0 {
        err := json.Unmarshal(config, &m.config)
        if err != nil {
            return err
        }
    }
    m.meta = map[string]string{"source": m.name, "group": "Sample"}

    m.init = true
    return nil
}

func (m *SampleCollector) Read(interval time.Duration, output chan lp.CCMetric) {
    if !m.init {
        return
    }
    // tags for the metric, if type != node use proper type and type-id
    tags := map[string]string{"type" : "node"}

    x, err := GetMetric()
    if err != nil {
        cclog.ComponentError(m.name, fmt.Sprintf("Read(): %v", err))
    }

    // Each metric has exactly one field: value !
    value := map[string]interface{}{"value": int64(x)}
    if y, err := lp.New("sample_metric", tags, m.meta, value, time.Now()); err == nil {
        output <- y
    }
}

func (m *SampleCollector) Close() {
    m.init = false
    return
}

Documentation

Index

Constants

View Source
const (
	LIKWID_LIB_NAME       = "liblikwid.so"
	LIKWID_LIB_DL_FLAGS   = dl.RTLD_LAZY | dl.RTLD_GLOBAL
	LIKWID_DEF_ACCESSMODE = "direct"
	LIKWID_DEF_LOCKFILE   = "/var/run/likwid.lock"
)
View Source
const CPUSTATFILE = `/proc/stat`
View Source
const CUSTOMCMDPATH = `/home/unrz139/Work/cc-metric-collector/collectors/custom`
View Source
const DEFAULT_BEEGFS_CMD = "beegfs-ctl"
View Source
const DEFAULT_GPFS_CMD = "mmpmon"
View Source
const DEFAULT_NUM_PROCS = 2
View Source
const IB_BASEPATH = "/sys/class/infiniband/"
View Source
const IOSTATFILE = `/proc/diskstats`
View Source
const IOSTAT_SYSFSPATH = `/sys/block`
View Source
const IPMISENSORS_PATH = `ipmi-sensors`
View Source
const LCTL_CMD = `lctl`
View Source
const LCTL_OPTION = `get_param`
View Source
const LOADAVGFILE = "/proc/loadavg"

LoadavgCollector collects: * load average of last 1, 5 & 15 minutes * number of processes currently runnable * total number of processes in system

See: https://www.kernel.org/doc/html/latest/filesystems/proc.html

View Source
const LUSTRE_SYSFS = `/sys/fs/lustre`
View Source
const MAX_NUM_PROCS = 10
View Source
const MEMSTATFILE = "/proc/meminfo"
View Source
const MOUNTFILE = `/proc/self/mounts`
View Source
const NETSTATFILE = "/proc/net/dev"
View Source
const NFSSTAT_EXEC = `nfsstat`
View Source
const NUMA_MEMSTAT_BASE = "/sys/devices/system/node"
View Source
const SCHEDSTATFILE = `/proc/schedstat`

Variables

View Source
var AvailableCollectors = map[string]MetricCollector{

	"likwid":          new(LikwidCollector),
	"loadavg":         new(LoadavgCollector),
	"memstat":         new(MemstatCollector),
	"netstat":         new(NetstatCollector),
	"ibstat":          new(InfinibandCollector),
	"lustrestat":      new(LustreCollector),
	"cpustat":         new(CpustatCollector),
	"topprocs":        new(TopProcsCollector),
	"nvidia":          new(NvidiaCollector),
	"customcmd":       new(CustomCmdCollector),
	"iostat":          new(IOstatCollector),
	"diskstat":        new(DiskstatCollector),
	"tempstat":        new(TempCollector),
	"ipmistat":        new(IpmiCollector),
	"gpfs":            new(GpfsCollector),
	"cpufreq":         new(CPUFreqCollector),
	"cpufreq_cpuinfo": new(CPUFreqCpuInfoCollector),
	"nfs3stat":        new(Nfs3Collector),
	"nfs4stat":        new(Nfs4Collector),
	"numastats":       new(NUMAStatsCollector),
	"beegfs_meta":     new(BeegfsMetaCollector),
	"beegfs_storage":  new(BeegfsStorageCollector),
	"rapl":            new(RAPLCollector),
	"rocm_smi":        new(RocmSmiCollector),
	"self":            new(SelfCollector),
	"schedstat":       new(SchedstatCollector),
	"nfsiostat":       new(NfsIOStatCollector),
}

Map of all available metric collectors

View Source
var DefaultTime = func() time.Time {
	return time.Unix(42, 0)
}
View Source
var LustreAbsMetrics = []LustreMetricDefinition{
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
}
View Source
var LustreDeriveMetrics = []LustreMetricDefinition{
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
}
View Source
var LustreDiffMetrics = []LustreMetricDefinition{
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
}

Functions

func RemoveFromStringList

func RemoveFromStringList(s []string, r string) ([]string, error)

RemoveFromStringList removes the string r from the array of strings s If r is not contained in the array an error is returned

Types

type BeegfsMetaCollector

type BeegfsMetaCollector struct {
	// contains filtered or unexported fields
}

func (*BeegfsMetaCollector) Close

func (m *BeegfsMetaCollector) Close()

func (*BeegfsMetaCollector) Init

func (m *BeegfsMetaCollector) Init(config json.RawMessage) error

func (*BeegfsMetaCollector) Initialized

func (c *BeegfsMetaCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*BeegfsMetaCollector) Name

func (c *BeegfsMetaCollector) Name() string

Name returns the name of the metric collector

func (*BeegfsMetaCollector) Parallel added in v0.6.0

func (c *BeegfsMetaCollector) Parallel() bool

Name returns the name of the metric collector

func (*BeegfsMetaCollector) Read

func (m *BeegfsMetaCollector) Read(interval time.Duration, output chan lp.CCMetric)

type BeegfsMetaCollectorConfig

type BeegfsMetaCollectorConfig struct {
	Beegfs            string   `json:"beegfs_path"`
	ExcludeMetrics    []string `json:"exclude_metrics,omitempty"`
	ExcludeFilesystem []string `json:"exclude_filesystem"`
}

Struct for the collector-specific JSON config

type BeegfsStorageCollector

type BeegfsStorageCollector struct {
	// contains filtered or unexported fields
}

func (*BeegfsStorageCollector) Close

func (m *BeegfsStorageCollector) Close()

func (*BeegfsStorageCollector) Init

func (m *BeegfsStorageCollector) Init(config json.RawMessage) error

func (*BeegfsStorageCollector) Initialized

func (c *BeegfsStorageCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*BeegfsStorageCollector) Name

func (c *BeegfsStorageCollector) Name() string

Name returns the name of the metric collector

func (*BeegfsStorageCollector) Parallel added in v0.6.0

func (c *BeegfsStorageCollector) Parallel() bool

Name returns the name of the metric collector

func (*BeegfsStorageCollector) Read

func (m *BeegfsStorageCollector) Read(interval time.Duration, output chan lp.CCMetric)

type BeegfsStorageCollectorConfig

type BeegfsStorageCollectorConfig struct {
	Beegfs            string   `json:"beegfs_path"`
	ExcludeMetrics    []string `json:"exclude_metrics,omitempty"`
	ExcludeFilesystem []string `json:"exclude_filesystem"`
}

Struct for the collector-specific JSON config

type CPUFreqCollector

type CPUFreqCollector struct {
	// contains filtered or unexported fields
}

CPUFreqCollector a metric collector to measure the current frequency of the CPUs as obtained from the hardware (in KHz) Only measure on the first hyper-thread

See: https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html

func (*CPUFreqCollector) Close

func (m *CPUFreqCollector) Close()

func (*CPUFreqCollector) Init

func (m *CPUFreqCollector) Init(config json.RawMessage) error

func (*CPUFreqCollector) Initialized

func (c *CPUFreqCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*CPUFreqCollector) Name

func (c *CPUFreqCollector) Name() string

Name returns the name of the metric collector

func (*CPUFreqCollector) Parallel added in v0.6.0

func (c *CPUFreqCollector) Parallel() bool

Name returns the name of the metric collector

func (*CPUFreqCollector) Read

func (m *CPUFreqCollector) Read(interval time.Duration, output chan lp.CCMetric)

type CPUFreqCollectorTopology

type CPUFreqCollectorTopology struct {
	// contains filtered or unexported fields
}

type CPUFreqCpuInfoCollector

type CPUFreqCpuInfoCollector struct {
	// contains filtered or unexported fields
}

func (*CPUFreqCpuInfoCollector) Close

func (m *CPUFreqCpuInfoCollector) Close()

func (*CPUFreqCpuInfoCollector) Init

func (m *CPUFreqCpuInfoCollector) Init(config json.RawMessage) error

func (*CPUFreqCpuInfoCollector) Initialized

func (c *CPUFreqCpuInfoCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*CPUFreqCpuInfoCollector) Name

func (c *CPUFreqCpuInfoCollector) Name() string

Name returns the name of the metric collector

func (*CPUFreqCpuInfoCollector) Parallel added in v0.6.0

func (c *CPUFreqCpuInfoCollector) Parallel() bool

Name returns the name of the metric collector

func (*CPUFreqCpuInfoCollector) Read

func (m *CPUFreqCpuInfoCollector) Read(interval time.Duration, output chan lp.CCMetric)

type CPUFreqCpuInfoCollectorTopology

type CPUFreqCpuInfoCollectorTopology struct {
	// contains filtered or unexported fields
}

CPUFreqCollector a metric collector to measure the current frequency of the CPUs as obtained from /proc/cpuinfo Only measure on the first hyperthread

type CollectorManager

type CollectorManager interface {
	Init(ticker mct.MultiChanTicker, duration time.Duration, wg *sync.WaitGroup, collectConfigFile string) error
	AddOutput(output chan lp.CCMetric)
	Start()
	Close()
}

Metric collector manager access functions

func New

func New(ticker mct.MultiChanTicker, duration time.Duration, wg *sync.WaitGroup, collectConfigFile string) (CollectorManager, error)

New creates a new initialized metric collector manager

type CpustatCollector

type CpustatCollector struct {
	// contains filtered or unexported fields
}

func (*CpustatCollector) Close

func (m *CpustatCollector) Close()

func (*CpustatCollector) Init

func (m *CpustatCollector) Init(config json.RawMessage) error

func (*CpustatCollector) Initialized

func (c *CpustatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*CpustatCollector) Name

func (c *CpustatCollector) Name() string

Name returns the name of the metric collector

func (*CpustatCollector) Parallel added in v0.6.0

func (c *CpustatCollector) Parallel() bool

Name returns the name of the metric collector

func (*CpustatCollector) Read

func (m *CpustatCollector) Read(interval time.Duration, output chan lp.CCMetric)

type CpustatCollectorConfig

type CpustatCollectorConfig struct {
	ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
}

type CustomCmdCollector

type CustomCmdCollector struct {
	// contains filtered or unexported fields
}

func (*CustomCmdCollector) Close

func (m *CustomCmdCollector) Close()

func (*CustomCmdCollector) Init

func (m *CustomCmdCollector) Init(config json.RawMessage) error

func (*CustomCmdCollector) Initialized

func (c *CustomCmdCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*CustomCmdCollector) Name

func (c *CustomCmdCollector) Name() string

Name returns the name of the metric collector

func (*CustomCmdCollector) Parallel added in v0.6.0

func (c *CustomCmdCollector) Parallel() bool

Name returns the name of the metric collector

func (*CustomCmdCollector) Read

func (m *CustomCmdCollector) Read(interval time.Duration, output chan lp.CCMetric)

type CustomCmdCollectorConfig

type CustomCmdCollectorConfig struct {
	Commands       []string `json:"commands"`
	Files          []string `json:"files"`
	ExcludeMetrics []string `json:"exclude_metrics"`
}

type DiskstatCollector

type DiskstatCollector struct {
	// contains filtered or unexported fields
}

func (*DiskstatCollector) Close

func (m *DiskstatCollector) Close()

func (*DiskstatCollector) Init

func (m *DiskstatCollector) Init(config json.RawMessage) error

func (*DiskstatCollector) Initialized

func (c *DiskstatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*DiskstatCollector) Name

func (c *DiskstatCollector) Name() string

Name returns the name of the metric collector

func (*DiskstatCollector) Parallel added in v0.6.0

func (c *DiskstatCollector) Parallel() bool

Name returns the name of the metric collector

func (*DiskstatCollector) Read

func (m *DiskstatCollector) Read(interval time.Duration, output chan lp.CCMetric)

type DiskstatCollectorConfig

type DiskstatCollectorConfig struct {
	ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
}

type GpfsCollector

type GpfsCollector struct {
	// contains filtered or unexported fields
}

func (*GpfsCollector) Close

func (m *GpfsCollector) Close()

func (*GpfsCollector) Init

func (m *GpfsCollector) Init(config json.RawMessage) error

func (*GpfsCollector) Initialized

func (c *GpfsCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*GpfsCollector) Name

func (c *GpfsCollector) Name() string

Name returns the name of the metric collector

func (*GpfsCollector) Parallel added in v0.6.0

func (c *GpfsCollector) Parallel() bool

Name returns the name of the metric collector

func (*GpfsCollector) Read

func (m *GpfsCollector) Read(interval time.Duration, output chan lp.CCMetric)

type GpfsCollectorLastState

type GpfsCollectorLastState struct {
	// contains filtered or unexported fields
}

type IOstatCollector

type IOstatCollector struct {
	// contains filtered or unexported fields
}

func (*IOstatCollector) Close

func (m *IOstatCollector) Close()

func (*IOstatCollector) Init

func (m *IOstatCollector) Init(config json.RawMessage) error

func (*IOstatCollector) Initialized

func (c *IOstatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*IOstatCollector) Name

func (c *IOstatCollector) Name() string

Name returns the name of the metric collector

func (*IOstatCollector) Parallel added in v0.6.0

func (c *IOstatCollector) Parallel() bool

Name returns the name of the metric collector

func (*IOstatCollector) Read

func (m *IOstatCollector) Read(interval time.Duration, output chan lp.CCMetric)

type IOstatCollectorConfig

type IOstatCollectorConfig struct {
	ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
}

type IOstatCollectorEntry

type IOstatCollectorEntry struct {
	// contains filtered or unexported fields
}

type InfinibandCollector

type InfinibandCollector struct {
	// contains filtered or unexported fields
}

func (*InfinibandCollector) Close

func (m *InfinibandCollector) Close()

func (*InfinibandCollector) Init

func (m *InfinibandCollector) Init(config json.RawMessage) error

Init initializes the Infiniband collector by walking through files below IB_BASEPATH

func (*InfinibandCollector) Initialized

func (c *InfinibandCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*InfinibandCollector) Name

func (c *InfinibandCollector) Name() string

Name returns the name of the metric collector

func (*InfinibandCollector) Parallel added in v0.6.0

func (c *InfinibandCollector) Parallel() bool

Name returns the name of the metric collector

func (*InfinibandCollector) Read

func (m *InfinibandCollector) Read(interval time.Duration, output chan lp.CCMetric)

Read reads Infiniband counter files below IB_BASEPATH

type InfinibandCollectorInfo

type InfinibandCollectorInfo struct {
	LID string // IB local Identifier (LID)
	// contains filtered or unexported fields
}

type InfinibandCollectorMetric

type InfinibandCollectorMetric struct {
	// contains filtered or unexported fields
}

type IpmiCollector

type IpmiCollector struct {
	// contains filtered or unexported fields
}

func (*IpmiCollector) Close

func (m *IpmiCollector) Close()

func (*IpmiCollector) Init

func (m *IpmiCollector) Init(config json.RawMessage) error

func (*IpmiCollector) Initialized

func (c *IpmiCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*IpmiCollector) Name

func (c *IpmiCollector) Name() string

Name returns the name of the metric collector

func (*IpmiCollector) Parallel added in v0.6.0

func (c *IpmiCollector) Parallel() bool

Name returns the name of the metric collector

func (*IpmiCollector) Read

func (m *IpmiCollector) Read(interval time.Duration, output chan lp.CCMetric)

type LikwidCollector

type LikwidCollector struct {
	// contains filtered or unexported fields
}

func (*LikwidCollector) Close

func (m *LikwidCollector) Close()

func (*LikwidCollector) Init

func (m *LikwidCollector) Init(config json.RawMessage) error

func (*LikwidCollector) Initialized

func (c *LikwidCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*LikwidCollector) Name

func (c *LikwidCollector) Name() string

Name returns the name of the metric collector

func (*LikwidCollector) Parallel added in v0.6.0

func (c *LikwidCollector) Parallel() bool

Name returns the name of the metric collector

func (*LikwidCollector) Read

func (m *LikwidCollector) Read(interval time.Duration, output chan lp.CCMetric)

main read function taking multiple measurement rounds, each 'interval' seconds long

func (*LikwidCollector) ReadThread added in v0.6.4

func (m *LikwidCollector) ReadThread(interval time.Duration, output chan lp.CCMetric)

type LikwidCollectorConfig

type LikwidCollectorConfig struct {
	Eventsets      []LikwidCollectorEventsetConfig `json:"eventsets"`
	Metrics        []LikwidCollectorMetricConfig   `json:"globalmetrics,omitempty"`
	ForceOverwrite bool                            `json:"force_overwrite,omitempty"`
	InvalidToZero  bool                            `json:"invalid_to_zero,omitempty"`
	AccessMode     string                          `json:"access_mode,omitempty"`
	DaemonPath     string                          `json:"accessdaemon_path,omitempty"`
	LibraryPath    string                          `json:"liblikwid_path,omitempty"`
	LockfilePath   string                          `json:"lockfile_path,omitempty"`
}

type LikwidCollectorEventsetConfig

type LikwidCollectorEventsetConfig struct {
	Events  map[string]string             `json:"events"`
	Metrics []LikwidCollectorMetricConfig `json:"metrics"`
}

type LikwidCollectorMetricConfig

type LikwidCollectorMetricConfig struct {
	Name               string `json:"name"` // Name of the metric
	Calc               string `json:"calc"` // Calculation for the metric using
	Type               string `json:"type"` // Metric type (aka node, socket, cpu, ...)
	Publish            bool   `json:"publish"`
	SendCoreTotalVal   bool   `json:"send_core_total_values,omitempty"`
	SendSocketTotalVal bool   `json:"send_socket_total_values,omitempty"`
	SendNodeTotalVal   bool   `json:"send_node_total_values,omitempty"`
	Unit               string `json:"unit"` // Unit of metric if any
}

type LikwidEventsetConfig

type LikwidEventsetConfig struct {
	// contains filtered or unexported fields
}

type LikwidMetric

type LikwidMetric struct {
	// contains filtered or unexported fields
}

type LoadavgCollector

type LoadavgCollector struct {
	// contains filtered or unexported fields
}

func (*LoadavgCollector) Close

func (m *LoadavgCollector) Close()

func (*LoadavgCollector) Init

func (m *LoadavgCollector) Init(config json.RawMessage) error

func (*LoadavgCollector) Initialized

func (c *LoadavgCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*LoadavgCollector) Name

func (c *LoadavgCollector) Name() string

Name returns the name of the metric collector

func (*LoadavgCollector) Parallel added in v0.6.0

func (c *LoadavgCollector) Parallel() bool

Name returns the name of the metric collector

func (*LoadavgCollector) Read

func (m *LoadavgCollector) Read(interval time.Duration, output chan lp.CCMetric)

type LustreCollector

type LustreCollector struct {
	// contains filtered or unexported fields
}

func (*LustreCollector) Close

func (m *LustreCollector) Close()

func (*LustreCollector) Init

func (m *LustreCollector) Init(config json.RawMessage) error

func (*LustreCollector) Initialized

func (c *LustreCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*LustreCollector) Name

func (c *LustreCollector) Name() string

Name returns the name of the metric collector

func (*LustreCollector) Parallel added in v0.6.0

func (c *LustreCollector) Parallel() bool

Name returns the name of the metric collector

func (*LustreCollector) Read

func (m *LustreCollector) Read(interval time.Duration, output chan lp.CCMetric)

type LustreCollectorConfig

type LustreCollectorConfig struct {
	LCtlCommand        string   `json:"lctl_command,omitempty"`
	ExcludeMetrics     []string `json:"exclude_metrics,omitempty"`
	Sudo               bool     `json:"use_sudo,omitempty"`
	SendAbsoluteValues bool     `json:"send_abs_values,omitempty"`
	SendDerivedValues  bool     `json:"send_derived_values,omitempty"`
	SendDiffValues     bool     `json:"send_diff_values,omitempty"`
}

type LustreMetricDefinition

type LustreMetricDefinition struct {
	// contains filtered or unexported fields
}

type MemstatCollector

type MemstatCollector struct {
	// contains filtered or unexported fields
}

func (*MemstatCollector) Close

func (m *MemstatCollector) Close()

func (*MemstatCollector) Init

func (m *MemstatCollector) Init(config json.RawMessage) error

func (*MemstatCollector) Initialized

func (c *MemstatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*MemstatCollector) Name

func (c *MemstatCollector) Name() string

Name returns the name of the metric collector

func (*MemstatCollector) Parallel added in v0.6.0

func (c *MemstatCollector) Parallel() bool

Name returns the name of the metric collector

func (*MemstatCollector) Read

func (m *MemstatCollector) Read(interval time.Duration, output chan lp.CCMetric)

type MemstatCollectorConfig

type MemstatCollectorConfig struct {
	ExcludeMetrics []string `json:"exclude_metrics"`
	NodeStats      bool     `json:"node_stats,omitempty"`
	NumaStats      bool     `json:"numa_stats,omitempty"`
}

type MemstatCollectorNode

type MemstatCollectorNode struct {
	// contains filtered or unexported fields
}

type MemstatStats

type MemstatStats struct {
	// contains filtered or unexported fields
}

type MetricCollector

type MetricCollector interface {
	Name() string                      // Name of the metric collector
	Init(config json.RawMessage) error // Initialize metric collector
	Initialized() bool                 // Is metric collector initialized?
	Parallel() bool
	Read(duration time.Duration, output chan lp.CCMetric) // Read metrics from metric collector
	Close()                                               // Close / finish metric collector
}

type NUMAStatsCollector

type NUMAStatsCollector struct {
	// contains filtered or unexported fields
}

func (*NUMAStatsCollector) Close

func (m *NUMAStatsCollector) Close()

func (*NUMAStatsCollector) Init

func (m *NUMAStatsCollector) Init(config json.RawMessage) error

func (*NUMAStatsCollector) Initialized

func (c *NUMAStatsCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*NUMAStatsCollector) Name

func (c *NUMAStatsCollector) Name() string

Name returns the name of the metric collector

func (*NUMAStatsCollector) Parallel added in v0.6.0

func (c *NUMAStatsCollector) Parallel() bool

Name returns the name of the metric collector

func (*NUMAStatsCollector) Read

func (m *NUMAStatsCollector) Read(interval time.Duration, output chan lp.CCMetric)

type NUMAStatsCollectorTopolgy

type NUMAStatsCollectorTopolgy struct {
	// contains filtered or unexported fields
}

Non-Uniform Memory Access (NUMA) policy hit/miss statistics

numa_hit:

A process wanted to allocate memory from this node, and succeeded.

numa_miss:

A process wanted to allocate memory from another node,
but ended up with memory from this node.

numa_foreign:

A process wanted to allocate on this node,
but ended up with memory from another node.

local_node:

A process ran on this node's CPU,
and got memory from this node.

other_node:

A process ran on a different node's CPU
and got memory from this node.

interleave_hit:

Interleaving wanted to allocate from this node
and succeeded.

See: https://www.kernel.org/doc/html/latest/admin-guide/numastat.html

type NetstatCollector

type NetstatCollector struct {
	// contains filtered or unexported fields
}

func (*NetstatCollector) Close

func (m *NetstatCollector) Close()

func (*NetstatCollector) Init

func (m *NetstatCollector) Init(config json.RawMessage) error

func (*NetstatCollector) Initialized

func (c *NetstatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*NetstatCollector) Name

func (c *NetstatCollector) Name() string

Name returns the name of the metric collector

func (*NetstatCollector) Parallel added in v0.6.0

func (c *NetstatCollector) Parallel() bool

Name returns the name of the metric collector

func (*NetstatCollector) Read

func (m *NetstatCollector) Read(interval time.Duration, output chan lp.CCMetric)

type NetstatCollectorConfig

type NetstatCollectorConfig struct {
	IncludeDevices     []string `json:"include_devices"`
	SendAbsoluteValues bool     `json:"send_abs_values"`
	SendDerivedValues  bool     `json:"send_derived_values"`
}

type NetstatCollectorMetric

type NetstatCollectorMetric struct {
	// contains filtered or unexported fields
}

type Nfs3Collector

type Nfs3Collector struct {
	// contains filtered or unexported fields
}

func (*Nfs3Collector) Close

func (m *Nfs3Collector) Close()

func (*Nfs3Collector) Init

func (m *Nfs3Collector) Init(config json.RawMessage) error

func (*Nfs3Collector) MainInit

func (m *Nfs3Collector) MainInit(config json.RawMessage) error

func (*Nfs3Collector) Read

func (m *Nfs3Collector) Read(interval time.Duration, output chan lp.CCMetric)

type Nfs4Collector

type Nfs4Collector struct {
	// contains filtered or unexported fields
}

func (*Nfs4Collector) Close

func (m *Nfs4Collector) Close()

func (*Nfs4Collector) Init

func (m *Nfs4Collector) Init(config json.RawMessage) error

func (*Nfs4Collector) MainInit

func (m *Nfs4Collector) MainInit(config json.RawMessage) error

func (*Nfs4Collector) Read

func (m *Nfs4Collector) Read(interval time.Duration, output chan lp.CCMetric)

type NfsCollectorData

type NfsCollectorData struct {
	// contains filtered or unexported fields
}

type NfsIOStatCollector added in v0.6.3

type NfsIOStatCollector struct {
	// contains filtered or unexported fields
}

This contains all variables we need during execution and the variables defined by metricCollector (name, init, ...)

func (*NfsIOStatCollector) Close added in v0.6.3

func (m *NfsIOStatCollector) Close()

func (*NfsIOStatCollector) Init added in v0.6.3

func (m *NfsIOStatCollector) Init(config json.RawMessage) error

func (*NfsIOStatCollector) Initialized added in v0.6.3

func (c *NfsIOStatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*NfsIOStatCollector) Name added in v0.6.3

func (c *NfsIOStatCollector) Name() string

Name returns the name of the metric collector

func (*NfsIOStatCollector) Parallel added in v0.6.3

func (c *NfsIOStatCollector) Parallel() bool

Name returns the name of the metric collector

func (*NfsIOStatCollector) Read added in v0.6.3

func (m *NfsIOStatCollector) Read(interval time.Duration, output chan lp.CCMetric)

type NfsIOStatCollectorConfig added in v0.6.3

type NfsIOStatCollectorConfig struct {
	ExcludeMetrics          []string `json:"exclude_metrics,omitempty"`
	ExcludeFilesystem       []string `json:"exclude_filesystem,omitempty"`
	UseServerAddressAsSType bool     `json:"use_server_as_stype,omitempty"`
}

These are the fields we read from the JSON configuration

type NvidiaCollector

type NvidiaCollector struct {
	// contains filtered or unexported fields
}

func (*NvidiaCollector) CatchPanic

func (m *NvidiaCollector) CatchPanic()

func (*NvidiaCollector) Close

func (m *NvidiaCollector) Close()

func (*NvidiaCollector) Init

func (m *NvidiaCollector) Init(config json.RawMessage) error

func (*NvidiaCollector) Initialized

func (c *NvidiaCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*NvidiaCollector) Name

func (c *NvidiaCollector) Name() string

Name returns the name of the metric collector

func (*NvidiaCollector) Parallel added in v0.6.0

func (c *NvidiaCollector) Parallel() bool

Name returns the name of the metric collector

func (*NvidiaCollector) Read

func (m *NvidiaCollector) Read(interval time.Duration, output chan lp.CCMetric)

type NvidiaCollectorConfig

type NvidiaCollectorConfig struct {
	ExcludeMetrics        []string `json:"exclude_metrics,omitempty"`
	ExcludeDevices        []string `json:"exclude_devices,omitempty"`
	AddPciInfoTag         bool     `json:"add_pci_info_tag,omitempty"`
	UsePciInfoAsTypeId    bool     `json:"use_pci_info_as_type_id,omitempty"`
	AddUuidMeta           bool     `json:"add_uuid_meta,omitempty"`
	AddBoardNumberMeta    bool     `json:"add_board_number_meta,omitempty"`
	AddSerialMeta         bool     `json:"add_serial_meta,omitempty"`
	ProcessMigDevices     bool     `json:"process_mig_devices,omitempty"`
	UseUuidForMigDevices  bool     `json:"use_uuid_for_mig_device,omitempty"`
	UseSliceForMigDevices bool     `json:"use_slice_for_mig_device,omitempty"`
}

type NvidiaCollectorDevice

type NvidiaCollectorDevice struct {
	// contains filtered or unexported fields
}

type RAPLCollector added in v0.6.3

type RAPLCollector struct {
	RAPLZoneInfo []RAPLZoneInfo
	// contains filtered or unexported fields
}

func (*RAPLCollector) Close added in v0.6.3

func (m *RAPLCollector) Close()

Close closes running average power limit (RAPL) metric collector

func (*RAPLCollector) Init added in v0.6.3

func (m *RAPLCollector) Init(config json.RawMessage) error

Init initializes the running average power limit (RAPL) collector

func (*RAPLCollector) Initialized added in v0.6.3

func (c *RAPLCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*RAPLCollector) Name added in v0.6.3

func (c *RAPLCollector) Name() string

Name returns the name of the metric collector

func (*RAPLCollector) Parallel added in v0.6.3

func (c *RAPLCollector) Parallel() bool

Name returns the name of the metric collector

func (*RAPLCollector) Read added in v0.6.3

func (m *RAPLCollector) Read(interval time.Duration, output chan lp.CCMetric)

Read reads running average power limit (RAPL) monitoring attributes for all initialized zones See: https://www.kernel.org/doc/html/latest/power/powercap/powercap.html#monitoring-attributes

type RAPLZoneInfo added in v0.6.3

type RAPLZoneInfo struct {
	// contains filtered or unexported fields
}

running average power limit (RAPL) monitoring attributes for a zone

type RocmSmiCollector added in v0.6.0

type RocmSmiCollector struct {
	// contains filtered or unexported fields
}

func (*RocmSmiCollector) Close added in v0.6.0

func (m *RocmSmiCollector) Close()

Close metric collector: close network connection, close files, close libraries, ... Called once by the collector manager

func (*RocmSmiCollector) Init added in v0.6.0

func (m *RocmSmiCollector) Init(config json.RawMessage) error

Init initializes the sample collector Called once by the collector manager All tags, meta data tags and metrics that do not change over the runtime should be set here

func (*RocmSmiCollector) Initialized added in v0.6.0

func (c *RocmSmiCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*RocmSmiCollector) Name added in v0.6.0

func (c *RocmSmiCollector) Name() string

Name returns the name of the metric collector

func (*RocmSmiCollector) Parallel added in v0.6.0

func (c *RocmSmiCollector) Parallel() bool

Name returns the name of the metric collector

func (*RocmSmiCollector) Read added in v0.6.0

func (m *RocmSmiCollector) Read(interval time.Duration, output chan lp.CCMetric)

Read collects all metrics belonging to the sample collector and sends them through the output channel to the collector manager

type RocmSmiCollectorConfig added in v0.6.0

type RocmSmiCollectorConfig struct {
	ExcludeMetrics     []string `json:"exclude_metrics,omitempty"`
	ExcludeDevices     []string `json:"exclude_devices,omitempty"`
	AddPciInfoTag      bool     `json:"add_pci_info_tag,omitempty"`
	UsePciInfoAsTypeId bool     `json:"use_pci_info_as_type_id,omitempty"`
	AddSerialMeta      bool     `json:"add_serial_meta,omitempty"`
}

type RocmSmiCollectorDevice added in v0.6.0

type RocmSmiCollectorDevice struct {
	// contains filtered or unexported fields
}

type SampleCollector

type SampleCollector struct {
	// contains filtered or unexported fields
}

This contains all variables we need during execution and the variables defined by metricCollector (name, init, ...)

func (*SampleCollector) Close

func (m *SampleCollector) Close()

Close metric collector: close network connection, close files, close libraries, ... Called once by the collector manager

func (*SampleCollector) Init

func (m *SampleCollector) Init(config json.RawMessage) error

Init initializes the sample collector Called once by the collector manager All tags, meta data tags and metrics that do not change over the runtime should be set here

func (*SampleCollector) Initialized

func (c *SampleCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*SampleCollector) Name

func (c *SampleCollector) Name() string

Name returns the name of the metric collector

func (*SampleCollector) Parallel added in v0.6.0

func (c *SampleCollector) Parallel() bool

Name returns the name of the metric collector

func (*SampleCollector) Read

func (m *SampleCollector) Read(interval time.Duration, output chan lp.CCMetric)

Read collects all metrics belonging to the sample collector and sends them through the output channel to the collector manager

type SampleCollectorConfig

type SampleCollectorConfig struct {
	Interval string `json:"interval"`
}

These are the fields we read from the JSON configuration

type SampleTimerCollector

type SampleTimerCollector struct {
	// contains filtered or unexported fields
}

This contains all variables we need during execution and the variables defined by metricCollector (name, init, ...)

func (*SampleTimerCollector) Close

func (m *SampleTimerCollector) Close()

func (*SampleTimerCollector) Init

func (m *SampleTimerCollector) Init(name string, config json.RawMessage) error

func (*SampleTimerCollector) Initialized

func (c *SampleTimerCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*SampleTimerCollector) Name

func (c *SampleTimerCollector) Name() string

Name returns the name of the metric collector

func (*SampleTimerCollector) Parallel added in v0.6.0

func (c *SampleTimerCollector) Parallel() bool

Name returns the name of the metric collector

func (*SampleTimerCollector) Read

func (m *SampleTimerCollector) Read(interval time.Duration, output chan lp.CCMetric)

func (*SampleTimerCollector) ReadMetrics

func (m *SampleTimerCollector) ReadMetrics(timestamp time.Time)

This function is called at each interval timer tick

type SampleTimerCollectorConfig

type SampleTimerCollectorConfig struct {
	Interval string `json:"interval"`
}

These are the fields we read from the JSON configuration

type SchedstatCollector added in v0.6.2

type SchedstatCollector struct {
	// contains filtered or unexported fields
}

This contains all variables we need during execution and the variables defined by metricCollector (name, init, ...)

func (*SchedstatCollector) Close added in v0.6.2

func (m *SchedstatCollector) Close()

Close metric collector: close network connection, close files, close libraries, ... Called once by the collector manager

func (*SchedstatCollector) Init added in v0.6.2

func (m *SchedstatCollector) Init(config json.RawMessage) error

Init initializes the sample collector Called once by the collector manager All tags, meta data tags and metrics that do not change over the runtime should be set here

func (*SchedstatCollector) Initialized added in v0.6.2

func (c *SchedstatCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*SchedstatCollector) Name added in v0.6.2

func (c *SchedstatCollector) Name() string

Name returns the name of the metric collector

func (*SchedstatCollector) Parallel added in v0.6.2

func (c *SchedstatCollector) Parallel() bool

Name returns the name of the metric collector

func (*SchedstatCollector) ParseProcLine added in v0.6.2

func (m *SchedstatCollector) ParseProcLine(linefields []string, tags map[string]string, output chan lp.CCMetric, now time.Time, tsdelta time.Duration)

func (*SchedstatCollector) Read added in v0.6.2

func (m *SchedstatCollector) Read(interval time.Duration, output chan lp.CCMetric)

Read collects all metrics belonging to the sample collector and sends them through the output channel to the collector manager

type SchedstatCollectorConfig added in v0.6.2

type SchedstatCollectorConfig struct {
	ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
}

These are the fields we read from the JSON configuration

type SelfCollector added in v0.6.2

type SelfCollector struct {
	// contains filtered or unexported fields
}

func (*SelfCollector) Close added in v0.6.2

func (m *SelfCollector) Close()

func (*SelfCollector) Init added in v0.6.2

func (m *SelfCollector) Init(config json.RawMessage) error

func (*SelfCollector) Initialized added in v0.6.2

func (c *SelfCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*SelfCollector) Name added in v0.6.2

func (c *SelfCollector) Name() string

Name returns the name of the metric collector

func (*SelfCollector) Parallel added in v0.6.2

func (c *SelfCollector) Parallel() bool

Name returns the name of the metric collector

func (*SelfCollector) Read added in v0.6.2

func (m *SelfCollector) Read(interval time.Duration, output chan lp.CCMetric)

type SelfCollectorConfig added in v0.6.2

type SelfCollectorConfig struct {
	MemStats   bool `json:"read_mem_stats"`
	GoRoutines bool `json:"read_goroutines"`
	CgoCalls   bool `json:"read_cgo_calls"`
	Rusage     bool `json:"read_rusage"`
}

type TempCollector

type TempCollector struct {
	// contains filtered or unexported fields
}

func (*TempCollector) Close

func (m *TempCollector) Close()

func (*TempCollector) Init

func (m *TempCollector) Init(config json.RawMessage) error

func (*TempCollector) Initialized

func (c *TempCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*TempCollector) Name

func (c *TempCollector) Name() string

Name returns the name of the metric collector

func (*TempCollector) Parallel added in v0.6.0

func (c *TempCollector) Parallel() bool

Name returns the name of the metric collector

func (*TempCollector) Read

func (m *TempCollector) Read(interval time.Duration, output chan lp.CCMetric)

type TempCollectorSensor

type TempCollectorSensor struct {
	// contains filtered or unexported fields
}

type TopProcsCollector

type TopProcsCollector struct {
	// contains filtered or unexported fields
}

func (*TopProcsCollector) Close

func (m *TopProcsCollector) Close()

func (*TopProcsCollector) Init

func (m *TopProcsCollector) Init(config json.RawMessage) error

func (*TopProcsCollector) Initialized

func (c *TopProcsCollector) Initialized() bool

Initialized indicates whether the metric collector has been initialized

func (*TopProcsCollector) Name

func (c *TopProcsCollector) Name() string

Name returns the name of the metric collector

func (*TopProcsCollector) Parallel added in v0.6.0

func (c *TopProcsCollector) Parallel() bool

Name returns the name of the metric collector

func (*TopProcsCollector) Read

func (m *TopProcsCollector) Read(interval time.Duration, output chan lp.CCMetric)

type TopProcsCollectorConfig

type TopProcsCollectorConfig struct {
	Num_procs int `json:"num_procs"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL