parent
3b9e40c5d4
commit
18164fdb16
|
@ -409,13 +409,15 @@ type Notifier interface {
|
||||||
// call notify.so via golang plugin build
|
// call notify.so via golang plugin build
|
||||||
// ig. etc/script/notify/notify.so
|
// ig. etc/script/notify/notify.so
|
||||||
func alertingCallPlugin(stdinBytes []byte) {
|
func alertingCallPlugin(stdinBytes []byte) {
|
||||||
|
if !config.C.Alerting.CallPlugin.Enable {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
logger.Errorf("call notify plugin on unsupported os: %s", runtime.GOOS)
|
logger.Errorf("call notify plugin on unsupported os: %s", runtime.GOOS)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !config.C.Alerting.CallPlugin.Enable {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
p, err := plugin.Open(config.C.Alerting.CallPlugin.PluginPath)
|
p, err := plugin.Open(config.C.Alerting.CallPlugin.PluginPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorf("failed to open notify plugin: %v", err)
|
logger.Errorf("failed to open notify plugin: %v", err)
|
||||||
|
|
Loading…
Reference in New Issue