Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SeverityLevels = map[int32]string{
0: "emergency",
1: "alert",
2: "critical",
3: "error",
4: "warning",
5: "notice",
6: "informational",
7: "debug",
}
SeverityLevels maps severity levels to severity string levels.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics holds a set of gelf metrics.
func NewMetrics ¶
func NewMetrics(reg prometheus.Registerer) *Metrics
NewMetrics creates a new set of gelf metrics. If reg is non-nil, the metrics will be registered.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target listens to gelf messages on udp.
func NewTarget ¶
func NewTarget( metrics *Metrics, logger log.Logger, handler api.EntryHandler, relabel []*relabel.Config, config *scrapeconfig.GelfTargetConfig, ) (*Target, error)
NewTarget configures a new Gelf Target.
func (*Target) Details ¶
func (t *Target) Details() interface{}
Details returns target-specific details.
func (*Target) DiscoveredLabels ¶
DiscoveredLabels returns the set of labels discovered by the gelf target, which is always nil. Implements Target.
func (*Target) Labels ¶
Labels returns the set of labels that statically apply to all log entries produced by the GelfTarget.
type TargetManager ¶
type TargetManager struct {
// contains filtered or unexported fields
}
TargetManager manages a series of Gelf Targets.
func NewTargetManager ¶
func NewTargetManager( metrics *Metrics, logger log.Logger, client api.EntryHandler, scrapeConfigs []scrapeconfig.Config, ) (*TargetManager, error)
NewTargetManager creates a new Gelf TargetManager.
func (*TargetManager) ActiveTargets ¶
func (tm *TargetManager) ActiveTargets() map[string][]target.Target
ActiveTargets returns the list of GelfTargets where Gelf data is being read. ActiveTargets is an alias to AllTargets as GelfTargets cannot be deactivated, only stopped.
func (*TargetManager) AllTargets ¶
func (tm *TargetManager) AllTargets() map[string][]target.Target
AllTargets returns the list of all targets where gelf data is currently being read.
func (*TargetManager) Ready ¶
func (tm *TargetManager) Ready() bool
Ready returns true if at least one GelfTarget is also ready.
func (*TargetManager) Stop ¶
func (tm *TargetManager) Stop()
Stop stops the GelfTargetManager and all of its GelfTargets.