chore: adapter node metrics query with `cluster_id ` or `cluster uuid` (#28)
This commit is contained in:
parent
5a02966f2d
commit
9cb54a3381
|
@ -566,9 +566,23 @@ func (h *APIHandler) GetClusterNodes(w http.ResponseWriter, req *http.Request, p
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"term": util.MapStr{
|
"bool": util.MapStr{
|
||||||
"metadata.labels.cluster_uuid": util.MapStr{
|
"minimum_should_match": 1,
|
||||||
"value": clusterUUID,
|
"should": []util.MapStr{
|
||||||
|
{
|
||||||
|
"term": util.MapStr{
|
||||||
|
"metadata.labels.cluster_id": util.MapStr{
|
||||||
|
"value": id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"term": util.MapStr{
|
||||||
|
"metadata.labels.cluster_uuid": util.MapStr{
|
||||||
|
"value": clusterUUID,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -117,9 +117,23 @@ func (h *APIHandler) getNodeMetrics(ctx context.Context, clusterID string, bucke
|
||||||
|
|
||||||
var must = []util.MapStr{
|
var must = []util.MapStr{
|
||||||
{
|
{
|
||||||
"term":util.MapStr{
|
"bool": util.MapStr{
|
||||||
"metadata.labels.cluster_uuid":util.MapStr{
|
"minimum_should_match": 1,
|
||||||
"value": clusterUUID,
|
"should": []util.MapStr{
|
||||||
|
{
|
||||||
|
"term": util.MapStr{
|
||||||
|
"metadata.labels.cluster_id": util.MapStr{
|
||||||
|
"value": clusterID,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"term": util.MapStr{
|
||||||
|
"metadata.labels.cluster_uuid": util.MapStr{
|
||||||
|
"value": clusterUUID,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue