diff --git a/plugins/inputs/ravendb/README.md b/plugins/inputs/ravendb/README.md index 75293e240..0466ea4bf 100644 --- a/plugins/inputs/ravendb/README.md +++ b/plugins/inputs/ravendb/README.md @@ -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 diff --git a/plugins/inputs/ravendb/ravendb.go b/plugins/inputs/ravendb/ravendb.go index 08d0c44ff..b540dfb2a 100644 --- a/plugins/inputs/ravendb/ravendb.go +++ b/plugins/inputs/ravendb/ravendb.go @@ -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, } diff --git a/plugins/inputs/ravendb/ravendb_dto.go b/plugins/inputs/ravendb/ravendb_dto.go index 87ae34dcc..d2793e0d7 100644 --- a/plugins/inputs/ravendb/ravendb_dto.go +++ b/plugins/inputs/ravendb/ravendb_dto.go @@ -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 { diff --git a/plugins/inputs/ravendb/ravendb_test.go b/plugins/inputs/ravendb/ravendb_test.go index 3da1d0190..a3733693b 100644 --- a/plugins/inputs/ravendb/ravendb_test.go +++ b/plugins/inputs/ravendb/ravendb_test.go @@ -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{ diff --git a/plugins/inputs/ravendb/testdata/databases_full.json b/plugins/inputs/ravendb/testdata/databases_full.json index 1c7456881..4ec9696ba 100644 --- a/plugins/inputs/ravendb/testdata/databases_full.json +++ b/plugins/inputs/ravendb/testdata/databases_full.json @@ -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 } } ]