mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
Fixed Backward Compatibility
This commit is contained in:
@ -87,10 +87,12 @@ func (b *Builder) Close() error {
|
|||||||
func (b *Builder) Run() error {
|
func (b *Builder) Run() error {
|
||||||
// Init Prometheus openmetrics
|
// Init Prometheus openmetrics
|
||||||
go func() {
|
go func() {
|
||||||
http.Handle(b.beelzebubCoreConfigurations.Core.Prometheus.Path, promhttp.Handler())
|
if (b.beelzebubCoreConfigurations.Core.Prometheus != parser.Prometheus{}) {
|
||||||
|
http.Handle(b.beelzebubCoreConfigurations.Core.Prometheus.Path, promhttp.Handler())
|
||||||
|
|
||||||
if err := http.ListenAndServe(b.beelzebubCoreConfigurations.Core.Prometheus.Port, nil); err != nil {
|
if err := http.ListenAndServe(b.beelzebubCoreConfigurations.Core.Prometheus.Port, nil); err != nil {
|
||||||
log.Fatalf("Error init Prometheus: %s", err.Error())
|
log.Fatalf("Error init Prometheus: %s", err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user