mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
expose max memory chunks metrics (#2303)
* expose max memory chunks metrics
This commit is contained in:
parent
93b70ee4ea
commit
7e369b9318
|
@ -87,6 +87,11 @@ var (
|
||||||
"The maximum number of chunks that can be waiting for persistence before sample ingestion will stop.",
|
"The maximum number of chunks that can be waiting for persistence before sample ingestion will stop.",
|
||||||
nil, nil,
|
nil, nil,
|
||||||
)
|
)
|
||||||
|
maxMemChunksDesc = prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(namespace, subsystem, "max_memory_chunks"),
|
||||||
|
"The configured maximum number of chunks that can be held in memory",
|
||||||
|
nil, nil,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
type quarantineRequest struct {
|
type quarantineRequest struct {
|
||||||
|
@ -1763,6 +1768,11 @@ func (s *MemorySeriesStorage) Collect(ch chan<- prometheus.Metric) {
|
||||||
ch <- s.ingestedSamplesCount
|
ch <- s.ingestedSamplesCount
|
||||||
s.discardedSamplesCount.Collect(ch)
|
s.discardedSamplesCount.Collect(ch)
|
||||||
ch <- s.nonExistentSeriesMatchesCount
|
ch <- s.nonExistentSeriesMatchesCount
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
maxMemChunksDesc,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
float64(s.maxMemoryChunks),
|
||||||
|
)
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
chunk.NumMemChunksDesc,
|
chunk.NumMemChunksDesc,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|
Loading…
Reference in a new issue