Compare commits

...

2 Commits

Author SHA1 Message Date
a417edcfed fix: plugin config name 2024-08-23 14:48:28 +08:00
77d8153b43 chore: 插件改名 2024-08-23 14:47:14 +08:00
4 changed files with 8 additions and 5 deletions

View File

@ -1,5 +1,5 @@
package zabbixagent
const (
PluginName = "OnvifAgent"
PluginName = "ONVIF"
)

View File

@ -76,9 +76,9 @@ func (p *zabbixAgentPlugin) registerMetrics() error {
h := NewHandler()
p.metrics = map[metricKey]*metricBinding{
"onvif.version": {
"onvif.app.version": {
metric: metric.New(
"ONVIF app version",
"App version",
nil,
false,
),

View File

@ -68,8 +68,11 @@ func main() {
//}()
//
//select {}
err = zabbixagent.Launch()
if err != nil {
log.Fatal(err)
return
}
panic(err)
}

View File

@ -6,4 +6,4 @@ RUN PROFILE=dev CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o out/app
FROM zabbix/zabbix-agent2:ubuntu-7.0-latest
COPY --from=builder /build/out/app /usr/sbin/onvif-agent
RUN echo "Plugins.Onvif.System.Path=/usr/sbin/onvif-agent" >> /etc/zabbix/zabbix_agent2.d/plugins.d/onvif.conf
RUN echo "Plugins.ONVIF.System.Path=/usr/sbin/onvif-agent" >> /etc/zabbix/zabbix_agent2.d/plugins.d/onvif.conf