func (m *Slack) Run(ctx *core.Context) error {
	err := ctx.Next()
	ctx.Stop(err)
	if ctx.Execution.Failed || !m.SlackOnlyOnError {
		m.pushMessage(ctx)
	}
	return err
}
Run sends a message to the slack channel, its close stop the exection to
collect the metrics
package middlewares
import (
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"github.com/mcuadros/ofelia/core"
)
var (
	slackUsername   = "Ofelia"
	slackAvatarURL  = "https://raw.githubusercontent.com/mcuadros/ofelia/master/static/avatar.png"
	slackPayloadVar = "payload"
)
type SlackConfig struct {
	SlackWebhook     string `gcfg:"slack-webhook" mapstructure:"slack-webhook"`
	SlackOnlyOnError bool   `gcfg:"slack-only-on-error" mapstructure:"slack-only-on-error"`
}
func NewSlack(c *SlackConfig) core.Middleware {
	var m core.Middleware
	if !IsEmpty(c) {
		m = &Slack{*c}
	}
	return m
}
type Slack struct {
	SlackConfig
}
func (m *Slack) ContinueOnStop() bool {
	return true
}