kernel

package
v0.0.0-...-0fce7b6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 8 Imported by: 0

README

Kernel Input Plugin

This plugin is only available on Linux.

The kernel plugin gathers info about the kernel that doesn't fit into other plugins. In general, it is the statistics available in /proc/stat that are not covered by other plugins as well as the value of /proc/sys/kernel/random/entropy_avail

The metrics are documented in man proc under the /proc/stat section. The metrics are documented in man 4 random under the /proc/stat section.



/proc/sys/kernel/random/entropy_avail
Contains the value of available entropy

/proc/stat
kernel/system statistics. Varies with architecture. Common entries include:

page 5741 1808
The number of pages the system paged in and the number that were paged out (from disk).

swap 1 0
The number of swap pages that have been brought in and out.

intr 1462898
This line shows counts of interrupts serviced since boot time, for each of
the possible system interrupts. The first column is the total of all
interrupts serviced; each subsequent column is the total for a particular interrupt.

ctxt 115315
The number of context switches that the system underwent.

btime 769041601
boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

processes 86031
Number of forks since boot.
Configuration:
# Get kernel statistics from /proc/stat
[[inputs.kernel]]
  # no configuration
Measurements & Fields:
  • kernel
    • boot_time (integer, seconds since epoch, btime)
    • context_switches (integer, ctxt)
    • disk_pages_in (integer, page (0))
    • disk_pages_out (integer, page (1))
    • interrupts (integer, intr)
    • processes_forked (integer, processes)
    • entropy_avail (integer, entropy_available)
Tags:

None

Example Output:
$ telegraf --config ~/ws/telegraf.conf --input-filter kernel --test
* Plugin: kernel, Collection 1
> kernel entropy_available=2469i,boot_time=1457505775i,context_switches=2626618i,disk_pages_in=5741i,disk_pages_out=1808i,interrupts=1472736i,processes_forked=10673i 1457613402960879816

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kernel

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

func (*Kernel) Description

func (k *Kernel) Description() string

func (*Kernel) Gather

func (k *Kernel) Gather(acc telegraf.Accumulator) error

func (*Kernel) SampleConfig

func (k *Kernel) SampleConfig() string

Jump to

Keyboard shortcuts

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