mirror of https://github.com/divan/expvarmon.git
Changed default vars to include PauseNs
This commit is contained in:
parent
3ebcfb6e26
commit
b9177219e3
|
@ -88,7 +88,7 @@ If you need to monitor more (or less) vars, you can specify them with -vars comm
|
||||||
-i=5s: Polling interval
|
-i=5s: Polling interval
|
||||||
-ports="": Ports/URLs for accessing services expvars (start-end,port2,port3,https://host:port)
|
-ports="": Ports/URLs for accessing services expvars (start-end,port2,port3,https://host:port)
|
||||||
-self=false: Monitor itself
|
-self=false: Monitor itself
|
||||||
-vars="mem:memstats.Alloc,mem:memstats.Sys,mem:memstats.HeapAlloc,mem:memstats.HeapInuse,memstats.EnableGC,memstats.NumGC,duration:memstats.PauseTotalNs": Vars to monitor (comma-separated)
|
-vars="mem:memstats.Alloc,mem:memstats.Sys,mem:memstats.HeapAlloc,mem:memstats.HeapInuse,duration:memstats.PauseNs,duration:memstats.PauseTotalNs": Vars to monitor (comma-separated)
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
./expvarmon -ports="80"
|
./expvarmon -ports="80"
|
||||||
|
@ -115,7 +115,7 @@ Expvarmon doesn't restrict you to monitor only memstats. You can publish your ow
|
||||||
|
|
||||||
Notation is dot-separated, for example: **memstats.Alloc** for .MemStats.Alloc field. Quick link to runtime.MemStats documentation: http://golang.org/pkg/runtime/#MemStats
|
Notation is dot-separated, for example: **memstats.Alloc** for .MemStats.Alloc field. Quick link to runtime.MemStats documentation: http://golang.org/pkg/runtime/#MemStats
|
||||||
|
|
||||||
Expvar allows to export only basic types - structs, ints, floats, bools and strings. Ints are used for sparklines, and displayed as is. But you can specify modifier to make sure it will be rendered properly.
|
Expvar allows to export only basic types - structs, ints, floats, arrays (int or float), bools and strings. For arrays, average will be calculated. Ints are used for sparklines, and displayed as is. But you can specify modifier to make sure it will be rendered properly.
|
||||||
|
|
||||||
Vars are specified as a comma-separated list of var identifiers with (optional) modifiers.
|
Vars are specified as a comma-separated list of var identifiers with (optional) modifiers.
|
||||||
|
|
||||||
|
|
2
main.go
2
main.go
|
@ -14,7 +14,7 @@ import (
|
||||||
var (
|
var (
|
||||||
interval = flag.Duration("i", 5*time.Second, "Polling interval")
|
interval = flag.Duration("i", 5*time.Second, "Polling interval")
|
||||||
urls = flag.String("ports", "", "Ports/URLs for accessing services expvars (start-end,port2,port3,https://host:port)")
|
urls = flag.String("ports", "", "Ports/URLs for accessing services expvars (start-end,port2,port3,https://host:port)")
|
||||||
varsArg = flag.String("vars", "mem:memstats.Alloc,mem:memstats.Sys,mem:memstats.HeapAlloc,mem:memstats.HeapInuse,memstats.EnableGC,memstats.NumGC,duration:memstats.PauseTotalNs", "Vars to monitor (comma-separated)")
|
varsArg = flag.String("vars", "mem:memstats.Alloc,mem:memstats.Sys,mem:memstats.HeapAlloc,mem:memstats.HeapInuse,duration:memstats.PauseNs,duration:memstats.PauseTotalNs", "Vars to monitor (comma-separated)")
|
||||||
dummy = flag.Bool("dummy", false, "Use dummy (console) output")
|
dummy = flag.Bool("dummy", false, "Use dummy (console) output")
|
||||||
self = flag.Bool("self", false, "Monitor itself")
|
self = flag.Bool("self", false, "Monitor itself")
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue