1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-27 20:22:16 +02:00

Add prometheus monitoring endpoint

This commit is contained in:
Alexandre Iooss
2020-09-21 21:33:32 +02:00
parent ad75d2c774
commit 7cdd78a70e
6 changed files with 116 additions and 12 deletions

View File

@ -20,12 +20,15 @@ type Config struct {
URI string
UserDn string
}
Prometheus struct {
ListenAddress string
}
Site struct {
ListenAdress string
Name string
Hostname string
Favicon string
WidgetURL string
ListenAddress string
Name string
Hostname string
Favicon string
WidgetURL string
}
}
@ -62,7 +65,8 @@ func New() (*Config, error) {
viper.SetDefault("AuthBackend", "LDAP")
viper.SetDefault("LDAP.URI", "ldap://127.0.0.1:389")
viper.SetDefault("LDAP.UserDn", "cn=users,dc=example,dc=com")
viper.SetDefault("Site.ListenAdress", "127.0.0.1:8080")
viper.SetDefault("Prometheus.ListenAddress", "0.0.0.0:2112")
viper.SetDefault("Site.ListenAddress", "127.0.0.1:8080")
viper.SetDefault("Site.Name", "Ghostream")
viper.SetDefault("Site.Hostname", "localhost")
viper.SetDefault("Site.Favicon", "/favicon.ico")