feat(inputs.ravendb): Add new disk metrics fields (#13433)
This commit is contained in:
parent
ae2ea383b8
commit
866d77192c
|
|
@ -157,6 +157,11 @@ cluster.
|
|||
- storage_indexes_used_data_file_in_mb
|
||||
- storage_total_allocated_storage_file_in_mb
|
||||
- storage_total_free_space_in_mb
|
||||
- storage_io_read_operations (optional, requires RavenDB v5.4.105+)
|
||||
- storage_io_write_operations (optional, requires RavenDB v5.4.105+)
|
||||
- storage_read_throughput_in_kb (optional, requires RavenDB v5.4.105+)
|
||||
- storage_write_throughput_in_kb (optional, requires RavenDB v5.4.105+)
|
||||
- storage_queue_length (optional, requires RavenDB v5.4.105+)
|
||||
- time_since_last_backup_in_sec (optional)
|
||||
- uptime_in_sec
|
||||
|
||||
|
|
|
|||
|
|
@ -262,6 +262,11 @@ func (r *RavenDB) gatherDatabases(acc telegraf.Accumulator) {
|
|||
"storage_indexes_used_data_file_in_mb": dbResponse.Storage.IndexesUsedDataFileInMb,
|
||||
"storage_total_allocated_storage_file_in_mb": dbResponse.Storage.TotalAllocatedStorageFileInMb,
|
||||
"storage_total_free_space_in_mb": dbResponse.Storage.TotalFreeSpaceInMb,
|
||||
"storage_io_read_operations": dbResponse.Storage.IoReadOperations,
|
||||
"storage_io_write_operations": dbResponse.Storage.IoWriteOperations,
|
||||
"storage_read_throughput_in_kb": dbResponse.Storage.ReadThroughputInKb,
|
||||
"storage_write_throughput_in_kb": dbResponse.Storage.WriteThroughputInKb,
|
||||
"storage_queue_length": dbResponse.Storage.QueueLength,
|
||||
"time_since_last_backup_in_sec": dbResponse.TimeSinceLastBackupInSec,
|
||||
"uptime_in_sec": dbResponse.UptimeInSec,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,12 +143,17 @@ type databaseIndexesMetrics struct {
|
|||
}
|
||||
|
||||
type databaseStorageMetrics struct {
|
||||
DocumentsAllocatedDataFileInMb int64 `json:"DocumentsAllocatedDataFileInMb"`
|
||||
DocumentsUsedDataFileInMb int64 `json:"DocumentsUsedDataFileInMb"`
|
||||
IndexesAllocatedDataFileInMb int64 `json:"IndexesAllocatedDataFileInMb"`
|
||||
IndexesUsedDataFileInMb int64 `json:"IndexesUsedDataFileInMb"`
|
||||
TotalAllocatedStorageFileInMb int64 `json:"TotalAllocatedStorageFileInMb"`
|
||||
TotalFreeSpaceInMb int64 `json:"TotalFreeSpaceInMb"`
|
||||
DocumentsAllocatedDataFileInMb int64 `json:"DocumentsAllocatedDataFileInMb"`
|
||||
DocumentsUsedDataFileInMb int64 `json:"DocumentsUsedDataFileInMb"`
|
||||
IndexesAllocatedDataFileInMb int64 `json:"IndexesAllocatedDataFileInMb"`
|
||||
IndexesUsedDataFileInMb int64 `json:"IndexesUsedDataFileInMb"`
|
||||
TotalAllocatedStorageFileInMb int64 `json:"TotalAllocatedStorageFileInMb"`
|
||||
TotalFreeSpaceInMb int64 `json:"TotalFreeSpaceInMb"`
|
||||
IoReadOperations *float64 `json:"IoReadOperations"`
|
||||
IoWriteOperations *float64 `json:"IoWriteOperations"`
|
||||
ReadThroughputInKb *int64 `json:"ReadThroughputInKb"`
|
||||
WriteThroughputInKb *int64 `json:"WriteThroughputInKb"`
|
||||
QueueLength *int64 `json:"QueueLength"`
|
||||
}
|
||||
|
||||
type indexesMetricResponse struct {
|
||||
|
|
|
|||
|
|
@ -140,6 +140,11 @@ func TestRavenDBGeneratesMetricsFull(t *testing.T) {
|
|||
"storage_indexes_used_data_file_in_mb": 278,
|
||||
"storage_total_allocated_storage_file_in_mb": 1496,
|
||||
"storage_total_free_space_in_mb": 52074,
|
||||
"storage_io_read_operations": 0.5,
|
||||
"storage_io_write_operations": 0.7,
|
||||
"storage_read_throughput_in_kb": 2137,
|
||||
"storage_write_throughput_in_kb": 2115,
|
||||
"storage_queue_length": 15,
|
||||
}
|
||||
|
||||
dbTags := map[string]string{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,12 @@
|
|||
"IndexesAllocatedDataFileInMb": 464,
|
||||
"IndexesUsedDataFileInMb": 278,
|
||||
"TotalAllocatedStorageFileInMb": 1496,
|
||||
"TotalFreeSpaceInMb": 52074
|
||||
"TotalFreeSpaceInMb": 52074,
|
||||
"IoReadOperations": 0.5,
|
||||
"IoWriteOperations": 0.7,
|
||||
"ReadThroughputInKb": 2137,
|
||||
"WriteThroughputInKb": 2115,
|
||||
"QueueLength": 15
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue