|
@@ -143,7 +143,7 @@ var (
|
|
|
Namespace: "etcd_debugging",
|
|
Namespace: "etcd_debugging",
|
|
|
Subsystem: "mvcc",
|
|
Subsystem: "mvcc",
|
|
|
Name: "db_total_size_in_bytes",
|
|
Name: "db_total_size_in_bytes",
|
|
|
- Help: "Total size of the underlying database in bytes.",
|
|
|
|
|
|
|
+ Help: "Total size of the underlying database physically allocated in bytes. Use etcd_mvcc_db_total_size_in_bytes",
|
|
|
},
|
|
},
|
|
|
func() float64 {
|
|
func() float64 {
|
|
|
reportDbTotalSizeInBytesMu.RLock()
|
|
reportDbTotalSizeInBytesMu.RLock()
|
|
@@ -155,7 +155,7 @@ var (
|
|
|
Namespace: "etcd",
|
|
Namespace: "etcd",
|
|
|
Subsystem: "mvcc",
|
|
Subsystem: "mvcc",
|
|
|
Name: "db_total_size_in_bytes",
|
|
Name: "db_total_size_in_bytes",
|
|
|
- Help: "Total size of the underlying database in bytes.",
|
|
|
|
|
|
|
+ Help: "Total size of the underlying database physically allocated in bytes.",
|
|
|
},
|
|
},
|
|
|
func() float64 {
|
|
func() float64 {
|
|
|
reportDbTotalSizeInBytesMu.RLock()
|
|
reportDbTotalSizeInBytesMu.RLock()
|
|
@@ -166,6 +166,22 @@ var (
|
|
|
// overridden by mvcc initialization
|
|
// overridden by mvcc initialization
|
|
|
reportDbTotalSizeInBytesMu sync.RWMutex
|
|
reportDbTotalSizeInBytesMu sync.RWMutex
|
|
|
reportDbTotalSizeInBytes = func() float64 { return 0 }
|
|
reportDbTotalSizeInBytes = func() float64 { return 0 }
|
|
|
|
|
+
|
|
|
|
|
+ dbTotalSizeInUse = prometheus.NewGaugeFunc(prometheus.GaugeOpts{
|
|
|
|
|
+ Namespace: "etcd",
|
|
|
|
|
+ Subsystem: "mvcc",
|
|
|
|
|
+ Name: "db_total_size_in_use_in_bytes",
|
|
|
|
|
+ Help: "Total size of the underlying database logically in use in bytes.",
|
|
|
|
|
+ },
|
|
|
|
|
+ func() float64 {
|
|
|
|
|
+ reportDbTotalSizeInUseInBytesMu.RLock()
|
|
|
|
|
+ defer reportDbTotalSizeInUseInBytesMu.RUnlock()
|
|
|
|
|
+ return reportDbTotalSizeInUseInBytes()
|
|
|
|
|
+ },
|
|
|
|
|
+ )
|
|
|
|
|
+ // overridden by mvcc initialization
|
|
|
|
|
+ reportDbTotalSizeInUseInBytesMu sync.RWMutex
|
|
|
|
|
+ reportDbTotalSizeInUseInBytes = func() float64 { return 0 }
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
@@ -185,6 +201,7 @@ func init() {
|
|
|
prometheus.MustRegister(dbCompactionKeysCounter)
|
|
prometheus.MustRegister(dbCompactionKeysCounter)
|
|
|
prometheus.MustRegister(dbTotalSizeDebugging)
|
|
prometheus.MustRegister(dbTotalSizeDebugging)
|
|
|
prometheus.MustRegister(dbTotalSize)
|
|
prometheus.MustRegister(dbTotalSize)
|
|
|
|
|
+ prometheus.MustRegister(dbTotalSizeInUse)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ReportEventReceived reports that an event is received.
|
|
// ReportEventReceived reports that an event is received.
|