master
go 40 lines 2.13 KB
Raw
1 package mp
2
3 import (
4 "time"
5
6 "github.com/netdata/netdata/go/plugins/pkg/confopt"
7 "github.com/netdata/netdata/go/plugins/pkg/web"
8 "github.com/netdata/netdata/go/plugins/plugin/ibm.d/framework"
9 )
10
11 const defaultTimeout = 10 * time.Second
12
13 // Config captures user configuration for the WebSphere MicroProfile module.
14 // Comments are consumed by the documentation generator, so keep them precise.
15 type Config struct {
16 framework.Config `yaml:",inline" json:",inline"`
17 web.HTTPConfig `yaml:",inline" json:",inline"`
18
19 Vnode string `yaml:"vnode,omitempty" json:"vnode" ui:"group:Connection"`
20
21 // CellName appends the Liberty cell label to every exported time-series.
22 CellName string `yaml:"cell_name,omitempty" json:"cell_name" ui:"group:Identity"`
23 // NodeName appends the Liberty node label to every exported time-series.
24 NodeName string `yaml:"node_name,omitempty" json:"node_name" ui:"group:Identity"`
25 // ServerName appends the Liberty server label to every exported time-series.
26 ServerName string `yaml:"server_name,omitempty" json:"server_name" ui:"group:Identity"`
27
28 // MetricsEndpoint overrides the metrics path relative to the base URL (accepts absolute URLs as well).
29 MetricsEndpoint string `yaml:"metrics_endpoint,omitempty" json:"metrics_endpoint" ui:"group:Connection"`
30
31 // CollectJVMMetrics toggles JVM/base scope metrics scraped from the MicroProfile endpoint.
32 CollectJVMMetrics confopt.AutoBool `yaml:"collect_jvm_metrics" json:"collect_jvm_metrics" ui:"group:Other Metrics"`
33 // CollectRESTMetrics toggles per-endpoint REST/JAX-RS metrics (may introduce cardinality).
34 CollectRESTMetrics confopt.AutoBool `yaml:"collect_rest_metrics" json:"collect_rest_metrics" ui:"group:REST Endpoints"`
35
36 // MaxRESTEndpoints limits how many REST endpoints are exported when REST metrics are enabled (0 disables the limit).
37 MaxRESTEndpoints int `yaml:"max_rest_endpoints,omitempty" json:"max_rest_endpoints" ui:"group:REST Endpoints"`
38 // CollectRESTMatching filters REST endpoints using glob-style patterns (supports `*`, `?`, `!` prefixes).
39 CollectRESTMatching string `yaml:"collect_rest_matching,omitempty" json:"collect_rest_matching" ui:"group:REST Endpoints"`
40 }