Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/elasticsearchreceiver] Fix client request nodeStatsPath to collect supported metrics #13983

Closed
3 tasks done
JonathanWamsley opened this issue Sep 8, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@JonathanWamsley
Copy link
Contributor

JonathanWamsley commented Sep 8, 2022

Describe the bug
When metrics where added, a mock was done correctly but the client request path were never updated.

const nodeStatsMetrics = "breaker,indices,process,jvm,thread_pool,transport,http,fs,indexing_pressure,ingest,indices,adaptive_selection,discovery"
// nodeStatsIndexMetrics is a comma separated list of index metrics that will be gathered from NodeStats.
const nodeStatsIndexMetrics = "store,docs,indexing,get,search,merge,refresh,flush,warmer,query_cache,fielddata"

os, script should be added to the nodeStatsMetrics

type NodeStatsNodesInfo struct {
TimestampMsSinceEpoch int64 `json:"timestamp"`
Name string `json:"name"`
Indices NodeStatsNodesInfoIndices `json:"indices"`
ProcessStats ProcessStats `json:"process"`
JVMInfo JVMInfo `json:"jvm"`
ThreadPoolInfo map[string]ThreadPoolStats `json:"thread_pool"`
TransportStats TransportStats `json:"transport"`
HTTPStats HTTPStats `json:"http"`
CircuitBreakerInfo map[string]CircuitBreakerStats `json:"breakers"`
FS FSStats `json:"fs"`
OS OSStats `json:"os"`
IndexingPressure IndexingPressure `json:"indexing_pressure"`
Discovery Discovery `json:"discovery"`
Ingest Ingest `json:"ingest"`
Script Script `json:"script"`

translog should be included in the nodeStatsIndexMetrics

type NodeStatsNodesInfoIndices struct {
StoreInfo StoreInfo `json:"store"`
DocumentStats DocumentStats `json:"docs"`
IndexingOperations IndexingOperations `json:"indexing"`
GetOperation GetOperation `json:"get"`
SearchOperations SearchOperations `json:"search"`
MergeOperations BasicIndexOperation `json:"merges"`
RefreshOperations BasicIndexOperation `json:"refresh"`
FlushOperations BasicIndexOperation `json:"flush"`
WarmerOperations BasicIndexOperation `json:"warmer"`
QueryCache BasicCacheInfo `json:"query_cache"`
FieldDataCache BasicCacheInfo `json:"fielddata"`
TranslogStats TranslogStats `json:"translog"`

This can be seen in the 7.16 integration test that was recently updated for the following metric paths:

Steps to reproduce
Running ES or integration test and observing zero metric values for said metrics.

What did you expect to see?
In the client request, the above metric paths.

What did you see instead?
In the client request, the above metric paths missing os, script and translog.
This can be easily observed with the zero metric values in the integration test.

What version did you use?
elasticsearchreceiver v0.59.0

@JonathanWamsley JonathanWamsley added the bug Something isn't working label Sep 8, 2022
@JonathanWamsley
Copy link
Contributor Author

@djaglowski Is one PR good or would you prefer 3 different PR's for the os , script and translog separately?

@djaglowski
Copy link
Member

@JonathanWamsley, separate please

@JonathanWamsley
Copy link
Contributor Author

Resolved with #13985 #13986 and #13988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants