Implement Prometheus metrics
This commit is contained in:
config
metric
vendor
github.com
beorn7
perks
cespare
xxhash
golang
protobuf
matttproud
prometheus
client_golang
LICENSENOTICE
prometheus
.gitignoreREADME.mdbuild_info.gobuild_info_pre_1.12.gocollector.gocounter.godesc.godoc.goexpvar_collector.gofnv.gogauge.gogo_collector.gohistogram.go
internal
labels.gometric.goobserver.goprocess_collector.goprocess_collector_other.goprocess_collector_windows.gopromauto
promhttp
registry.gosummary.gotimer.gountyped.govalue.govec.gowrap.goclient_model
common
procfs
.gitignore.golangci.ymlCONTRIBUTING.mdLICENSEMAINTAINERS.mdMakefileMakefile.commonNOTICEREADME.mdarp.gobuddyinfo.gocpuinfo.gocrypto.godoc.gofixtures.ttarfs.gogo.modgo.sum
internal
ipvs.gomdstat.gomountinfo.gomountstats.gonet_dev.gonet_softnet.gonet_unix.goproc.goproc_environ.goproc_fdinfo.goproc_io.goproc_limits.goproc_ns.goproc_psi.goproc_stat.goproc_status.goschedstat.gostat.gottarvm.goxfrm.gozoneinfo.gogolang.org
x
sys
AUTHORSCONTRIBUTORSLICENSEPATENTS
windows
aliases.godll_windows.goenv_windows.goeventlog.goexec_windows.gomemory_windows.gomkerrors.bashmkknownfolderids.bashmksyscall.gorace.gorace0.gosecurity_windows.goservice.gostr.gosyscall.gosyscall_windows.gotypes_windows.gotypes_windows_386.gotypes_windows_amd64.gotypes_windows_arm.gozerrors_windows.gozknownfolderids_windows.gozsyscall_windows.go
45
vendor/github.com/prometheus/procfs/doc.go
generated
vendored
Normal file
45
vendor/github.com/prometheus/procfs/doc.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright 2014 Prometheus Team
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package procfs provides functions to retrieve system, kernel and process
|
||||
// metrics from the pseudo-filesystem proc.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// package main
|
||||
//
|
||||
// import (
|
||||
// "fmt"
|
||||
// "log"
|
||||
//
|
||||
// "github.com/prometheus/procfs"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
// p, err := procfs.Self()
|
||||
// if err != nil {
|
||||
// log.Fatalf("could not get process: %s", err)
|
||||
// }
|
||||
//
|
||||
// stat, err := p.NewStat()
|
||||
// if err != nil {
|
||||
// log.Fatalf("could not get process stat: %s", err)
|
||||
// }
|
||||
//
|
||||
// fmt.Printf("command: %s\n", stat.Comm)
|
||||
// fmt.Printf("cpu time: %fs\n", stat.CPUTime())
|
||||
// fmt.Printf("vsize: %dB\n", stat.VirtualMemory())
|
||||
// fmt.Printf("rss: %dB\n", stat.ResidentMemory())
|
||||
// }
|
||||
//
|
||||
package procfs
|
Reference in New Issue
Block a user