Documentation
¶
Index ¶
- func NewGauge(name string) prometheus.Gauge
- func NewServerGauge(name, server string) prometheus.Gauge
- func Validate(*Config)
- type Config
- type Exporter
- type Metrics
- func (m *Metrics) SetCalls(val float64)
- func (m *Metrics) SetKbs(v float64)
- func (m *Metrics) SetLimit(val float64)
- func (m *Metrics) SetMbDone(v float64)
- func (m *Metrics) SetMbLeft(v float64)
- func (m *Metrics) SetMbTotal(v float64)
- func (m *Metrics) SetServerXfer(name string, v float64)
- func (m *Metrics) SetSizeLeft(v float64)
- func (m *Metrics) SetSizeTotal(v float64)
- func (m *Metrics) SetSlotCount(v float64)
- func (m *Metrics) SetSlotTotal(v float64)
- func (m *Metrics) SetSpeed(v float64)
- func (m *Metrics) SetSpeedLimit(v float64)
- func (m *Metrics) SetSpeedLimitAbs(v float64)
- func (m *Metrics) SetTimeLeft(v float64)
- func (m *Metrics) SetXferTotal(v float64)
- type Queue
- type QueueStats
- type SabDuration
- type SabFloat
- type SabNZBd
- type SabSize
- type SabUint
- type Server
- type ServerStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGauge ¶
func NewGauge(name string) prometheus.Gauge
func NewServerGauge ¶
func NewServerGauge(name, server string) prometheus.Gauge
Types ¶
type Config ¶
type Config struct { BaseUrl string `json:"base_url"` Key string `json:"api_key"` Interval int `json:"interval"` // contains filtered or unexported fields }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
func NewExporter ¶
type Metrics ¶
type Metrics struct { SpeedLimit prometheus.Gauge SpeedLimitAbs prometheus.Gauge Speed prometheus.Gauge Kbs prometheus.Gauge MbTotal prometheus.Gauge MbLeft prometheus.Gauge MbDone prometheus.Gauge SizeTotal prometheus.Gauge SizeLeft prometheus.Gauge TimeLeft prometheus.Gauge SlotCount prometheus.Gauge SlotTotal prometheus.Gauge XferTotal prometheus.Gauge ServerXfer map[string]prometheus.Gauge Calls prometheus.Gauge Limit prometheus.Gauge }
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) SetMbTotal ¶
func (*Metrics) SetServerXfer ¶
func (*Metrics) SetSizeLeft ¶
func (*Metrics) SetSizeTotal ¶
func (*Metrics) SetSlotCount ¶
func (*Metrics) SetSlotTotal ¶
func (*Metrics) SetSpeedLimit ¶
func (*Metrics) SetSpeedLimitAbs ¶
func (*Metrics) SetTimeLeft ¶
func (*Metrics) SetXferTotal ¶
type Queue ¶
type Queue struct { Version string `json:"version"` Paused bool `json:"paused"` PausedAll bool `json:"paused_all"` DiskSpace1 SabFloat `json:"diskspace1"` DiskSpace2 SabFloat `json:"diskspace2"` SpeedLimit SabUint `json:"speedlimit"` SpeedLimitAbs SabFloat `json:"speedlimit_abs"` CacheSize SabSize `json:"cache_size"` KbPerSec SabFloat `json:"kbpersec"` Speed SabSize `json:"speed"` MbLeft SabFloat `json:"mbleft"` Mb SabFloat `json:"mb"` SizeLeft SabSize `json:"sizeleft"` Size SabSize `json:"size"` TimeLeft SabDuration `json:"timeleft"` NoOfSlots uint64 `json:"noofslots"` NoOfSlotsTotal uint64 `json:"noofslots_total"` }
type QueueStats ¶
type QueueStats struct {
Queue Queue `json:"queue"`
}
type SabDuration ¶
func (SabDuration) Duration ¶
func (s SabDuration) Duration() time.Duration
func (SabDuration) Float64 ¶
func (s SabDuration) Float64() float64
func (SabDuration) Seconds ¶
func (s SabDuration) Seconds() float64
func (SabDuration) String ¶
func (s SabDuration) String() string
func (*SabDuration) UnmarshalJSON ¶
func (s *SabDuration) UnmarshalJSON(b []byte) error
type SabNZBd ¶
type SabNZBd struct { Queue *QueueStats Server *ServerStats }
func NewSabNZBd ¶
func NewSabNZBd() *SabNZBd
type ServerStats ¶
func NewServerStats ¶
func NewServerStats() *ServerStats
Click to show internal directories.
Click to hide internal directories.