grafana - logging if image send

This commit is contained in:
Martin/Geno 2019-02-13 19:24:53 +01:00
parent 2d49586312
commit cfd2694693
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
2 changed files with 4 additions and 3 deletions

View File

@ -72,11 +72,12 @@ func init() {
if ruleURL.Hostname() != hook.URL { if ruleURL.Hostname() != hook.URL {
continue continue
} }
logger.Infof("run hook")
runtime.Notify(client, hook, request.String()) runtime.Notify(client, hook, request.String())
if request.ImageURL != "" { if request.ImageURL != "" {
logger = logger.WithField("image", request.ImageURL)
runtime.NotifyImage(client, hook, request.ImageURL) runtime.NotifyImage(client, hook, request.ImageURL)
} }
logger.Infof("run hook")
ok = true ok = true
} }
if !ok { if !ok {