Documentation

Index

Constants

View Source
const Type configmodels.Type = "hostmetricsreceiver"

    Type is the component type name.

    Variables

      L contains the possible metric labels that can be used. L is an alias for Labels.

      View Source
      var LabelCPUState = struct {
      	Idle      string
      	Interrupt string
      	Nice      string
      	Softirq   string
      	Steal     string
      	System    string
      	User      string
      	Wait      string
      }{
      	"idle",
      	"interrupt",
      	"nice",
      	"softirq",
      	"steal",
      	"system",
      	"user",
      	"wait",
      }

        LabelCPUState are the possible values that the label "cpu.state" can have.

        View Source
        var LabelDiskDirection = struct {
        	Read  string
        	Write string
        }{
        	"read",
        	"write",
        }

          LabelDiskDirection are the possible values that the label "disk.direction" can have.

          View Source
          var LabelFilesystemState = struct {
          	Free     string
          	Reserved string
          	Used     string
          }{
          	"free",
          	"reserved",
          	"used",
          }

            LabelFilesystemState are the possible values that the label "filesystem.state" can have.

            View Source
            var LabelMemState = struct {
            	Buffered          string
            	Cached            string
            	Inactive          string
            	Free              string
            	SlabReclaimable   string
            	SlabUnreclaimable string
            	Used              string
            }{
            	"buffered",
            	"cached",
            	"inactive",
            	"free",
            	"slab_reclaimable",
            	"slab_unreclaimable",
            	"used",
            }

              LabelMemState are the possible values that the label "mem.state" can have.

              View Source
              var LabelNetworkDirection = struct {
              	Receive  string
              	Transmit string
              }{
              	"receive",
              	"transmit",
              }

                LabelNetworkDirection are the possible values that the label "network.direction" can have.

                View Source
                var LabelNetworkProtocol = struct {
                	Tcp string
                }{
                	"tcp",
                }

                  LabelNetworkProtocol are the possible values that the label "network.protocol" can have.

                  View Source
                  var LabelPagingDirection = struct {
                  	PageIn  string
                  	PageOut string
                  }{
                  	"page_in",
                  	"page_out",
                  }

                    LabelPagingDirection are the possible values that the label "paging.direction" can have.

                    View Source
                    var LabelPagingState = struct {
                    	Cached string
                    	Free   string
                    	Used   string
                    }{
                    	"cached",
                    	"free",
                    	"used",
                    }

                      LabelPagingState are the possible values that the label "paging.state" can have.

                      View Source
                      var LabelPagingType = struct {
                      	Major string
                      	Minor string
                      }{
                      	"major",
                      	"minor",
                      }

                        LabelPagingType are the possible values that the label "paging.type" can have.

                        View Source
                        var LabelProcessDirection = struct {
                        	Read  string
                        	Write string
                        }{
                        	"read",
                        	"write",
                        }

                          LabelProcessDirection are the possible values that the label "process.direction" can have.

                          View Source
                          var LabelProcessState = struct {
                          	System string
                          	User   string
                          	Wait   string
                          }{
                          	"system",
                          	"user",
                          	"wait",
                          }

                            LabelProcessState are the possible values that the label "process.state" can have.

                            View Source
                            var LabelProcessesStatus = struct {
                            	Blocked string
                            	Running string
                            }{
                            	"blocked",
                            	"running",
                            }

                              LabelProcessesStatus are the possible values that the label "processes.status" can have.

                              View Source
                              var Labels = struct {
                              	// Cpu (CPU number starting at 0.)
                              	Cpu string
                              	// CPUState (Breakdown of CPU usage by type.)
                              	CPUState string
                              	// DiskDevice (Name of the disk.)
                              	DiskDevice string
                              	// DiskDirection (Direction of flow of bytes/opertations (read or write).)
                              	DiskDirection string
                              	// FilesystemDevice (Identifier of the filesystem.)
                              	FilesystemDevice string
                              	// FilesystemMode (Mountpoint mode such "ro", "rw", etc.)
                              	FilesystemMode string
                              	// FilesystemMountpoint (Mountpoint path.)
                              	FilesystemMountpoint string
                              	// FilesystemState (Breakdown of filesystem usage by type.)
                              	FilesystemState string
                              	// FilesystemType (Filesystem type, such as, "ext4", "tmpfs", etc.)
                              	FilesystemType string
                              	// MemState (Breakdown of memory usage by type.)
                              	MemState string
                              	// NetworkDevice (Name of the network interface.)
                              	NetworkDevice string
                              	// NetworkDirection (Direction of flow of bytes/opertations (receive or transmit).)
                              	NetworkDirection string
                              	// NetworkProtocol (Network protocol, e.g. TCP or UDP.)
                              	NetworkProtocol string
                              	// NetworkState (State of the network connection.)
                              	NetworkState string
                              	// PagingDevice (Name of the page file.)
                              	PagingDevice string
                              	// PagingDirection (Page In or Page Out.)
                              	PagingDirection string
                              	// PagingState (Breakdown of paging usage by type.)
                              	PagingState string
                              	// PagingType (Type of fault.)
                              	PagingType string
                              	// ProcessDirection (Direction of flow of bytes (read or write).)
                              	ProcessDirection string
                              	// ProcessState (Breakdown of CPU usage by type.)
                              	ProcessState string
                              	// ProcessesStatus (Breakdown status of the processes.)
                              	ProcessesStatus string
                              }{
                              	"cpu",
                              	"state",
                              	"device",
                              	"direction",
                              	"device",
                              	"mode",
                              	"mountpoint",
                              	"state",
                              	"type",
                              	"state",
                              	"device",
                              	"direction",
                              	"protocol",
                              	"state",
                              	"device",
                              	"direction",
                              	"state",
                              	"type",
                              	"direction",
                              	"state",
                              	"status",
                              }

                                Labels contains the possible metric labels that can be used.

                                  M contains a set of methods for each metric that help with manipulating those metrics. M is an alias for Metrics

                                  View Source
                                  var Metrics = &metricStruct{
                                  	&metricImpl{
                                  		"process.cpu.time",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("process.cpu.time")
                                  			metric.SetDescription("Total CPU seconds broken down by different states.")
                                  			metric.SetUnit("s")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleSum)
                                  			metric.DoubleSum().SetIsMonotonic(true)
                                  			metric.DoubleSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"process.disk.io",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("process.disk.io")
                                  			metric.SetDescription("Disk bytes transferred.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"process.memory.physical_usage",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("process.memory.physical_usage")
                                  			metric.SetDescription("The amount of physical memory in use.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"process.memory.virtual_usage",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("process.memory.virtual_usage")
                                  			metric.SetDescription("Virtual memory size.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.cpu.load_average.15m",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.cpu.load_average.15m")
                                  			metric.SetDescription("Average CPU Load over 15 minutes.")
                                  			metric.SetUnit("1")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleGauge)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.cpu.load_average.1m",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.cpu.load_average.1m")
                                  			metric.SetDescription("Average CPU Load over 1 minute.")
                                  			metric.SetUnit("1")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleGauge)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.cpu.load_average.5m",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.cpu.load_average.5m")
                                  			metric.SetDescription("Average CPU Load over 5 minutes.")
                                  			metric.SetUnit("1")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleGauge)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.cpu.time",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.cpu.time")
                                  			metric.SetDescription("Total CPU seconds broken down by different states.")
                                  			metric.SetUnit("s")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleSum)
                                  			metric.DoubleSum().SetIsMonotonic(true)
                                  			metric.DoubleSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.io",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.io")
                                  			metric.SetDescription("Disk bytes transferred.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.io_time",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.io_time")
                                  			metric.SetDescription("Time disk spent activated. On Windows, this is calculated as the inverse of disk idle time.")
                                  			metric.SetUnit("s")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleSum)
                                  			metric.DoubleSum().SetIsMonotonic(true)
                                  			metric.DoubleSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.merged",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.merged")
                                  			metric.SetDescription("The number of disk reads merged into single physical disk access operations.")
                                  			metric.SetUnit("{operations}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.operation_time",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.operation_time")
                                  			metric.SetDescription("Time spent in disk operations.")
                                  			metric.SetUnit("s")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleSum)
                                  			metric.DoubleSum().SetIsMonotonic(true)
                                  			metric.DoubleSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.operations",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.operations")
                                  			metric.SetDescription("Disk operations count.")
                                  			metric.SetUnit("{operations}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.pending_operations",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.pending_operations")
                                  			metric.SetDescription("The queue size of pending I/O operations.")
                                  			metric.SetUnit("{operations}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.disk.weighted_io_time",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.disk.weighted_io_time")
                                  			metric.SetDescription("Time disk spent activated multiplied by the queue length.")
                                  			metric.SetUnit("s")
                                  			metric.SetDataType(pdata.MetricDataTypeDoubleSum)
                                  			metric.DoubleSum().SetIsMonotonic(true)
                                  			metric.DoubleSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.filesystem.inodes.usage",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.filesystem.inodes.usage")
                                  			metric.SetDescription("FileSystem inodes used.")
                                  			metric.SetUnit("{inodes}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.filesystem.usage",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.filesystem.usage")
                                  			metric.SetDescription("Filesystem bytes used.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.memory.usage",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.memory.usage")
                                  			metric.SetDescription("Bytes of memory in use.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.network.connections",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.network.connections")
                                  			metric.SetDescription("The number of connections.")
                                  			metric.SetUnit("{connections}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.network.dropped",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.network.dropped")
                                  			metric.SetDescription("The number of packets dropped.")
                                  			metric.SetUnit("{packets}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.network.errors",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.network.errors")
                                  			metric.SetDescription("The number of errors encountered.")
                                  			metric.SetUnit("{errors}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.network.io",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.network.io")
                                  			metric.SetDescription("The number of bytes transmitted and received.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.network.packets",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.network.packets")
                                  			metric.SetDescription("The number of packets transferred.")
                                  			metric.SetUnit("{packets}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.paging.faults",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.paging.faults")
                                  			metric.SetDescription("The number of page faults.")
                                  			metric.SetUnit("{faults}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.paging.operations",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.paging.operations")
                                  			metric.SetDescription("The number of paging operations.")
                                  			metric.SetUnit("{operations}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.paging.usage",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.paging.usage")
                                  			metric.SetDescription("Swap (unix) or pagefile (windows) usage.")
                                  			metric.SetUnit("By")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.processes.count",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.processes.count")
                                  			metric.SetDescription("Total number of processes in each state.")
                                  			metric.SetUnit("{processes}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(false)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  	&metricImpl{
                                  		"system.processes.created",
                                  		func(metric pdata.Metric) {
                                  			metric.SetName("system.processes.created")
                                  			metric.SetDescription("Total number of created processes.")
                                  			metric.SetUnit("{processes}")
                                  			metric.SetDataType(pdata.MetricDataTypeIntSum)
                                  			metric.IntSum().SetIsMonotonic(true)
                                  			metric.IntSum().SetAggregationTemporality(pdata.AggregationTemporalityCumulative)
                                  		},
                                  	},
                                  }

                                    Metrics contains a set of methods for each metric that help with manipulating those metrics.

                                    Functions

                                    This section is empty.

                                    Types

                                    type MetricIntf

                                    type MetricIntf interface {
                                    	Name() string
                                    	New() pdata.Metric
                                    	Init(metric pdata.Metric)
                                    }

                                      MetricIntf is an interface to generically interact with generated metric.