mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 17:00:57 -06:00
Merge pull request #20 from opencloud-eu/metrics-logs-and-supervisor
metrics, log and supervisor
This commit is contained in:
@@ -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++
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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{}{},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()),
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user