Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Name of plugin Name = "ping" // Version of plugin Version = 1 // Type of plugin Type = plugin.CollectorPluginType )
Variables ¶
View Source
var GlobalPinger *pinger.Pinger
global co-oridinator shared between all go-routines.
Functions ¶
Types ¶
type Ping ¶
type Ping struct { }
func (*Ping) CollectMetrics ¶
func (p *Ping) CollectMetrics(mts []plugin.MetricType) ([]plugin.MetricType, error)
CollectMetrics collects metrics for testing
func (*Ping) GetConfigPolicy ¶
func (p *Ping) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)
GetConfigPolicy returns a ConfigPolicyTree for testing
func (*Ping) GetMetricTypes ¶
func (p *Ping) GetMetricTypes(cfg plugin.ConfigType) ([]plugin.MetricType, error)
GetMetricTypes returns metric types for testing
type PingResult ¶
type PingResult struct { Loss *float64 Min *float64 Max *float64 Avg *float64 Median *float64 Mdev *float64 }
results. we use pointers so that missing data will be encoded as 'null' in the json response.
type RaintankProbePing ¶
Our check definition.
func NewRaintankPingProbe ¶
func NewRaintankPingProbe(hostname string, count int, timeout float64) (*RaintankProbePing, error)
parse the json request body to build our check definition.
func (*RaintankProbePing) Run ¶
func (p *RaintankProbePing) Run() (*PingResult, error)
Click to show internal directories.
Click to hide internal directories.