From 45df3c9526c140aa8762d510ddf66ca145836e75 Mon Sep 17 00:00:00 2001 From: alteredCoder Date: Fri, 8 Oct 2021 15:54:18 +0200 Subject: [PATCH] update metrics --- pkg/apiserver/apic.go | 8 ++++---- pkg/models/localapi_swagger.yaml | 4 ++-- pkg/models/metrics_bouncer_info.go | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/apiserver/apic.go b/pkg/apiserver/apic.go index 9ff40c128..c5da47cbd 100644 --- a/pkg/apiserver/apic.go +++ b/pkg/apiserver/apic.go @@ -431,10 +431,10 @@ func (a *apic) SendMetrics() error { for _, bouncer := range bouncers { m := &models.MetricsBouncerInfo{ - Version: bouncer.Version, - Name: bouncer.Name, - Type: bouncer.Type, - LastPull: bouncer.LastPull.String(), + Version: bouncer.Version, + CustomName: bouncer.Name, + Name: bouncer.Type, + LastPull: bouncer.LastPull.String(), } metric.Bouncers = append(metric.Bouncers, m) } diff --git a/pkg/models/localapi_swagger.yaml b/pkg/models/localapi_swagger.yaml index 587e08e2f..2256f2868 100644 --- a/pkg/models/localapi_swagger.yaml +++ b/pkg/models/localapi_swagger.yaml @@ -781,10 +781,10 @@ definitions: description: Software version info (so we can warn users about out-of-date software). The software name and the version are "guessed" from the user-agent type: object properties: - name: + custom_name: type: string description: name of the component - type: + name: type: string description: bouncer type (firewall, php ...) version: diff --git a/pkg/models/metrics_bouncer_info.go b/pkg/models/metrics_bouncer_info.go index 097846bb0..f38960e2e 100644 --- a/pkg/models/metrics_bouncer_info.go +++ b/pkg/models/metrics_bouncer_info.go @@ -19,14 +19,14 @@ import ( // swagger:model MetricsBouncerInfo type MetricsBouncerInfo struct { + // name of the component + CustomName string `json:"custom_name,omitempty"` + // last bouncer pull date LastPull string `json:"last_pull,omitempty"` - // name of the component - Name string `json:"name,omitempty"` - // bouncer type (firewall, php ...) - Type string `json:"type,omitempty"` + Name string `json:"name,omitempty"` // software version Version string `json:"version,omitempty"`