process

package
v6.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package process collects metrics about the running processes using information from the operating system.

An example event looks as following:

{
  "@timestamp": "2016-05-25T20:57:51.854Z",
  "beat": {
    "hostname": "host.example.com",
    "name": "host.example.com"
  },
  "metricset": {
    "module": "system",
    "name": "process",
    "rtt": 12269
  },
  "system": {
    "process": {
      "cmdline": "/System/Library/CoreServices/ReportCrash",
      "cpu": {
        "start_time": "22:57",
        "total_p": 0
      },
      "mem": {
        "rss": 27123712,
        "rss_pct": 0.0016,
        "share": 0,
        "size": 2577522688
      },
      "name": "ReportCrash",
      "pid": 97801,
      "ppid": 1,
      "state": "running",
      "username": "elastic"
    }
  },
  "type": "metricsets"
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(base mb.BaseMetricSet) (mb.MetricSet, error)

New creates and returns a new MetricSet.

Types

type Config

type Config struct {
	Procs           []string                 `config:"processes"`
	Cgroups         *bool                    `config:"process.cgroups.enabled"`
	EnvWhitelist    []string                 `config:"process.env.whitelist"`
	CacheCmdLine    bool                     `config:"process.cmdline.cache.enabled"`
	IncludeTop      process.IncludeTopConfig `config:"process.include_top_n"`
	IncludeCPUTicks bool                     `config:"process.include_cpu_ticks"`
	CPUTicks        *bool                    `config:"cpu_ticks"` // Deprecated
}

func (Config) Validate

func (c Config) Validate() error

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
	// contains filtered or unexported fields
}

MetricSet that fetches process metrics.

func (*MetricSet) Fetch

func (m *MetricSet) Fetch() ([]common.MapStr, error)

Fetch fetches metrics for all processes. It iterates over each PID and collects process metadata, CPU metrics, and memory metrics.

Jump to

Keyboard shortcuts

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