Documentation
¶
Index ¶
Constants ¶
View Source
const ( PortStatsTxPrefix = "ptp.sptp.portstats.tx." PortStatsRxPrefix = "ptp.sptp.portstats.rx." )
port stats prefixes
Variables ¶
This section is empty.
Functions ¶
func FetchPortStats ¶
FetchPortStats fetches all counters and then returns two maps: packet type to counter, TX and RX
Types ¶
type Counters ¶
Counters is various counters exported by SPTP client
func FetchCounters ¶
FetchCounters returns counters map fetched from the url
type PrometheusExporter ¶
type PrometheusExporter struct {
// contains filtered or unexported fields
}
PrometheusExporter holds the exporter details
func NewPrometheusExporter ¶
func NewPrometheusExporter(listenPort int, sptpPort int, scrapeInterval time.Duration) *PrometheusExporter
NewPrometheusExporter creates a new instance of PrometheusExporter
type Stat ¶
type Stat struct { GMAddress string `json:"gm_address"` ClockQuality ptp.ClockQuality `json:"clock_quality"` Error string `json:"error"` GMPresent int `json:"gm_present"` IngressTime int64 `json:"ingress_time"` MeanPathDelay float64 `json:"mean_path_delay"` Offset float64 `json:"offset"` PortIdentity string `json:"port_identity"` Priority1 uint8 `json:"priority1"` Priority2 uint8 `json:"priority2"` Priority3 uint8 `json:"priority3"` Selected bool `json:"selected"` StepsRemoved int `json:"steps_removed"` CorrectionFieldRX int64 `json:"cf_rx"` CorrectionFieldTX int64 `json:"cf_tx"` C2SDelay int64 `json:"client_server_delay"` S2CDelay int64 `json:"server_client_delay"` }
Stat is a representation of a monitoring struct for sptp client
Click to show internal directories.
Click to hide internal directories.