master
go 39 lines 722 Bytes
Raw
1 //go:build cgo
2
3 package pmi
4
5 import (
6 _ "embed"
7
8 "github.com/netdata/netdata/go/plugins/plugin/framework/collectorapi"
9 "github.com/netdata/netdata/go/plugins/plugin/ibm.d/framework"
10 )
11
12 //go:embed config_schema.json
13 var configSchema string
14
15 func New() *Collector {
16 cfg := defaultConfig()
17 return &Collector{
18 Collector: framework.Collector{
19 Config: cfg.Config,
20 },
21 Config: cfg,
22 }
23 }
24
25 func (c *Collector) Configuration() any {
26 cfg := c.Config
27 return &cfg
28 }
29
30 func init() {
31 collectorapi.Register("websphere_pmi", collectorapi.Creator{
32 JobConfigSchema: configSchema,
33 Create: func() collectorapi.CollectorV1 { return New() },
34 Config: func() any {
35 cfg := defaultConfig()
36 return &cfg
37 },
38 })
39 }