Merge branch 'master' of github.com:didi/nightingale

This commit is contained in:
710leo 2020-05-12 20:07:24 +08:00
commit 71f9aa0618
2 changed files with 5 additions and 1 deletions

View File

@ -41,4 +41,6 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
sys.stdout.flush()
main() main()
sys.stdout.flush()

View File

@ -99,10 +99,12 @@ func PluginRun(plugin *Plugin) {
// exec successfully // exec successfully
data := stdout.Bytes() data := stdout.Bytes()
if len(data) == 0 { if len(data) == 0 {
logger.Debug("stdout of", fpath, "is blank") logger.Debug("stdout of ", fpath, " is blank")
return return
} }
logger.Debug(fpath, " stdout: ", string(data))
var items []*dataobj.MetricValue var items []*dataobj.MetricValue
err = json.Unmarshal(data, &items) err = json.Unmarshal(data, &items)
if err != nil { if err != nil {