Skip to content

Commit

Permalink
Merge pull request mattbaird#189 from weberr13/addedMoreInfoToNodeStats
Browse files Browse the repository at this point in the history
Filled the node status response a bit more
  • Loading branch information
mattbaird committed May 6, 2015
2 parents 7ea98ae + 1f0107a commit a0300cf
Showing 1 changed file with 135 additions and 6 deletions.
141 changes: 135 additions & 6 deletions lib/clusterstatresponses.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,36 @@ type NodeStatsNodeResponse struct {
Timestamp int64 `json:"timestamp"`
TransportAddress string `json:"transport_address"`
Hostname string `json:"hostname"`
Host string `json:"host"`
IP []string `json:"ip"`
Attributes NodeStatsNodeAttributes `json:"attributes"`
Indices NodeStatsIndicesResponse `json:"indices"`
OS NodeStatsOSResponse `json:"os"`
Process NodeStatsProcessResponse `json:"process"`
JVM NodeStatsJVMResponse `json:"jvm"`
Network NodeStatsNetworkResponse `json:"network"`
FS NodeStatsFSResponse `json:"fs"`
ThreadPool map[string]NodeStatsThreadPoolPoolResponse `json:"thread_pool"`
Transport NodeStatsTransportResponse `json:"transport"`
FieldDataBreaker NodeStatsFieldDataBreakerResponse `json:"fielddata_breaker"`
}

type NodeStatsNodeAttributes struct {
Data bool
Client bool
}
type NodeStatsNetworkResponse struct {
TCP NodeStatsTCPResponse `json:"tcp"`
}

type NodeStatsFieldDataBreakerResponse struct {
MaximumSizeInBytes int64 `json:"maximum_size_in_bytes"`
MaximumSize int64 `json:"maximum_size"`
EstimatedSizeInBytes int64 `json:"estimated_size_in_bytes"`
EstimatedSize int64 `json:"estimated_size"`
Overhead int64 `json:"overhead"`
Tripped int64 `json:"tripped"`
}
type NodeStatsTransportResponse struct {
ServerOpen int64 `json:"server_open"`
RxCount int64 `json:"rx_count"`
Expand Down Expand Up @@ -52,11 +71,23 @@ type NodeStatsTCPResponse struct {
}

type NodeStatsIndicesResponse struct {
Docs NodeStatsIndicesDocsResponse
Store NodeStatsIndicesStoreResponse
Indexing NodeStatsIndicesIndexingResponse
Get NodeStatsIndicesGetResponse
Search NodeStatsIndicesSearchResponse
Docs NodeStatsIndicesDocsResponse `json:"docs"`
Store NodeStatsIndicesStoreResponse `json:"store"`
Indexing NodeStatsIndicesIndexingResponse `json:"indexing"`
Get NodeStatsIndicesGetResponse `json:"get"`
Search NodeStatsIndicesSearchResponse `json:"search"`
Merges NodeStatsIndicesMergesResponse `json:"merges"`
Refresh NodeStatsIndicesRefreshResponse `json:"refresh"`
Flush NodeStatsIndicesFlushResponse `json:"flush"`
Warmer NodeStatsIndicesWarmerResponse `json:"warmer"`
FilterCache NodeStatsIndicesFilterCacheResponse `json:"filter_cache"`
IdCache NodeStatsIndicesIdCacheResponse `json:"id_cache"`
FieldData NodeStatsIndicesFieldDataResponse `json:"fielddata"`
Percolate NodeStatsIndicesPercolateResponse `json:"percolate"`
Completion NodeStatsIndicesCompletionResponse `json:"completion"`
Segments NodeStatsIndicesSegmentsResponse `json:"segments"`
Translog NodeStatsIndicesTranslogResponse `json:"translog"`
Suggest NodeStatsIndicesSuggestResponse `json:"suggest"`
}

type NodeStatsIndicesDocsResponse struct {
Expand Down Expand Up @@ -97,7 +128,65 @@ type NodeStatsIndicesSearchResponse struct {
FetchTime int64 `json:"fetch_time_in_millis"`
FetchCurrent int64 `json:"fetch_current"`
}

type NodeStatsIndicesMergesResponse struct {
Current int64 `json:"current"`
CurrentDocs int64 `json:"current_docs"`
CurrentSizeInBytes int64 `json:"current_size_in_bytes"`
Total int64 `json:"total"`
TotalTimeInMs int64 `json:"total_time_in_millis"`
TotalDocs int64 `json:"total_docs"`
TotalSizeInBytes int64 `json:"total_size_in_bytes"`
}
type NodeStatsIndicesRefreshResponse struct {
Total int64 `json:"total"`
TotalTimeInMs int64 `json:"total_time_in_millis"`
}
type NodeStatsIndicesFlushResponse struct {
Total int64 `json:"total"`
TotalTimeInMs int64 `json:"total_time_in_millis"`
}
type NodeStatsIndicesWarmerResponse struct {
Current int64 `json:"current"`
Total int64 `json:"total"`
TotalTimeInMs int64 `json:"total_time_in_millis"`
}
type NodeStatsIndicesFilterCacheResponse struct {
MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
Evictions int64 `json:"evictions"`
}
type NodeStatsIndicesIdCacheResponse struct {
MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
}
type NodeStatsIndicesFieldDataResponse struct {
MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
Evictions int64 `json:"evictions"`
}
type NodeStatsIndicesPercolateResponse struct {
Total int64 `json:"total"`
TimeInMs int64 `json:"time_in_millis"`
Current int64 `json:"current"`
MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
MemorySize int64 `json:"memory_size"`
Queries int64 `json:"queries"`
}
type NodeStatsIndicesCompletionResponse struct {
SizeInBytes int64 `json:"size_in_bytes"`
}
type NodeStatsIndicesSegmentsResponse struct {
Count int64 `json:"count"`
MemoryInBytes int64 `json:"memory_in_bytes"`
IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"`
VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes"`
}
type NodeStatsIndicesTranslogResponse struct {
Operations int64 `json:"operations"`
SizeInBytes int64 `json:"size_in_bytes"`
}
type NodeStatsIndicesSuggestResponse struct {
Total int64 `json:"total"`
TimeInMs int64 `json:"time_in_millis"`
Current int64 `json:"current"`
}
type NodeStatsOSResponse struct {
Timestamp int64 `json:"timestamp"`
Uptime int64 `json:"uptime_in_millis"`
Expand Down Expand Up @@ -146,6 +235,46 @@ type NodeStatsProcessCPUResponse struct {
Total int64 `json:"total_in_millis"`
}

type NodeStatsJVMResponse struct {
Timestame int64 `json:"timestamp"`
UptimeInMs int64 `json:"uptime_in_millis"`
Mem NodeStatsJVMMemResponse `json:"mem"`
Threads NodeStatsJVMThreadsResponse `json:"threads"`
GC NodeStatsJVMGCResponse `json:"gc"`
BufferPools map[string]NodeStatsJVMBufferPoolsResponse `json:"buffer_pools"`
}

type NodeStatsJVMMemResponse struct {
HeapUsedInBytes int64 `json:"heap_used_in_bytes"`
HeapUsedPercent int64 `json:"heap_used_percent"`
HeapCommitedInBytes int64 `json:"heap_commited_in_bytes"`
HeapMaxInBytes int64 `json:"heap_max_in_bytes"`
NonHeapUsedInBytes int64 `json:"non_heap_used_in_bytes"`
NonHeapCommittedInBytes int64 `json:"non_heap_committed_in_bytes"`
Pools map[string]NodeStatsJVMMemPoolsResponse `json:"pools"`
}
type NodeStatsJVMMemPoolsResponse struct {
UsedInBytes int64 `json:"used_in_bytes"`
MaxInBytes int64 `json:"max_in_bytes"`
PeakUsedInBytes int64 `json:"peak_used_in_bytes"`
PeakMaxInBytes int64 `json:"peak_max_in_bytes"`
}
type NodeStatsJVMThreadsResponse struct {
Count int64 `json:"count"`
PeakCount int64 `json:"peak_count"`
}
type NodeStatsJVMGCResponse struct {
Collectors map[string]NodeStatsJVMGCCollectorsAgeResponse `json:"collectors"`
}
type NodeStatsJVMGCCollectorsAgeResponse struct {
Count int64 `json:"collection_count"`
TimeInMs int64 `json:"collection_time_in_millis"`
}
type NodeStatsJVMBufferPoolsResponse struct {
Count int64 `json:"count"`
UsedInBytes int64 `json:"used_in_bytes"`
TotalCapacityInBytes int64 `json:"total_capacity_in_bytes"`
}
type NodeStatsHTTPResponse struct {
CurrentOpen int64 `json:"current_open"`
TotalOpen int64 `json:"total_open"`
Expand Down

0 comments on commit a0300cf

Please sign in to comment.