chore: rename metric

This commit is contained in:
Liam Chan 2024-08-23 15:58:03 +08:00
parent d82a83cca1
commit 0f4c565250
2 changed files with 10 additions and 12 deletions

View File

@ -84,9 +84,9 @@ func (p *zabbixAgentPlugin) registerMetrics() error {
), ),
handler: h.GetAppVersion, handler: h.GetAppVersion,
}, },
"onvif.client": { "onvif.httpclient": {
metric: metric.New( metric: metric.New(
"ONVIF client", "ONVIF HTTP client",
[]*metric.Param{ []*metric.Param{
metric.NewParam("method", "HTTP request method."), metric.NewParam("method", "HTTP request method."),
metric.NewParam("url", "HTTP request URL."), metric.NewParam("url", "HTTP request URL."),

18
main.go
View File

@ -62,16 +62,14 @@ func main() {
/** /**
* Zabbix agent * Zabbix agent
*/ */
//go func() { go func() {
// zabbixagent.Run() err = zabbixagent.Launch()
//}() if err != nil {
// return
//select {} }
err = zabbixagent.Launch() panic(err)
if err != nil { }()
return
}
panic(err) select {}
} }