Documentation ¶
Index ¶
- Variables
- func NewBeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
- func NewFilebeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
- func NewLibBeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
- func NewMainCollector(client *http.Client, url *url.URL, name string, beatInfo *BeatInfo) prometheus.Collector
- func NewMetricbeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
- func NewRegistrarCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
- func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
- type BeatInfo
- type BeatStats
- type CPUStats
- type CPUTimings
- type Filebeat
- type LibBeat
- type LibBeatEvents
- type LibBeatOutput
- type LibBeatOutputBytesErrors
- type LibBeatPipeline
- type Metricbeat
- type MetricbeatEvent
- type Registrar
- type Stats
- type System
Constants ¶
This section is empty.
Variables ¶
View Source
var HackfixRegex = regexp.MustCompile("\"time\":(\\d+)") // replaces time:123 to time.ms:123, only filebeat has different naming of time metric
HackfixRegex regex to replace JSON part
Functions ¶
func NewBeatCollector ¶
func NewBeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
NewBeatCollector constructor
func NewFilebeatCollector ¶
func NewFilebeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
NewFilebeatCollector constructor
func NewLibBeatCollector ¶
func NewLibBeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
NewLibBeatCollector constructor
func NewMainCollector ¶
func NewMainCollector(client *http.Client, url *url.URL, name string, beatInfo *BeatInfo) prometheus.Collector
NewMainCollector constructor
func NewMetricbeatCollector ¶
func NewMetricbeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
NewMetricbeatCollector constructor
func NewRegistrarCollector ¶
func NewRegistrarCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
NewRegistrarCollector constructor
func NewSystemCollector ¶
func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector
NewSystemCollector constructor
Types ¶
type BeatInfo ¶
type BeatInfo struct { Beat string `json:"beat"` Hostname string `json:"hostname"` Name string `json:"name"` UUID string `json:"uuid"` Version string `json:"version"` }
BeatInfo beat info json structure
type BeatStats ¶
type BeatStats struct { CPU struct { Sytem CPUTimings `json:"system"` Total CPUTimings `json:"total"` User CPUTimings `json:"user"` } `json:"cpu"` BeatUptime struct { Uptime struct { MS float64 `json:"ms"` } `json:"uptime"` EmphemeralID string `json:"emphemeral_id"` } `json:"info"` Memstats struct { GCNext float64 `json:"gc_next"` MemoryAlloc float64 `json:"memory_alloc"` MemoryTotal float64 `json:"memory_total"` RSS float64 `json:"rss"` } `json:"memstats"` }
BeatStats json structure
type CPUTimings ¶
type CPUTimings struct { Ticks float64 `json:"ticks"` Time struct { MS float64 `json:"ms"` } `json:"time"` Value float64 `json:"value"` }
CPUTimings json structure
type Filebeat ¶
type Filebeat struct { Events struct { Active float64 `json:"active"` Added float64 `json:"added"` Done float64 `json:"done"` } `json:"events"` Harvester struct { Closed float64 `json:"closed"` OpenFiles float64 `json:"open_files"` Running float64 `json:"running"` Skipped float64 `json:"skipped"` Started float64 `json:"started"` } `json:"harvester"` Input struct { Log struct { Files struct { Renamed float64 `json:"renamed"` Truncated float64 `json:"truncated"` } `json:"files"` } `json:"log"` } `json:"input"` }
Filebeat json structure
type LibBeat ¶
type LibBeat struct { Config struct { Module struct { Running float64 `json:"running"` Starts float64 `json:"starts"` Stops float64 `json:"stops"` } `json:"module"` Reloads float64 `json:"reloads"` } `json:"config"` Output LibBeatOutput `json:"output"` Pipeline LibBeatPipeline `json:"pipeline"` }
LibBeat json structure
type LibBeatEvents ¶
type LibBeatEvents struct { Acked float64 `json:"acked"` Active float64 `json:"active"` Batches float64 `json:"batches"` Dropped float64 `json:"dropped"` Duplicates float64 `json:"duplicates"` Failed float64 `json:"failed"` Filtered float64 `json:"filtered"` Published float64 `json:"published"` Retry float64 `json:"retry"` }
LibBeatEvents json structure
type LibBeatOutput ¶
type LibBeatOutput struct { Events LibBeatEvents `json:"events"` Read LibBeatOutputBytesErrors `json:"read"` Write LibBeatOutputBytesErrors `json:"write"` Type string `json:"type"` }
LibBeatOutput json structure
type LibBeatOutputBytesErrors ¶
type LibBeatOutputBytesErrors struct { Bytes float64 `json:"bytes"` Errors float64 `json:"errors"` }
LibBeatOutputBytesErrors json structure
type LibBeatPipeline ¶
type LibBeatPipeline struct { Clients float64 `json:"clients"` Events LibBeatEvents `json:"events"` Queue struct { Acked float64 `json:"acked"` } `json:"queue"` }
LibBeatPipeline json structure
type Metricbeat ¶
type Metricbeat struct { System struct { CPU MetricbeatEvent `json:"cpu"` Filesystem MetricbeatEvent `json:"filesystem"` Fsstat MetricbeatEvent `json:"fsstat"` Load MetricbeatEvent `json:"load"` Memory MetricbeatEvent `json:"memory"` Network MetricbeatEvent `json:"network"` Process MetricbeatEvent `json:"process"` ProcessSummary MetricbeatEvent `json:"process_summary"` Uptime MetricbeatEvent `json:"uptime"` } `json:"system"` }
Metricbeat json structure
type MetricbeatEvent ¶
MetricbeatEvent json structure
type Registrar ¶
type Registrar struct { Writes struct { Fail float64 `json:"fail"` Success float64 `json:"success"` Total float64 `json:"total"` } `json:"writes"` States struct { Cleanup float64 `json:"cleanup"` Current float64 `json:"current"` Update float64 `json:"update"` } `json:"states"` }
Registrar json structure
Click to show internal directories.
Click to hide internal directories.