Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export extstore_io_queue gauge #169

Merged
merged 2 commits into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ type Exporter struct {
extstoreBytesUsed *prometheus.Desc
extstoreBytesLimit *prometheus.Desc
extstoreBytesFragmented *prometheus.Desc
extstoreIOQueueDepth *prometheus.Desc
acceptingConnections *prometheus.Desc
}

Expand Down Expand Up @@ -640,6 +641,12 @@ func New(server string, timeout time.Duration, logger log.Logger, tlsConfig *tls
nil,
nil,
),
extstoreIOQueueDepth: prometheus.NewDesc(
prometheus.BuildFQName(Namespace, "", "extstore_io_queue_depth"),
"Number of items in the I/O queue waiting to be processed.",
nil,
nil,
),
acceptingConnections: prometheus.NewDesc(
prometheus.BuildFQName(Namespace, "", "accepting_connections"),
"The Memcached server is currently accepting new connections.",
Expand Down Expand Up @@ -737,6 +744,7 @@ func (e *Exporter) Describe(ch chan<- *prometheus.Desc) {
ch <- e.extstoreBytesUsed
ch <- e.extstoreBytesFragmented
ch <- e.extstoreBytesLimit
ch <- e.extstoreIOQueueDepth
ch <- e.acceptingConnections
}

Expand Down Expand Up @@ -849,6 +857,7 @@ func (e *Exporter) parseStats(ch chan<- prometheus.Metric, stats map[net.Addr]me
e.parseAndNewMetric(ch, e.extstorePageAllocs, prometheus.CounterValue, s, "extstore_page_allocs"),
e.parseAndNewMetric(ch, e.extstorePageEvictions, prometheus.CounterValue, s, "extstore_page_evictions"),
e.parseAndNewMetric(ch, e.extstorePageReclaims, prometheus.CounterValue, s, "extstore_page_reclaims"),
e.parseAndNewMetric(ch, e.extstorePagesFree, prometheus.GaugeValue, s, "extstore_pages_free"),
e.parseAndNewMetric(ch, e.extstorePagesUsed, prometheus.GaugeValue, s, "extstore_pages_used"),
e.parseAndNewMetric(ch, e.extstoreObjectsEvicted, prometheus.CounterValue, s, "extstore_objects_evicted"),
e.parseAndNewMetric(ch, e.extstoreObjectsRead, prometheus.CounterValue, s, "extstore_objects_read"),
Expand All @@ -860,6 +869,7 @@ func (e *Exporter) parseStats(ch chan<- prometheus.Metric, stats map[net.Addr]me
e.parseAndNewMetric(ch, e.extstoreBytesUsed, prometheus.CounterValue, s, "extstore_bytes_used"),
e.parseAndNewMetric(ch, e.extstoreBytesFragmented, prometheus.GaugeValue, s, "extstore_bytes_fragmented"),
e.parseAndNewMetric(ch, e.extstoreBytesLimit, prometheus.GaugeValue, s, "extstore_limit_maxbytes"),
e.parseAndNewMetric(ch, e.extstoreIOQueueDepth, prometheus.GaugeValue, s, "extstore_io_queue"),
)
if err != nil {
parseError = err
Expand Down