| | |
| | | } |
| | | //请求头 |
| | | localConf, err2 := cache.GetServerInfo() |
| | | if err2 !=nil || localConf.AlarmIp == "" || localConf.ServerId == "" { |
| | | if err2 != nil || localConf.AlarmIp == "" || localConf.ServerId == "" { |
| | | logger.Debug("localConfig is wrong!!!") |
| | | util.ResponseFormat(c,code.ComError,"localConf wrong") |
| | | util.ResponseFormat(c, code.ComError, "localConf wrong") |
| | | return |
| | | } |
| | | url := "http://" + localConf.AlarmIp + ":" + strconv.Itoa(int(localConf.AlarmPort)) + |
| | |
| | | linkTagInfoAnalyServerFilterStr + |
| | | "{\"range\":{\"linkTagInfo.picDate\":{\"gte\":\"now+8h-15s\",\"lt\":\"now+8h\"}}}" + |
| | | "]}}" + |
| | | "]}}," + |
| | | "],\"minimum_should_match\":1}}," + |
| | | "\"sort\":[{\"picDate\":{\"order\":\"desc\"}}]," + |
| | | "\"size\":\"1000\"," + |
| | | "\"_source\":{\"includes\":[],\"excludes\":[\"*.feature\"]}}" |
| | | logger.Debug("monitor param:",prama) |
| | | logger.Debug("monitor url:",url) |
| | | logger.Debug("monitor param:", prama) |
| | | logger.Debug("monitor url:", url) |
| | | tokenRes := esutil.GetEsDataReq(url, prama, true) |
| | | /* for _, value := range tokenRes["datalist"].([]interface{}) { |
| | | if value.(map[string]interface{})["personId"] != nil { |
| | |
| | | } |
| | | } |
| | | }*/ |
| | | util.ResponseFormat(c, code.Success, tokenRes) |
| | | tmpAllDate := esutil.ResponseData(tokenRes) |
| | | util.ResponseFormat(c, code.Success, tmpAllDate) |
| | | } |