Package: prometheus-mongodb-exporter / 1.0.0+git20180522.e755a44-1

01-fix-prom-client-compat.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
Description: Support 0.9-pre release of Prometheus client
 The latest release of Prometheus client does not allow one to set a value on a
 Counter. Setting values on Counters was already deprecated on version 0.8.
 .
 This patch basically convert to Gauges all the Counters whose values are set
 by the no longer existing method.
Forwarded: https://github.com/dcu/mongodb_exporter/pull/105
Author: Raúl Benencia <rul@kalgan.cc>
--- a/collector/asserts.go
+++ b/collector/asserts.go
@@ -5,7 +5,7 @@
 )
 
 var (
-	assertsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	assertsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "asserts_total",
 		Help:      "The asserts document reports the number of asserts on the database. While assert errors are typically uncommon, if there are non-zero values for the asserts, you should check the log file for the mongod process for more information. In many cases these errors are trivial, but are worth investigating.",
--- a/collector/background_flushing.go
+++ b/collector/background_flushing.go
@@ -7,13 +7,13 @@
 )
 
 var (
-	backgroundFlushingflushesTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	backgroundFlushingflushesTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "background_flushing",
 		Name:      "flushes_total",
 		Help:      "flushes is a counter that collects the number of times the database has flushed all writes to disk. This value will grow as database runs for longer periods of time",
 	})
-	backgroundFlushingtotalMilliseconds = prometheus.NewCounter(prometheus.CounterOpts{
+	backgroundFlushingtotalMilliseconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "background_flushing",
 		Name:      "total_milliseconds",
--- a/collector/collection_wiredtiger.go
+++ b/collector/collection_wiredtiger.go
@@ -5,7 +5,7 @@
 )
 
 var (
-	collWTBlockManagerBlocksTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	collWTBlockManagerBlocksTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "collection_wiredtiger_blockmanager",
 		Name:      "blocks_total",
@@ -20,7 +20,7 @@
 		Name:      "pages",
 		Help:      "The current number of pages in the WiredTiger Cache",
 	}, []string{"ns", "type"})
-	collWTCachePagesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	collWTCachePagesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "collection_wiredtiger_cache",
 		Name:      "pages_total",
@@ -32,13 +32,13 @@
 		Name:      "bytes",
 		Help:      "The current size of data in the WiredTiger Cache in bytes",
 	}, []string{"ns", "type"})
-	collWTCacheBytesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	collWTCacheBytesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "collection_wiredtiger_cache",
 		Name:      "bytes_total",
 		Help:      "The total number of bytes read into/from the WiredTiger Cache",
 	}, []string{"ns", "type"})
-	collWTCacheEvictedTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	collWTCacheEvictedTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "collection_wiredtiger_cache",
 		Name:      "evicted_total",
--- a/collector/conn_pool_stats.go
+++ b/collector/conn_pool_stats.go
@@ -37,7 +37,7 @@
 		Help:      "Corresponds to the total number of client connections to mongo that are currently available.",
 	})
 
-	totalCreated = prometheus.NewCounter(prometheus.CounterOpts{
+	totalCreated = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "connpoolstats",
 		Name:      "connections_created_total",
--- a/collector/connections.go
+++ b/collector/connections.go
@@ -12,7 +12,7 @@
 	}, []string{"state"})
 )
 var (
-	connectionsMetricsCreatedTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	connectionsMetricsCreatedTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "connections_metrics",
 		Name:      "created_total",
--- a/collector/global_lock.go
+++ b/collector/global_lock.go
@@ -11,7 +11,7 @@
 		Name:      "ratio",
 		Help:      "The value of ratio displays the relationship between lockTime and totalTime. Low values indicate that operations have held the globalLock frequently for shorter periods of time. High values indicate that operations have held globalLock infrequently for longer periods of time",
 	})
-	globalLockTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	globalLockTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "global_lock",
 		Name:      "total",
--- a/collector/index_counters.go
+++ b/collector/index_counters.go
@@ -14,7 +14,7 @@
 )
 
 var (
-	indexCountersTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	indexCountersTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "index_counters_total",
 		Help:      "Total indexes by type",
--- a/collector/locks.go
+++ b/collector/locks.go
@@ -5,21 +5,21 @@
 )
 
 var (
-	locksTimeLockedGlobalMicrosecondsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	locksTimeLockedGlobalMicrosecondsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "locks_time_locked_global_microseconds_total",
 		Help:      "amount of time in microseconds that any database has held the global lock",
 	}, []string{"type", "database"})
 )
 var (
-	locksTimeLockedLocalMicrosecondsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	locksTimeLockedLocalMicrosecondsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "locks_time_locked_local_microseconds_total",
 		Help:      "amount of time in microseconds that any database has held the local lock",
 	}, []string{"type", "database"})
 )
 var (
-	locksTimeAcquiringGlobalMicrosecondsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	locksTimeAcquiringGlobalMicrosecondsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "locks_time_acquiring_global_microseconds_total",
 		Help:      "amount of time in microseconds that any database has spent waiting for the global lock",
--- a/collector/metrics.go
+++ b/collector/metrics.go
@@ -5,7 +5,7 @@
 )
 
 var (
-	metricsCursorTimedOutTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsCursorTimedOutTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_cursor",
 		Name:      "timed_out_total",
@@ -20,7 +20,7 @@
 	}, []string{"state"})
 )
 var (
-	metricsDocumentTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	metricsDocumentTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "metrics_document_total",
 		Help:      "The document holds a document of that reflect document access and modification patterns and data use. Compare these values to the data in the opcounters document, which track total number of operations",
@@ -33,7 +33,7 @@
 		Name:      "num_total",
 		Help:      "num reports the total number of getLastError operations with a specified write concern (i.e. w) that wait for one or more members of a replica set to acknowledge the write operation (i.e. a w value greater than 1.)",
 	})
-	metricsGetLastErrorWtimeTotalMilliseconds = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsGetLastErrorWtimeTotalMilliseconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_get_last_error_wtime",
 		Name:      "total_milliseconds",
@@ -41,7 +41,7 @@
 	})
 )
 var (
-	metricsGetLastErrorWtimeoutsTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsGetLastErrorWtimeoutsTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_get_last_error",
 		Name:      "wtimeouts_total",
@@ -49,21 +49,21 @@
 	})
 )
 var (
-	metricsOperationTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	metricsOperationTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "metrics_operation_total",
 		Help:      "operation is a sub-document that holds counters for several types of update and query operations that MongoDB handles using special operation types",
 	}, []string{"type"})
 )
 var (
-	metricsQueryExecutorTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	metricsQueryExecutorTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "metrics_query_executor_total",
 		Help:      "queryExecutor is a document that reports data from the query execution system",
 	}, []string{"state"})
 )
 var (
-	metricsRecordMovesTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsRecordMovesTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_record",
 		Name:      "moves_total",
@@ -71,13 +71,13 @@
 	})
 )
 var (
-	metricsReplApplyBatchesNumTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplApplyBatchesNumTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_apply_batches",
 		Name:      "num_total",
 		Help:      "num reports the total number of batches applied across all databases",
 	})
-	metricsReplApplyBatchesTotalMilliseconds = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplApplyBatchesTotalMilliseconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_apply_batches",
 		Name:      "total_milliseconds",
@@ -85,7 +85,7 @@
 	})
 )
 var (
-	metricsReplApplyOpsTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplApplyOpsTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_apply",
 		Name:      "ops_total",
@@ -99,7 +99,7 @@
 		Name:      "count",
 		Help:      "count reports the current number of operations in the oplog buffer",
 	})
-	metricsReplBufferMaxSizeBytes = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplBufferMaxSizeBytes = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_buffer",
 		Name:      "max_size_bytes",
@@ -113,13 +113,13 @@
 	})
 )
 var (
-	metricsReplNetworkGetmoresNumTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplNetworkGetmoresNumTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_network_getmores",
 		Name:      "num_total",
 		Help:      "num reports the total number of getmore operations, which are operations that request an additional set of operations from the replication sync source.",
 	})
-	metricsReplNetworkGetmoresTotalMilliseconds = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplNetworkGetmoresTotalMilliseconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_network_getmores",
 		Name:      "total_milliseconds",
@@ -127,19 +127,19 @@
 	})
 )
 var (
-	metricsReplNetworkBytesTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplNetworkBytesTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_network",
 		Name:      "bytes_total",
 		Help:      "bytes reports the total amount of data read from the replication sync source",
 	})
-	metricsReplNetworkOpsTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplNetworkOpsTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_network",
 		Name:      "ops_total",
 		Help:      "ops reports the total number of operations read from the replication source.",
 	})
-	metricsReplNetworkReadersCreatedTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplNetworkReadersCreatedTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_network",
 		Name:      "readers_created_total",
@@ -169,13 +169,13 @@
 	})
 )
 var (
-	metricsReplPreloadDocsNumTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplPreloadDocsNumTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_preload_docs",
 		Name:      "num_total",
 		Help:      "num reports the total number of documents loaded during the pre-fetch stage of replication",
 	})
-	metricsReplPreloadDocsTotalMilliseconds = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplPreloadDocsTotalMilliseconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_preload_docs",
 		Name:      "total_milliseconds",
@@ -183,13 +183,13 @@
 	})
 )
 var (
-	metricsReplPreloadIndexesNumTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplPreloadIndexesNumTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_preload_indexes",
 		Name:      "num_total",
 		Help:      "num reports the total number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication",
 	})
-	metricsReplPreloadIndexesTotalMilliseconds = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsReplPreloadIndexesTotalMilliseconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_repl_preload_indexes",
 		Name:      "total_milliseconds",
@@ -197,20 +197,20 @@
 	})
 )
 var (
-	metricsStorageFreelistSearchTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	metricsStorageFreelistSearchTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "metrics_storage_freelist_search_total",
 		Help:      "metrics about searching records in the database.",
 	}, []string{"type"})
 )
 var (
-	metricsTTLDeletedDocumentsTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsTTLDeletedDocumentsTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_ttl",
 		Name:      "deleted_documents_total",
 		Help:      "deletedDocuments reports the total number of documents deleted from collections with a ttl index.",
 	})
-	metricsTTLPassesTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	metricsTTLPassesTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "metrics_ttl",
 		Name:      "passes_total",
--- a/collector/network.go
+++ b/collector/network.go
@@ -5,14 +5,14 @@
 )
 
 var (
-	networkBytesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	networkBytesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "network_bytes_total",
 		Help:      "The network data structure contains data regarding MongoDB's network use",
 	}, []string{"state"})
 )
 var (
-	networkMetricsNumRequestsTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	networkMetricsNumRequestsTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "network_metrics",
 		Name:      "num_requests_total",
--- a/collector/op_counters.go
+++ b/collector/op_counters.go
@@ -5,14 +5,14 @@
 )
 
 var (
-	opCountersTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	opCountersTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "op_counters_total",
 		Help:      "The opcounters data structure provides an overview of database operations by type and makes it possible to analyze the load on the database in more granular manner. These numbers will grow over time and in response to database use. Analyze these values over time to track database utilization",
 	}, []string{"type"})
 )
 var (
-	opCountersReplTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	opCountersReplTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "op_counters_repl_total",
 		Help:      "The opcountersRepl data structure, similar to the opcounters data structure, provides an overview of database replication operations by type and makes it possible to analyze the load on the replica in more granular manner. These values only appear when the current host has replication enabled",
--- a/collector/replset_status.go
+++ b/collector/replset_status.go
@@ -63,7 +63,7 @@
 		Name:      "member_state",
 		Help:      "The value of state is an integer between 0 and 10 that represents the replica state of the member.",
 	}, []string{"set", "name"})
-	memberUptime = prometheus.NewCounterVec(prometheus.CounterOpts{
+	memberUptime = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: subsystem,
 		Name:      "member_uptime",
--- a/collector/server_status.go
+++ b/collector/server_status.go
@@ -10,19 +10,19 @@
 )
 
 var (
-	instanceUptimeSeconds = prometheus.NewCounter(prometheus.CounterOpts{
+	instanceUptimeSeconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "instance",
 		Name:      "uptime_seconds",
 		Help:      "The value of the uptime field corresponds to the number of seconds that the mongos or mongod process has been active.",
 	})
-	instanceUptimeEstimateSeconds = prometheus.NewCounter(prometheus.CounterOpts{
+	instanceUptimeEstimateSeconds = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "instance",
 		Name:      "uptime_estimate_seconds",
 		Help:      "uptimeEstimate provides the uptime as calculated from MongoDB's internal course-grained time keeping system.",
 	})
-	instanceLocalTime = prometheus.NewCounter(prometheus.CounterOpts{
+	instanceLocalTime = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "instance",
 		Name:      "local_time",
--- a/collector/storage_engine.go
+++ b/collector/storage_engine.go
@@ -19,7 +19,7 @@
 )
 
 var (
-	storageEngine = prometheus.NewCounterVec(prometheus.CounterOpts{
+	storageEngine = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "storage_engine",
 		Help:      "The storage engine used by the MongoDB instance",
--- a/collector/top_counters.go
+++ b/collector/top_counters.go
@@ -8,12 +8,12 @@
 )
 
 var (
-	topTimeSecondsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	topTimeSecondsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "top_time_seconds_total",
 		Help:      "The top command provides operation time, in seconds, for each database collection",
 	}, []string{"type", "database", "collection"})
-	topCountTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	topCountTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Name:      "top_count_total",
 		Help:      "The top command provides operation count for each database collection",
--- a/collector/wiredtiger.go
+++ b/collector/wiredtiger.go
@@ -19,13 +19,13 @@
 )
 
 var (
-	wtBlockManagerBlocksTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtBlockManagerBlocksTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_blockmanager",
 		Name:      "blocks_total",
 		Help:      "The total number of blocks read by the WiredTiger BlockManager",
 	}, []string{"type"})
-	wtBlockManagerBytesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtBlockManagerBytesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_blockmanager",
 		Name:      "bytes_total",
@@ -40,7 +40,7 @@
 		Name:      "pages",
 		Help:      "The current number of pages in the WiredTiger Cache",
 	}, []string{"type"})
-	wtCachePagesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtCachePagesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_cache",
 		Name:      "pages_total",
@@ -58,13 +58,13 @@
 		Name:      "max_bytes",
 		Help:      "The maximum size of data in the WiredTiger Cache in bytes",
 	})
-	wtCacheBytesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtCacheBytesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_cache",
 		Name:      "bytes_total",
 		Help:      "The total number of bytes read into/from the WiredTiger Cache",
 	}, []string{"type"})
-	wtCacheEvictedTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtCacheEvictedTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_cache",
 		Name:      "evicted_total",
@@ -79,13 +79,13 @@
 )
 
 var (
-	wtTransactionsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtTransactionsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_transactions",
 		Name:      "total",
 		Help:      "The total number of transactions WiredTiger has handled",
 	}, []string{"type"})
-	wtTransactionsTotalCheckpointMs = prometheus.NewCounter(prometheus.CounterOpts{
+	wtTransactionsTotalCheckpointMs = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_transactions",
 		Name:      "checkpoint_milliseconds_total",
@@ -106,25 +106,25 @@
 )
 
 var (
-	wtLogRecordsScannedTotal = prometheus.NewCounter(prometheus.CounterOpts{
+	wtLogRecordsScannedTotal = prometheus.NewGauge(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_log",
 		Name:      "records_scanned_total",
 		Help:      "The total number of records scanned by log scan in the WiredTiger log",
 	})
-	wtLogRecordsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtLogRecordsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_log",
 		Name:      "records_total",
 		Help:      "The total number of compressed/uncompressed records written to the WiredTiger log",
 	}, []string{"type"})
-	wtLogBytesTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtLogBytesTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_log",
 		Name:      "bytes_total",
 		Help:      "The total number of bytes written to the WiredTiger log",
 	}, []string{"type"})
-	wtLogOperationsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+	wtLogOperationsTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: Namespace,
 		Subsystem: "wiredtiger_log",
 		Name:      "operations_total",