You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
由于mysql监控项太多了,想忽略些监控项,因此配置了ignore_file,但是虽然配置了ignore_file,发现还是有大量的忽略监控项上报,且监控项前面还多了"_",并没有真正忽略掉这些metrics。
将senddata.go 中的senddata替换成下列,过滤一下即可
var Filter_data []*MetaData
// SendData Post the json of all result to falcon-agent
func SendData(conf *common.Config, data []*MetaData) ([]byte, error) {
data = filterIgnoreData(conf, data)
for , eachData := range data {
eachdata := eachData
if strings.HasPrefix(eachdata.Metric, "") {
continue
} else {
Filter_data = append(Filter_data, eachdata)
}
}
js, err := json.Marshal(Filter_data)
if err != nil {
Log.Debug("parse json data error: %+v", err)
return nil, err
}
Log.Info("Send to %s, size: %d", conf.Base.FalconClient, len(data))
for _, m := range data {
Log.Info("%v", m)
}
由于mysql监控项太多了,想忽略些监控项,因此配置了ignore_file,但是虽然配置了ignore_file,发现还是有大量的忽略监控项上报,且监控项前面还多了"_",并没有真正忽略掉这些metrics。
The text was updated successfully, but these errors were encountered: