Documentation ¶
Overview ¶
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type Fetcher
- func (f *Fetcher) Channel() <-chan *v1.SniffData
- func (f *Fetcher) DefaultConfig() string
- func (f *Fetcher) Description() string
- func (f *Fetcher) Fetch(ctx context.Context)
- func (f *Fetcher) Name() string
- func (f *Fetcher) Prepare()
- func (f *Fetcher) ScrapeConfig(ctx context.Context)
- func (f *Fetcher) ShowName() string
- func (f *Fetcher) Shutdown(ctx context.Context) error
- func (f *Fetcher) SupportForwarders() []forwarder.Forwarder
- type MetadataCache
- type MetricFamily
- type QueueAppender
- type QueueStore
- type ScrapeManager
Constants ¶
const ( Name = "prometheus-metrics-fetcher" ShowName = "Prometheus Metrics Fetcher" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct { config.CommonFields // config is the top level configuratScrapeConfigsMapion of prometheus ScrapeConfigsMap []*scrapeConfig `mapstructure:"scrape_configs" yaml:"scrape_configs"` ScrapeConfigs []*promConfig.ScrapeConfig // events OutputEvents event.BatchEvents // outputChannel OutputChannel chan *v1.SniffData }
Fetcher is the struct for Prometheus fetcher
func (*Fetcher) DefaultConfig ¶
func (*Fetcher) Description ¶
func (*Fetcher) ScrapeConfig ¶
func (*Fetcher) SupportForwarders ¶
type MetadataCache ¶
type MetadataCache interface { Metadata(metricName string) (scrape.MetricMetadata, bool) }
MetadataCache is an adapter to prometheus' scrape.Target and provide only the functionality which is needed
type MetricFamily ¶
type QueueAppender ¶
type QueueAppender struct { Ctx context.Context Ms *metadataService OutputChannel chan *v1.SniffData // contains filtered or unexported fields }
QueueAppender appender with queue
func NewQueueAppender ¶
func NewQueueAppender(ctx context.Context, ms *metadataService, oc chan *v1.SniffData, useStartTimeMetric bool) *QueueAppender
NewQueueAppender construct QueueAppender
func (*QueueAppender) AddFast ¶
func (qa *QueueAppender) AddFast(_ uint64, _ int64, _ float64) error
AddFast always returns error since we do not cache
func (*QueueAppender) Commit ¶
func (qa *QueueAppender) Commit() error
Commit submit metrics data to consumers
func (*QueueAppender) Rollback ¶
func (qa *QueueAppender) Rollback() error
type QueueStore ¶
type QueueStore struct { OutputChannel chan *v1.SniffData // contains filtered or unexported fields }
func NewQueueStore ¶
func NewQueueStore(ctx context.Context, useStartTimeMetric bool, receiverName string, oc chan *v1.SniffData) *QueueStore
NewQueueStore construct QueueStore
func (*QueueStore) Close ¶
func (qs *QueueStore) Close() error
func (*QueueStore) SetScrapeManager ¶
func (qs *QueueStore) SetScrapeManager(scrapeManager *scrape.Manager)