From 0f4c5652504e2fcf8b8f1fe7506f61346a2b9c4c Mon Sep 17 00:00:00 2001 From: imbytecat Date: Fri, 23 Aug 2024 15:58:03 +0800 Subject: [PATCH] chore: rename metric --- integration/zabbixagent/plugin.go | 4 ++-- main.go | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/integration/zabbixagent/plugin.go b/integration/zabbixagent/plugin.go index dec70ae..3b9c160 100644 --- a/integration/zabbixagent/plugin.go +++ b/integration/zabbixagent/plugin.go @@ -84,9 +84,9 @@ func (p *zabbixAgentPlugin) registerMetrics() error { ), handler: h.GetAppVersion, }, - "onvif.client": { + "onvif.httpclient": { metric: metric.New( - "ONVIF client", + "ONVIF HTTP client", []*metric.Param{ metric.NewParam("method", "HTTP request method."), metric.NewParam("url", "HTTP request URL."), diff --git a/main.go b/main.go index 704397c..4e404bf 100644 --- a/main.go +++ b/main.go @@ -62,16 +62,14 @@ func main() { /** * Zabbix agent */ - //go func() { - // zabbixagent.Run() - //}() - // - //select {} + go func() { + err = zabbixagent.Launch() + if err != nil { + return + } - err = zabbixagent.Launch() - if err != nil { - return - } + panic(err) + }() - panic(err) + select {} }