Documentation
¶
Overview ¶
Package prometheus provides the legacy Prometheus metric filter.
Deprecated: This filter is deprecated and will be removed in a future version. Use dgp.filter.http.metric instead
Index ¶
Constants ¶
View Source
const (
Kind = constant.HTTPPrometheusMetricFilter
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
Cfg *MetricCollectConfiguration
Prom *prom.Prometheus
}
func (*Filter) Decode ¶
func (f *Filter) Decode(ctx *contextHttp.HttpContext) filter.FilterStatus
type FilterFactory ¶
type FilterFactory struct {
Cfg *MetricCollectConfiguration
Prom *prom.Prometheus
}
func (*FilterFactory) Apply ¶
func (factory *FilterFactory) Apply() error
func (*FilterFactory) Config ¶
func (factory *FilterFactory) Config() any
func (*FilterFactory) PrepareFilterChain ¶
func (factory *FilterFactory) PrepareFilterChain(ctx *contextHttp.HttpContext, chain filter.FilterChain) error
type MetricCollectConfiguration ¶
type MetricCollectConfiguration struct {
Rules MetricCollectRule `yaml:"metric_collect_rules" json:"metric_collect_rules"`
}
MetricCollectConfiguration is the configuration for the legacy Prometheus filter. Deprecated: Use dgp.filter.http.metric instead.
type MetricCollectRule ¶
type MetricCollectRule struct {
MetricPath string `json:"metric_path,omitempty" yaml:"metric_path,omitempty"`
// Push Gateway URL in format http://domain:port
// where JOBNAME can be any string of your choice
PushGatewayURL string `default:"http://127.0.0.1:9091" json:"push_gateway_url,omitempty" yaml:"push_gateway_url,omitempty"`
CounterPush bool `json:"counter_push,omitempty" yaml:"counter_push,omitempty"`
PushIntervalThreshold int `json:"push_interval_threshold" yaml:"push_interval_threshold,omitempty"`
PushJobName string `json:"push_job_name,omitempty" yaml:"push_job_name,omitempty"`
}
MetricCollectRule defines the metric collection rules. Deprecated: Use dgp.filter.http.metric instead.
Click to show internal directories.
Click to hide internal directories.