Merge pull request #20 from opencloud-eu/metrics-logs-and-supervisor

metrics, log and supervisor
This commit is contained in:
Jörn Friedrich Dreyer
2025-01-14 17:27:14 +01:00
committed by GitHub
35 changed files with 37 additions and 37 deletions

View File

@@ -368,7 +368,7 @@ func Start(ctx context.Context, o ...Option) error {
totalBackoff := 0
// Start creates its own supervisor. Running services under `ocis server` will create its own supervision tree.
s.Supervisor = suture.New("ocis", suture.Spec{
s.Supervisor = suture.New("opencloud", suture.Spec{
EventHook: func(e suture.Event) {
if e.Type() == suture.EventTypeBackoff {
totalBackoff++

View File

@@ -14,7 +14,7 @@ var acmeTemplate = x509.Certificate{
SerialNumber: serialNumber,
Subject: pkix.Name{
Organization: []string{"Acme Corp"},
CommonName: "OCIS",
CommonName: "OpenCloud",
},
NotBefore: time.Now(),
NotAfter: time.Now().Add(24 * time.Hour * 365),

View File

@@ -15,7 +15,7 @@ type Options struct {
// newOptions initializes the available default options.
func newOptions(opts ...Option) Options {
opt := Options{
Name: "ocis",
Name: "opencloud",
Level: "info",
Pretty: true,
Color: true,

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "activitylog"

View File

@@ -46,7 +46,7 @@ func AppProviderConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "app_provider",
},
},

View File

@@ -41,7 +41,7 @@ func AppRegistryConfigFromStruct(cfg *config.Config, logger log.Logger) map[stri
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "app_registry",
},
},

View File

@@ -46,7 +46,7 @@ func AuthAppConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_app",
},
},

View File

@@ -46,7 +46,7 @@ func AuthBasicConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_basic",
},
},

View File

@@ -38,7 +38,7 @@ func AuthBearerConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_bearer",
},
},

View File

@@ -34,7 +34,7 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_machine",
},
},

View File

@@ -44,7 +44,7 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "auth_service",
},
},

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "clientlog"

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "eventhistory"

View File

@@ -114,7 +114,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
"credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "frontend",
},
"requestid": map[string]interface{}{},

View File

@@ -112,7 +112,7 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "gateway",
},
},

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "graph"

View File

@@ -53,7 +53,7 @@ func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "groups",
},
},

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "idp"

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "invitations"

View File

@@ -84,7 +84,7 @@ func Server(cfg *config.Config) *cli.Command {
// ocdav.LockSystem(), // will default to the CS3 lock system
// ocdav.TLSConfig() // tls config for the http server
ocdav.MetricsEnabled(true),
ocdav.MetricsNamespace("ocis"),
ocdav.MetricsNamespace("opencloud"),
ocdav.Tracing("Adding these strings is a workaround for ->", "https://github.com/cs3org/reva/issues/4131"),
ocdav.WithTraceProvider(traceProvider),
ocdav.RegisterTTL(registry.GetRegisterTTL()),

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "ocm"

View File

@@ -49,7 +49,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
"credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "ocm",
},
"requestid": map[string]interface{}{},
@@ -61,7 +61,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
"ocmprovider": map[string]interface{}{
"ocm_prefix": cfg.OCMD.Prefix,
"endpoint": cfg.Commons.OcisURL,
"provider": "oCIS",
"provider": "OpenCloud",
"webdav_root": "/dav/ocm",
"webapp_root": cfg.ScienceMesh.Prefix,
"enable_webapp": false,

View File

@@ -6,7 +6,7 @@ import (
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "proxy"

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "search"

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "settings"

View File

@@ -140,7 +140,7 @@ func SharingConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string]
"password": cfg.Events.AuthPassword,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "sharing",
},
},

View File

@@ -24,7 +24,7 @@ func StoragePublicLinkConfigFromStruct(cfg *config.Config) map[string]interface{
"interceptors": map[string]interface{}{
"log": map[string]interface{}{},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_publiclink",
},
},

View File

@@ -30,7 +30,7 @@ func StorageSharesConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_shares",
},
},

View File

@@ -103,7 +103,7 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_system",
},
},
@@ -138,7 +138,7 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
},
"middlewares": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_system",
},
},

View File

@@ -62,7 +62,7 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
"password": cfg.Events.AuthPassword,
},
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "storage_users",
},
},

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "thumbnails"

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "userlog"

View File

@@ -47,7 +47,7 @@ func UsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"interceptors": map[string]interface{}{
"prometheus": map[string]interface{}{
"namespace": "ocis",
"namespace": "opencloud",
"subsystem": "users",
},
},

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "webdav"

View File

@@ -4,7 +4,7 @@ import "github.com/prometheus/client_golang/prometheus"
var (
// Namespace defines the namespace for the defines metrics.
Namespace = "ocis"
Namespace = "opencloud"
// Subsystem defines the subsystem for the defines metrics.
Subsystem = "webfinger"