Skip to content

Commit

Permalink
Merge pull request #4 from mihirsoni/issue-2
Browse files Browse the repository at this point in the history
search only in monitor index fixes #3
  • Loading branch information
mihirsoni authored Jul 26, 2019
2 parents 5254118 + 9a3e779 commit 6bb7555
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion destination/destinations.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

//FileName where destinations are stored and read from
const FileName = "destinations.yaml"
const indexSearchURL = "/.opendistro-alerting-config/_search"

//GetLocal Parse local destinations
func GetLocal(rootDir string) (map[string]string, error) {
Expand Down Expand Up @@ -44,7 +45,7 @@ func GetRemote(esClient es.Client) (map[string]string, error) {
// Adding 10k which will not be the case.
getAllDestinationQuery := []byte(`{"size": 10000, "query":{ "bool": {"must": { "exists": { "field" : "destination" }}}}}`)
resp, err := esClient.MakeRequest(http.MethodPost,
"/_search",
indexSearchURL,
getAllDestinationQuery,
getCommonHeaders(),
)
Expand Down

0 comments on commit 6bb7555

Please sign in to comment.