|
|
|
@ -34,6 +34,7 @@ type scrapeMetrics struct {
|
|
|
|
|
targetScrapePoolExceededTargetLimit prometheus.Counter
|
|
|
|
|
targetScrapePoolTargetLimit *prometheus.GaugeVec
|
|
|
|
|
targetScrapePoolTargetsAdded *prometheus.GaugeVec
|
|
|
|
|
targetScrapePoolSymbolTableItems *prometheus.GaugeVec
|
|
|
|
|
targetSyncIntervalLength *prometheus.SummaryVec
|
|
|
|
|
targetSyncFailed *prometheus.CounterVec
|
|
|
|
|
|
|
|
|
@ -129,6 +130,13 @@ func newScrapeMetrics(reg prometheus.Registerer) (*scrapeMetrics, error) {
|
|
|
|
|
},
|
|
|
|
|
[]string{"scrape_job"},
|
|
|
|
|
)
|
|
|
|
|
sm.targetScrapePoolSymbolTableItems = prometheus.NewGaugeVec(
|
|
|
|
|
prometheus.GaugeOpts{
|
|
|
|
|
Name: "prometheus_target_scrape_pool_symboltable_items",
|
|
|
|
|
Help: "Current number of symbols in table for this scrape pool.",
|
|
|
|
|
},
|
|
|
|
|
[]string{"scrape_job"},
|
|
|
|
|
)
|
|
|
|
|
sm.targetScrapePoolSyncsCounter = prometheus.NewCounterVec(
|
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
|
Name: "prometheus_target_scrape_pool_sync_total",
|
|
|
|
@ -234,6 +242,7 @@ func newScrapeMetrics(reg prometheus.Registerer) (*scrapeMetrics, error) {
|
|
|
|
|
sm.targetScrapePoolExceededTargetLimit,
|
|
|
|
|
sm.targetScrapePoolTargetLimit,
|
|
|
|
|
sm.targetScrapePoolTargetsAdded,
|
|
|
|
|
sm.targetScrapePoolSymbolTableItems,
|
|
|
|
|
sm.targetSyncFailed,
|
|
|
|
|
// Used by targetScraper.
|
|
|
|
|
sm.targetScrapeExceededBodySizeLimit,
|
|
|
|
@ -274,6 +283,7 @@ func (sm *scrapeMetrics) Unregister() {
|
|
|
|
|
sm.reg.Unregister(sm.targetScrapePoolExceededTargetLimit)
|
|
|
|
|
sm.reg.Unregister(sm.targetScrapePoolTargetLimit)
|
|
|
|
|
sm.reg.Unregister(sm.targetScrapePoolTargetsAdded)
|
|
|
|
|
sm.reg.Unregister(sm.targetScrapePoolSymbolTableItems)
|
|
|
|
|
sm.reg.Unregister(sm.targetSyncFailed)
|
|
|
|
|
sm.reg.Unregister(sm.targetScrapeExceededBodySizeLimit)
|
|
|
|
|
sm.reg.Unregister(sm.targetScrapeCacheFlushForced)
|
|
|
|
|