Docs » Integrations Guide » Integrations Reference » Expvar

../../_images/integration_expvar.png Expvar πŸ”—

DESCRIPTION πŸ”—

expvar is a standard Go package for exposing variables at an HTTP endpoint in JSON format. The name expvar is derived from expose variables. The default HTTP endpoint path is /debug/vars. An expvar instrumented Go process exposes variables memstat and cmdline out of the box by default. memstat contains statistics about memory allocation and cmdline has the command that started the process.

The SignalFx Smart Agent monitor expvar scrapes expvar variables and exports them as metrics to SignalFx.

REQUIREMENTS AND DEPENDENCIES πŸ”—

Software Version
Go 1+

INSTALLATION πŸ”—

Install the latest version of the SignalFx Smart Agent as described here.

CONFIGURATION πŸ”—

Find the SignalFx Smart Agent configuration file agent.yaml. Edit it and configure the expvar monitor as described here.

USAGE πŸ”—

Sample of built-in dashboard in SignalFx:

../../_images/expvar_processes_memory_dashboard.pngProcesses Memory

../../_images/expvar_process_memory_dashboard.pngProcess Memory

METRICS πŸ”—

Metric Name Description Type
counter.memstats.by_size.frees Cumulative count of heap objects freed in a class counter
counter.memstats.by_size.mallocs Cumulative count of heap objects allocated in a class counter
counter.memstats.by_size.size The maximum byte size of a class as identified by dimension class counter
counter.memstats.frees Cumulative count of heap objects freed counter
counter.memstats.lookups Number of pointer lookups performed by the runtime counter
counter.memstats.mallocs Cumulative count of heap objects allocated counter
counter.memstats.num_forced_gc Number of forced GC cycles counter
counter.memstats.num_gc Number of completed GC cycles counter
counter.memstats.pause_total_ns Cumulative nanoseconds of GC pauses counter
counter.memstats.total_alloc Cumulative bytes allocated for heap objects counter
gauge.memstats.alloc Bytes of allocated heap objects gauge
gauge.memstats.buck_hash_sys Bytes of memory in profiling bucket hash tables gauge
gauge.memstats.debug_gc memstats.debug_gc is currently unused gauge
gauge.memstats.enable_gc Id GC enabled boolean gauge
gauge.memstats.gc_sys Bytes of memory in garbage collection metadata gauge
gauge.memstats.gccpu_fraction The fraction CPU time used by the GC gauge
gauge.memstats.heap_alloc Bytes of allocated heap objects gauge
gauge.memstats.heap_idle Bytes in idle (unused) spans gauge
gauge.memstats.heap_inuse Bytes in in-use spans gauge
gauge.memstats.heap_objects Number of allocated heap objects gauge
gauge.memstats.heap_released Bytes of physical memory returned to the OS gauge
gauge.memstats.heap_sys Bytes of heap memory obtained from the OS gauge
gauge.memstats.last_gc The time the last garbage collection finished gauge
gauge.memstats.m_cache_inuse Bytes of allocated mcache structures gauge
gauge.memstats.m_cache_sys Bytes of memory obtained from the OS for mcache structures gauge
gauge.memstats.m_span_inuse Bytes of allocated mspan structures gauge
gauge.memstats.m_span_sys Bytes of memory obtained from the OS for mspan gauge
gauge.memstats.most_recent_gc_pause_end Most recent GC pause end time gauge
gauge.memstats.most_recent_gc_pause_ns Most recent GC stop-the-world pause time in nanoseconds gauge
gauge.memstats.next_gc Target heap size of the next GC cycle gauge
gauge.memstats.other_sys Bytes of memory in miscellaneous off-heap runtime allocations gauge
gauge.memstats.stack_inuse Bytes in stack spans gauge
gauge.memstats.stack_sys Bytes of stack memory obtained from the OS gauge
gauge.memstats.sys total bytes of memory obtained from the OS gauge

counter.memstats.by_size.frees πŸ”—

counter

Cumulative count of heap objects freed in a class. The class is identified by dimension class and it is as described for metric memstats.by_size.size

counter.memstats.by_size.mallocs πŸ”—

counter

Cumulative count of heap objects allocated in a class. The class is identified by dimension class and it is as described for metric memstats.by_size.size

counter.memstats.by_size.size πŸ”—

counter

The maximum byte size of a class as identified by dimension class. It is the class interval upper limit. The values of dimension class are numbers between 0 and 60 inclusive. Consecutive classes are of consecutive dimension class values. The lower limit of a class is the upper limit of the consecutive class below. Metrics memstats.by_size.size, memstats.by_size.mallocs and memstats.by_size.frees of the same class are related

counter.memstats.frees πŸ”—

counter

Cumulative count of heap objects freed

counter.memstats.lookups πŸ”—

counter

Number of pointer lookups performed by the runtime

counter.memstats.mallocs πŸ”—

counter

Cumulative count of heap objects allocated

counter.memstats.num_forced_gc πŸ”—

counter

Number of GC cycles that were forced by the application calling the GC function

counter.memstats.num_gc πŸ”—

counter

Number of completed GC cycles

counter.memstats.pause_total_ns πŸ”—

counter

Cumulative nanoseconds in GC stop-the-world pauses since the program started

counter.memstats.total_alloc πŸ”—

counter

Cumulative bytes allocated for heap objects

gauge.memstats.alloc πŸ”—

gauge

Bytes of allocated heap objects. Same as memstats.heap_alloc

gauge.memstats.buck_hash_sys πŸ”—

gauge

Bytes of memory in profiling bucket hash tables

gauge.memstats.debug_gc πŸ”—

gauge

memstats.debug_gc is currently unused

gauge.memstats.enable_gc πŸ”—

gauge

Boolean that indicates that GC is enabled. It is always true, even if GOGC=off

gauge.memstats.gc_sys πŸ”—

gauge

Bytes of memory in garbage collection metadata

gauge.memstats.gccpu_fraction πŸ”—

gauge

The fraction of this program’s available CPU time used by the GC since the program started

gauge.memstats.heap_alloc πŸ”—

gauge

Bytes of allocated heap objects

gauge.memstats.heap_idle πŸ”—

gauge

Bytes in idle (unused) spans

gauge.memstats.heap_inuse πŸ”—

gauge

Bytes in in-use spans

gauge.memstats.heap_objects πŸ”—

gauge

Number of allocated heap objects

gauge.memstats.heap_released πŸ”—

gauge

Bytes of physical memory returned to the OS

gauge.memstats.heap_sys πŸ”—

gauge

Bytes of heap memory obtained from the OS

gauge.memstats.last_gc πŸ”—

gauge

The time the last garbage collection finished, as nanoseconds since 1970 (the UNIX epoch)

gauge.memstats.m_cache_inuse πŸ”—

gauge

Bytes of allocated mcache structures

gauge.memstats.m_cache_sys πŸ”—

gauge

Bytes of memory obtained from the OS for mcache structures

gauge.memstats.m_span_inuse πŸ”—

gauge

Bytes of allocated mspan structures

gauge.memstats.m_span_sys πŸ”—

gauge

Bytes of memory obtained from the OS for mspan

gauge.memstats.most_recent_gc_pause_end πŸ”—

gauge

Most recent GC pause end time, as nanoseconds since 1970 (the UNIX epoch)

gauge.memstats.most_recent_gc_pause_ns πŸ”—

gauge

Most recent GC stop-the-world pause time in nanoseconds

gauge.memstats.next_gc πŸ”—

gauge

Target heap size of the next GC cycle

gauge.memstats.other_sys πŸ”—

gauge

Bytes of memory in miscellaneous off-heap runtime allocations

gauge.memstats.stack_inuse πŸ”—

gauge

Bytes in stack spans

gauge.memstats.stack_sys πŸ”—

gauge

Bytes of stack memory obtained from the OS

gauge.memstats.sys πŸ”—

gauge

total bytes of memory obtained from the OS