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

Add xpack data structure for Elasticsearch index_summary metricset #7102

Merged
merged 2 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion metricbeat/module/elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type NodeInfo struct {
TransportAddress string `json:"transport_address"`
IP string `json:"ip"`
Name string `json:"name"`
ID string
}

// GetClusterID fetches cluster id for given nodeID
Expand Down Expand Up @@ -147,7 +148,9 @@ func GetNodeInfo(http *helper.HTTP, uri string, nodeID string) (*NodeInfo, error

// _local will only fetch one node info. First entry is node name
for k, v := range nodesStruct.Nodes {
if k == nodeID {
// In case the nodeID is empty, first node info will be returned
if k == nodeID || nodeID == "" {
v.ID = k
return v, nil
}
}
Expand Down
Loading