Skip to content

Commit c817fd8

Browse files
authored
Merge pull request #61 from msahota14/used_disk_percent
add used_disk_percent metric
2 parents 607be9e + 8c3cac5 commit c817fd8

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

spec.csv

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ elasticsearch,fs.iOOperations,gauge,true,The total I/O operations on the file st
2424
elasticsearch,fs.reads,gauge,true,The total number of reads from the file store
2525
elasticsearch,fs.totalSizeInBytes,gauge,true,The total size in bytes of the file storeshown in bytes
2626
elasticsearch,fs.unallocatedBytesInBYtes,gauge,true,The total number of unallocated bytes in the file storeshown in bytes
27+
elasticsearch,fs.usedDiskPercent,gauge,true,The total percentage of free disk space on the node
2728
elasticsearch,fs.writesInBytes,gauge,true,The total bytes written to the file storeshown in bytes
2829
elasticsearch,fs.writesInBytes,gauge,true,The total number of writes to the file store
2930
elasticsearch,get.currentRequestsRunning,gauge,true,The number of get requests currently running

src/metric_definition.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ type IndicesIDCache struct {
303303

304304
// NodeFs struct
305305
type NodeFs struct {
306-
Total *FsTotal `json:"total"`
307-
IoStats *FsIoStats `json:"io_stats"`
306+
Total *FsTotal `json:"total"`
307+
IoStats *FsIoStats `json:"io_stats"`
308+
MostUsageEstimate *FsMostUsageEstimate `json:"most_usage_estimate"`
308309
}
309310

310311
// NodeBreakers struct
@@ -354,6 +355,11 @@ type FsTotal struct {
354355
DiskIoSizeInBytes *int `json:"disk_io_size_in_bytes" metric_name:"fs.bytesUserIoOperationsInBytes" source_type:"gauge"`
355356
}
356357

358+
// FsMostUsageEstimate struct
359+
type FsMostUsageEstimate struct {
360+
UsedDiskPercent *float64 `json:"used_disk_percent" metric_name:"fs.usedDiskPercent" source_type:"gauge"`
361+
}
362+
357363
// FsIoStats struct
358364
type FsIoStats struct {
359365
Devices *IoStatsTotal `json:"total"`
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"activeSearches":0,"activeSearchesInMilliseconds":0,"breakers.estimatedSizeFieldDataCircuitBreakerInBytes":0,"breakers.estimatedSizeParentCircuitBreakerInBytes":0,"breakers.estimatedSizeRequestCircuitBreakerInBytes":0,"breakers.fieldDataCircuitBreakerTripped":0,"breakers.parentCircuitBreakerTripped":0,"breakers.requestCircuitBreakerTripped":0,"cache.cacheSizeIDInBytes":378599,"displayName":"T6Paw3b","entityName":"es-node:T6Paw3b","event_type":"ElasticsearchNodeSample","flush.indexRefreshesTotal":0,"flush.indexRefreshesTotalInMilliseconds":0,"fs.bytesAvailableJVMInBytes":162707742720,"fs.dataWritten":912832,"fs.iOOperations":235195,"fs.readOperations":99,"fs.totalSizeInBytes":164705353728,"fs.unallocatedBytesInBYtes":162707742720,"fs.writeOperations":235096,"get.currentRequestsRunning":0,"get.requestsDocumentExists":0,"get.requestsDocumentExistsInMilliseconds":0,"get.requestsDocumentMissing":0,"get.requestsDocumentMissingInMilliseconds":0,"get.timeGetRequestsInMilliseconds":0,"get.totalGetRequests":0,"http.currentOpenConnections":2,"http.openedConnections":147,"indexing.docsCurrentlyDeleted":0,"indexing.documentsCurrentlyIndexing":0,"indexing.documentsIndexed":0,"indexing.timeDeletingDocumentsInMilliseconds":0,"indexing.timeIndexingDocumentsInMilliseconds":0,"indexing.totalDocumentsDeleted":0,"indices.indexingOperationsFailed":0,"indices.indexingWaitedThrottlingInMilliseconds":0,"indices.memoryQueryCacheInBytes":0,"indices.numberIndices":0,"indices.queryCacheEvictions":0,"indices.queryCacheHits":0,"indices.queryCacheMisses":0,"indices.recoveryOngoingShardSource":0,"indices.recoveryOngoingShardTarget":0,"indices.recoveryWaitedThrottlingInMilliseconds":0,"indices.requestCacheEvictions":0,"indices.requestCacheHits":0,"indices.requestCacheMemoryInBytes":0,"indices.requestCacheMisses":0,"indices.segmentsIndexShard":0,"indices.segmentsMaxMemoryIndexWriterInBytes":7423798234978,"indices.segmentsMemoryUsedDocValuesInBytes":0,"indices.segmentsMemoryUsedFixedBitSetInBytes":0,"indices.segmentsMemoryUsedIndexSegmentsInBytes":0,"indices.segmentsMemoryUsedIndexWriterInBytes":0,"indices.segmentsMemoryUsedNormsInBytes":0,"indices.segmentsMemoryUsedSegmentVersionMapInBytes":0,"indices.segmentsMemoryUsedStoredFieldsInBytes":0,"indices.segmentsMemoryUsedTermVectorsInBytes":0,"indices.segmentsMemoryUsedTermsInBytes":0,"indices.translogOperations":0,"indices.translogOperationsInBytes":0,"jvm.ThreadsActive":55,"jvm.ThreadsPeak":56,"jvm.gc.collections":100,"jvm.gc.collectionsInMilliseconds":100,"jvm.gc.concurrentMarkSweep":50,"jvm.gc.concurrentMarkSweepInMilliseconds":7238,"jvm.gc.majorCollectionsOldGenerationObjects":2,"jvm.gc.majorCollectionsOldGenerationObjectsInMilliseconds":128,"jvm.gc.minorCollectionsYoungGenerationObjects":108,"jvm.gc.minorCollectionsYoungGenerationObjectsInMilliseconds":1752,"jvm.gc.parallelNewCollections":2189,"jvm.gc.parallelNewCollectionsInMilliseconds":329,"jvm.mem.heapCommittedInBytes":1056309248,"jvm.mem.heapMaxInBytes":1056309248,"jvm.mem.heapUsed":21,"jvm.mem.heapUsedInBytes":225181888,"jvm.mem.maxOldGenerationHeapInBytes":899284992,"jvm.mem.maxSurvivorSpaceInBYtes":17432576,"jvm.mem.maxYoungGenerationHeapInBytes":139591680,"jvm.mem.nonHeapCommittedInBytes":108519424,"jvm.mem.nonHeapUsedInBytes":100466784,"jvm.mem.usedOldGenerationHeapInBytes":127243224,"jvm.mem.usedSurvivorSpaceInBytes":94752,"jvm.mem.usedYoungGenerationHeapInBytes":97843912,"merges.currentActive":0,"merges.docsSegmentMerges":0,"merges.docsSegmentsMerging":0,"merges.mergedSegmentsInBytes":0,"merges.segmentMerges":0,"merges.sizeSegmentsMergingInBytes":0,"merges.totalSegmentMergingInMilliseconds":0,"node.hostname":"10.33.104.186","node.ipAddress":"10.33.104.186:9300,NONE","openFD":213,"queriesTotal":0,"refresh.total":0,"refresh.totalInMilliseconds":0,"reportingEndpoint":":0","searchFetchCurrentlyRunning":0,"searchFetches":0,"sizeStoreInBytes":0,"threadpool.activeFetchShardStarted":0,"threadpool.bulkActive":3,"threadpool.bulkQueue":234,"threadpool.bulkRejected":2,"threadpool.bulkThreads":23,"threadpool.fetchShardStartedQueue":0,"threadpool.fetchShardStartedRejected":0,"threadpool.fetchShardStartedThreads":0,"threadpool.fetchShardStoreActive":0,"threadpool.fetchShardStoreQueue":0,"threadpool.fetchShardStoreRejected":0,"threadpool.fetchShardStoreThreads":0,"threadpool.flushActive":0,"threadpool.flushQueue":0,"threadpool.flushRejected":0,"threadpool.flushThreads":0,"threadpool.forceMergeActive":0,"threadpool.forceMergeQueue":0,"threadpool.forceMergeRejected":0,"threadpool.forceMergeThreads":0,"threadpool.genericActive":0,"threadpool.genericQueue":0,"threadpool.genericRejected":0,"threadpool.genericThreads":5,"threadpool.getActive":0,"threadpool.getQueue":0,"threadpool.getRejected":0,"threadpool.getThreads":0,"threadpool.indexActive":0,"threadpool.indexQueue":0,"threadpool.indexRejected":0,"threadpool.indexThreads":0,"threadpool.listenerActive":0,"threadpool.listenerQueue":0,"threadpool.listenerRejected":0,"threadpool.listenerThreads":0,"threadpool.managementActive":1,"threadpool.managementQueue":0,"threadpool.managementRejected":0,"threadpool.managementThreads":3,"threadpool.mergeActive":3,"threadpool.mergeQueue":39,"threadpool.mergeRejected":837,"threadpool.mergeThreads":9,"threadpool.percolateActive":8,"threadpool.percolateQueue":78,"threadpool.percolateRejected":8,"threadpool.percolateThreads":9,"threadpool.refreshActive":0,"threadpool.refreshQueue":0,"threadpool.refreshRejected":0,"threadpool.refreshThreads":0,"threadpool.searchActive":0,"threadpool.searchQueue":0,"threadpool.searchRejected":0,"threadpool.searchThreads":0,"threadpool.snapshotActive":0,"threadpool.snapshotQueue":0,"threadpool.snapshotRejected":0,"threadpool.snapshotThreads":0,"transport.connectionsOpened":0,"transport.packetsReceived":20,"transport.packetsReceivedInBytes":11691,"transport.packetsSent":20,"transport.packetsSentInBytes":11691}
1+
{"activeSearches":0,"activeSearchesInMilliseconds":0,"breakers.estimatedSizeFieldDataCircuitBreakerInBytes":0,"breakers.estimatedSizeParentCircuitBreakerInBytes":0,"breakers.estimatedSizeRequestCircuitBreakerInBytes":0,"breakers.fieldDataCircuitBreakerTripped":0,"breakers.parentCircuitBreakerTripped":0,"breakers.requestCircuitBreakerTripped":0,"cache.cacheSizeIDInBytes":378599,"displayName":"T6Paw3b","entityName":"es-node:T6Paw3b","event_type":"ElasticsearchNodeSample","flush.indexRefreshesTotal":0,"flush.indexRefreshesTotalInMilliseconds":0,"fs.bytesAvailableJVMInBytes":162707742720,"fs.dataWritten":912832,"fs.iOOperations":235195,"fs.readOperations":99,"fs.totalSizeInBytes":164705353728,"fs.unallocatedBytesInBYtes":162707742720,"fs.usedDiskPercent":1.2128391474747815,"fs.writeOperations":235096,"get.currentRequestsRunning":0,"get.requestsDocumentExists":0,"get.requestsDocumentExistsInMilliseconds":0,"get.requestsDocumentMissing":0,"get.requestsDocumentMissingInMilliseconds":0,"get.timeGetRequestsInMilliseconds":0,"get.totalGetRequests":0,"http.currentOpenConnections":2,"http.openedConnections":147,"indexing.docsCurrentlyDeleted":0,"indexing.documentsCurrentlyIndexing":0,"indexing.documentsIndexed":0,"indexing.timeDeletingDocumentsInMilliseconds":0,"indexing.timeIndexingDocumentsInMilliseconds":0,"indexing.totalDocumentsDeleted":0,"indices.indexingOperationsFailed":0,"indices.indexingWaitedThrottlingInMilliseconds":0,"indices.memoryQueryCacheInBytes":0,"indices.numberIndices":0,"indices.queryCacheEvictions":0,"indices.queryCacheHits":0,"indices.queryCacheMisses":0,"indices.recoveryOngoingShardSource":0,"indices.recoveryOngoingShardTarget":0,"indices.recoveryWaitedThrottlingInMilliseconds":0,"indices.requestCacheEvictions":0,"indices.requestCacheHits":0,"indices.requestCacheMemoryInBytes":0,"indices.requestCacheMisses":0,"indices.segmentsIndexShard":0,"indices.segmentsMaxMemoryIndexWriterInBytes":7423798234978,"indices.segmentsMemoryUsedDocValuesInBytes":0,"indices.segmentsMemoryUsedFixedBitSetInBytes":0,"indices.segmentsMemoryUsedIndexSegmentsInBytes":0,"indices.segmentsMemoryUsedIndexWriterInBytes":0,"indices.segmentsMemoryUsedNormsInBytes":0,"indices.segmentsMemoryUsedSegmentVersionMapInBytes":0,"indices.segmentsMemoryUsedStoredFieldsInBytes":0,"indices.segmentsMemoryUsedTermVectorsInBytes":0,"indices.segmentsMemoryUsedTermsInBytes":0,"indices.translogOperations":0,"indices.translogOperationsInBytes":0,"jvm.ThreadsActive":55,"jvm.ThreadsPeak":56,"jvm.gc.collections":100,"jvm.gc.collectionsInMilliseconds":100,"jvm.gc.concurrentMarkSweep":50,"jvm.gc.concurrentMarkSweepInMilliseconds":7238,"jvm.gc.majorCollectionsOldGenerationObjects":2,"jvm.gc.majorCollectionsOldGenerationObjectsInMilliseconds":128,"jvm.gc.minorCollectionsYoungGenerationObjects":108,"jvm.gc.minorCollectionsYoungGenerationObjectsInMilliseconds":1752,"jvm.gc.parallelNewCollections":2189,"jvm.gc.parallelNewCollectionsInMilliseconds":329,"jvm.mem.heapCommittedInBytes":1056309248,"jvm.mem.heapMaxInBytes":1056309248,"jvm.mem.heapUsed":21,"jvm.mem.heapUsedInBytes":225181888,"jvm.mem.maxOldGenerationHeapInBytes":899284992,"jvm.mem.maxSurvivorSpaceInBYtes":17432576,"jvm.mem.maxYoungGenerationHeapInBytes":139591680,"jvm.mem.nonHeapCommittedInBytes":108519424,"jvm.mem.nonHeapUsedInBytes":100466784,"jvm.mem.usedOldGenerationHeapInBytes":127243224,"jvm.mem.usedSurvivorSpaceInBytes":94752,"jvm.mem.usedYoungGenerationHeapInBytes":97843912,"merges.currentActive":0,"merges.docsSegmentMerges":0,"merges.docsSegmentsMerging":0,"merges.mergedSegmentsInBytes":0,"merges.segmentMerges":0,"merges.sizeSegmentsMergingInBytes":0,"merges.totalSegmentMergingInMilliseconds":0,"node.hostname":"10.33.104.186","node.ipAddress":"10.33.104.186:9300,NONE","openFD":213,"queriesTotal":0,"refresh.total":0,"refresh.totalInMilliseconds":0,"reportingEndpoint":":0","searchFetchCurrentlyRunning":0,"searchFetches":0,"sizeStoreInBytes":0,"threadpool.activeFetchShardStarted":0,"threadpool.bulkActive":3,"threadpool.bulkQueue":234,"threadpool.bulkRejected":2,"threadpool.bulkThreads":23,"threadpool.fetchShardStartedQueue":0,"threadpool.fetchShardStartedRejected":0,"threadpool.fetchShardStartedThreads":0,"threadpool.fetchShardStoreActive":0,"threadpool.fetchShardStoreQueue":0,"threadpool.fetchShardStoreRejected":0,"threadpool.fetchShardStoreThreads":0,"threadpool.flushActive":0,"threadpool.flushQueue":0,"threadpool.flushRejected":0,"threadpool.flushThreads":0,"threadpool.forceMergeActive":0,"threadpool.forceMergeQueue":0,"threadpool.forceMergeRejected":0,"threadpool.forceMergeThreads":0,"threadpool.genericActive":0,"threadpool.genericQueue":0,"threadpool.genericRejected":0,"threadpool.genericThreads":5,"threadpool.getActive":0,"threadpool.getQueue":0,"threadpool.getRejected":0,"threadpool.getThreads":0,"threadpool.indexActive":0,"threadpool.indexQueue":0,"threadpool.indexRejected":0,"threadpool.indexThreads":0,"threadpool.listenerActive":0,"threadpool.listenerQueue":0,"threadpool.listenerRejected":0,"threadpool.listenerThreads":0,"threadpool.managementActive":1,"threadpool.managementQueue":0,"threadpool.managementRejected":0,"threadpool.managementThreads":3,"threadpool.mergeActive":3,"threadpool.mergeQueue":39,"threadpool.mergeRejected":837,"threadpool.mergeThreads":9,"threadpool.percolateActive":8,"threadpool.percolateQueue":78,"threadpool.percolateRejected":8,"threadpool.percolateThreads":9,"threadpool.refreshActive":0,"threadpool.refreshQueue":0,"threadpool.refreshRejected":0,"threadpool.refreshThreads":0,"threadpool.searchActive":0,"threadpool.searchQueue":0,"threadpool.searchRejected":0,"threadpool.searchThreads":0,"threadpool.snapshotActive":0,"threadpool.snapshotQueue":0,"threadpool.snapshotRejected":0,"threadpool.snapshotThreads":0,"transport.connectionsOpened":0,"transport.packetsReceived":20,"transport.packetsReceivedInBytes":11691,"transport.packetsSent":20,"transport.packetsSentInBytes":11691}

0 commit comments

Comments
 (0)