Documentation
¶
Index ¶
- Variables
- func Add(md *opentsdb.MultiDataPoint, name string, value interface{}, t opentsdb.TagSet, ...)
- func AddTS(md *opentsdb.MultiDataPoint, name string, ts int64, value interface{}, ...)
- func ICMP(host string)
- func InitFake(fake int)
- func InitPrograms(cpath string)
- func IsAlNum(s string) bool
- func IsDigit(s string) bool
- func Run(cs []Collector) chan *opentsdb.DataPoint
- func SNMPCisco(community, host string)
- func SNMPIfaces(community, host string)
- func TSys100NStoEpoch(nsec uint64) int64
- func Vsphere(user, pwd, host string)
- func WatchProcesses(procs []*WatchedProc) error
- type Collector
- type IntervalCollector
- type PRSummary
- type Process
- type ProgramCollector
- type WatchedProc
Constants ¶
This section is empty.
Variables ¶
View Source
var CPU_FIELDS = []string{
"user",
"nice",
"system",
"idle",
"iowait",
"irq",
"softirq",
"steal",
"guest",
"guest_nice",
}
View Source
var ( // DefaultFreq is the duration between collection intervals if none is // specified. DefaultFreq = time.Second * 15 )
Functions ¶
func Add ¶
func Add(md *opentsdb.MultiDataPoint, name string, value interface{}, t opentsdb.TagSet, rate metadata.RateType, unit metadata.Unit, desc string)
Add appends a new data point with given metric name, value, and tags. Tags may be nil. If tags is nil or does not contain a host key, it will be automatically added. If the value of the host key is the empty string, it will be removed (use this to prevent the normal auto-adding of the host tag).
func AddTS ¶
func AddTS(md *opentsdb.MultiDataPoint, name string, ts int64, value interface{}, t opentsdb.TagSet, rate metadata.RateType, unit metadata.Unit, desc string)
AddTS is the same as Add but lets you specify the timestamp
func InitPrograms ¶
func InitPrograms(cpath string)
func SNMPCisco ¶
func SNMPCisco(community, host string)
SNMPCisco registers a SNMP CISCO collector for the given community and host.
func SNMPIfaces ¶
func SNMPIfaces(community, host string)
SNMPIfaces registers a SNMP Interfaces collector for the given community and host.
func TSys100NStoEpoch ¶
func WatchProcesses ¶
func WatchProcesses(procs []*WatchedProc) error
Types ¶
type IntervalCollector ¶
type IntervalCollector struct { F func() (opentsdb.MultiDataPoint, error) Interval time.Duration // defaults to DefaultFreq if unspecified Enable func() bool // internal use sync.Mutex // contains filtered or unexported fields }
func (*IntervalCollector) Enabled ¶
func (c *IntervalCollector) Enabled() bool
func (*IntervalCollector) Init ¶
func (c *IntervalCollector) Init()
func (*IntervalCollector) Name ¶
func (c *IntervalCollector) Name() string
func (*IntervalCollector) Run ¶
func (c *IntervalCollector) Run(dpchan chan<- *opentsdb.DataPoint)
type PRSummary ¶
type PRSummary struct { Changes struct { Total float64 `yaml:"total"` } `yaml:"changes"` Events struct { Failure float64 `yaml:"failure"` Success float64 `yaml:"success"` Total float64 `yaml:"total"` } `yaml:"events"` Resources struct { Changed float64 `yaml:"changed"` Failed float64 `yaml:"failed"` FailedToRestart float64 `yaml:"failed_to_restart"` OutOfSync float64 `yaml:"out_of_sync"` Restarted float64 `yaml:"restarted"` Scheduled float64 `yaml:"scheduled"` Skipped float64 `yaml:"skipped"` Total float64 `yaml:"total"` } `yaml:"resources"` Time struct { Augeas float64 `yaml:"augeas"` ConfigRetrieval float64 `yaml:"config_retrieval"` Cron float64 `yaml:"cron"` Exec float64 `yaml:"exec"` File float64 `yaml:"file"` Filebucket float64 `yaml:"filebucket"` Group float64 `yaml:"group"` IniSetting float64 `yaml:"ini_setting"` LastRun int64 `yaml:"last_run"` Package float64 `yaml:"package"` Schedule float64 `yaml:"schedule"` Service float64 `yaml:"service"` SshAuthorizedKey float64 `yaml:"ssh_authorized_key"` Total float64 `yaml:"total"` User float64 `yaml:"user"` Yumrepo float64 `yaml:"yumrepo"` } `yaml:"time"` Version struct { Config string `yaml:"config"` Puppet string `yaml:"puppet"` } `yaml:"version"` }
type ProgramCollector ¶
func (*ProgramCollector) Init ¶
func (c *ProgramCollector) Init()
func (*ProgramCollector) Name ¶
func (c *ProgramCollector) Name() string
func (*ProgramCollector) Run ¶
func (c *ProgramCollector) Run(dpchan chan<- *opentsdb.DataPoint)
type WatchedProc ¶
type WatchedProc struct { Command string Name string Processes map[string]int ArgMatch *regexp.Regexp // contains filtered or unexported fields }
func NewWatchedProc ¶
func NewWatchedProc(watch string) (*WatchedProc, error)
NewWatchedProc takes a string of the form "command,name,regex".
func (*WatchedProc) Check ¶
func (w *WatchedProc) Check(procs []*Process)
Check finds all matching processes and assigns them a new unique id.
func (*WatchedProc) Remove ¶
func (w *WatchedProc) Remove(pid string)
Source Files
¶
- cassandra_unix.go
- collectors.go
- conntrack_linux.go
- dell_hw.go
- disk_linux.go
- elasticsearch.go
- fake.go
- hbase_unix.go
- icmp.go
- ifstat_linux.go
- interval.go
- netbackup.go
- ntp_unix.go
- opentsdb.go
- process.go
- processes_linux.go
- procstats_linux.go
- program.go
- puppet_linux.go
- railgun_linux.go
- redis_unix.go
- snmp.go
- snmp_cisco.go
- snmp_ifaces.go
- vsphere.go
- yum_update_linux.go
Click to show internal directories.
Click to hide internal directories.